Metadata-Version: 2.1
Name: dwavebinarycsp
Version: 0.0.3
Summary: Solves constraints satisfaction problems with binary quadratic model samplers
Home-page: https://github.com/dwavesystems/dwavebinarycsp
Author: D-Wave Systems Inc.
Author-email: acondello@dwavesys.com
License: Apache 2.0
Platform: UNKNOWN
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Python: >=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*
Requires-Dist: penaltymodel (<0.16.0,>=0.15.0)
Requires-Dist: penaltymodel-cache (<0.4.0,>=0.3.0)
Requires-Dist: networkx (<3.0,>=2.0)
Requires-Dist: dimod (<0.7.0six>=1.11.0,<2.0.0,>=0.6.7)
Requires-Dist: penaltymodel-mip (<0.2.0,>=0.1.2); platform_machine != "x86" and python_version != "3.4"
Requires-Dist: penaltymodel-maxgap (<0.5.0,>=0.4.0); platform_machine == "x86" or python_version == "3.4"

.. image:: https://img.shields.io/pypi/v/dwavebinarycsp.svg
    :target: https://pypi.python.org/pypi/dwavebinarycsp

.. image:: https://ci.appveyor.com/api/projects/status/b99rhw0l6ljsgw5t?svg=true
    :target: https://ci.appveyor.com/project/dwave-adtt/dwavebinarycsp

.. image:: https://codecov.io/gh/dwavesystems/dwavebinarycsp/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/dwavesystems/dwavebinarycsp

.. image:: https://readthedocs.org/projects/dwavebinarycsp/badge/?version=latest
    :target: http://dwavebinarycsp.readthedocs.io/en/latest/?badge=latest

.. image:: https://circleci.com/gh/dwavesystems/dwavebinarycsp.svg?style=svg
    :target: https://circleci.com/gh/dwavesystems/dwavebinarycsp

dwavebinarycsp
==============

.. index-start-marker

Library to construct a binary quadratic model from a constraint satisfaction problem with
small constraints over binary variables.

Example Usage
-------------

.. code-block:: python

    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)

.. index-end-marker

Installation
------------

.. installation-start-marker

To install:

.. code-block:: bash

    pip install dwavebinarycsp

To build from source:

.. code-block:: bash

    pip install -r requirements.txt
    python setup.py install

.. installation-end-marker

License
-------

Released under the Apache License 2.0. See LICENSE file.

Contribution
------------

See CONTRIBUTING.rst file.


