Skip to main content
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.

https://img.shields.io/pypi/v/dwavebinarycsp.svg 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.

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)

Source distribution for dwavebinarycsp 0.3.1
File Size Uploaded
dwavebinarycsp-0.3.1.tar.gz 29.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dwavebinarycsp 0.3.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

1 release file

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page