Skip to main content

Solves constraints satisfaction problems with binary quadratic model samplers

Project description

https://img.shields.io/pypi/v/dwavebinarycsp.svg https://coveralls.io/repos/github/dwavesystems/dwavebinarycsp/badge.svg?branch=master 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.2.tar.gz (15.0 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.2-py2.py3-none-any.whl (26.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

File hashes

Hashes for dwavebinarycsp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a00a1b3ce2191022394ca4278df958bac45b1fd46f0813e83217480146b15a00
MD5 7387544194d9e86b853aea0902954574
BLAKE2b-256 4c6a5b908de27104c6c7c963fe328349163ade409d37f1bb51ebc7f210d7a363

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dwavebinarycsp-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b6de8579720ac0ac4069ebe044c23c649133854b4a5736c056b0f01d247b9899
MD5 4626472dea9c41a087fb8d113a305f6b
BLAKE2b-256 b33d55092dbd54fe341f170e9cf793b393ec0e8a2bab71d0881cd858593325a1

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