- 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.
Release files for dwavebinarycsp 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dwavebinarycsp-0.3.1.tar.gz | 29.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dwavebinarycsp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.7 kB
Release files / dwavebinarycsp-0.3.1.tar.gz
| Download URL | dwavebinarycsp-0.3.1.tar.gz |
|---|---|
| Size | 29.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7af07cd269809db94dbb4bee9b9cee437e9199fb42be6f2fcf68971a6f01bdbe
|
|
BLAKE2b-256 checksum How to use checksums |
2f8b18e3c027be5fc58bfb39c57686332e8b1c39a080386132aef2e8548467a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / dwavebinarycsp-0.3.1-py3-none-any.whl
| Download URL | dwavebinarycsp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 35.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a4a0f3d7f69fc43397467842d7056ac940ab3848ec55a8e2e412f464c864aadd
|
|
BLAKE2b-256 checksum How to use checksums |
d1fa2b5616a53e0eabc194db45d5e1f5feea1ecf32aa4732af4c8892d15c8f21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|