Solves constraints satisfaction problems with binary quadratic model samplers
Project description
- warning:
dwavebinarycsp is deprecated. For solving problems with constraints, we recommend using the hybrid solvers in the Leap :tm: service. You can find documentation for the hybrid solvers at https://docs.ocean.dwavesys.com.
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.
Contributing
Ocean’s contributing guide has guidelines for contributing to Ocean packages.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dwavebinarycsp-0.3.1.tar.gz.
File metadata
- Download URL: dwavebinarycsp-0.3.1.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7af07cd269809db94dbb4bee9b9cee437e9199fb42be6f2fcf68971a6f01bdbe
|
|
| MD5 |
b048ae1f6894ebe4d5b9fb5111c14861
|
|
| BLAKE2b-256 |
2f8b18e3c027be5fc58bfb39c57686332e8b1c39a080386132aef2e8548467a5
|
File details
Details for the file dwavebinarycsp-0.3.1-py3-none-any.whl.
File metadata
- Download URL: dwavebinarycsp-0.3.1-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4a0f3d7f69fc43397467842d7056ac940ab3848ec55a8e2e412f464c864aadd
|
|
| MD5 |
86b44d3f9b2fb15a9ee16186c285276c
|
|
| BLAKE2b-256 |
d1fa2b5616a53e0eabc194db45d5e1f5feea1ecf32aa4732af4c8892d15c8f21
|