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.com/projects/d-wave-systems-binarycsp/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.

Below is an 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.1.1.tar.gz (19.5 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.1.1-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dwavebinarycsp-0.1.1.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for dwavebinarycsp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d95910006164ffa09a67c0db8c7e5f6e606888a878c6587d76a36d13c9874258
MD5 ae1882c34d84f1123264a2ac0d66abf5
BLAKE2b-256 cf2d80c9cf4c13a7a37d67fd1644ddf8961a98db444eabf479b5c827a5184e1e

See more details on using hashes here.

File details

Details for the file dwavebinarycsp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: dwavebinarycsp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 35.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for dwavebinarycsp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06366d08214455aa5fb8e7140664759b421995f221955eac84a31df36d9277c8
MD5 15709b2a00afb18da7d8ba230bf1c059
BLAKE2b-256 6b1cd097665f7957f9525f90c418c0222431af3c2655a0ffb31bd9c32e82d4d6

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