Skip to main content

Solves constraints satisfaction problems with binary quadratic model samplers

Project description

https://img.shields.io/pypi/v/dwavebinarycsp.svg https://ci.appveyor.com/api/projects/status/b99rhw0l6ljsgw5t?svg=true https://codecov.io/gh/dwavesystems/dwavebinarycsp/branch/master/graph/badge.svg https://readthedocs.org/projects/dwavebinarycsp/badge/?version=latest https://circleci.com/gh/dwavesystems/dwavebinarycsp.svg?style=svg

dwavebinarycsp

Library to construct a binary quadratic model from a constraint satisfaction problem with small constraints over binary variables.

Example Usage

import dwavebinarycsp
import dimod

csp = dwavebinarycsp.factories.random_2in4sat(8, 4)  # 8 variables, 4 clauses

bqm = dwavebinarycsp.stitch(csp)

resp = dimod.ExactSolver().sample(bqm)

for sample, energy in resp.data(['sample', 'energy']):
    print(sample, csp.check(sample), energy)

Installation

To install:

pip install dwavebinarycsp

To build from source:

pip install -r requirements.txt
python setup.py install

License

Released under the Apache License 2.0. See LICENSE file.

Contribution

See CONTRIBUTING.rst file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dwavebinarycsp-0.0.5.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dwavebinarycsp-0.0.5-py2.py3-none-any.whl (27.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file dwavebinarycsp-0.0.5.tar.gz.

File metadata

  • Download URL: dwavebinarycsp-0.0.5.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6

File hashes

Hashes for dwavebinarycsp-0.0.5.tar.gz
Algorithm Hash digest
SHA256 66fc509f8b74921b28e138ab9714ced59f580e94bf9ef1c170184f90bfdd6933
MD5 e2c3730f33f4e9515639b5189d7821c5
BLAKE2b-256 db753e933607b899f9551432a723970970a658f93a42bdb9570264f4752b077b

See more details on using hashes here.

File details

Details for the file dwavebinarycsp-0.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: dwavebinarycsp-0.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6

File hashes

Hashes for dwavebinarycsp-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 99c5b606123daaeb564b995546501376c7fb1d82849b27e8cf70bb9f213d6e78
MD5 f75eb39aa67b1a218e6cd0c92e5c2f68
BLAKE2b-256 05e8ec391f84a73ee55506e6bda6fa48ab4e0806bf55c9281b6108cfcfea837f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page