dwavebinarycsp


Namedwavebinarycsp JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/dwavesystems/dwavebinarycsp
SummarySolves constraints satisfaction problems with binary quadratic model samplers
upload_time2024-11-27 23:00:40
maintainerNone
docs_urlNone
authorD-Wave Systems Inc.
requires_python>=3.9
licenseApache 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            :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.

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

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

.. image:: https://readthedocs.com/projects/d-wave-systems-binarycsp/badge/?version=latest
    :target: https://docs.ocean.dwavesys.com/projects/binarycsp/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.

Below is an 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.

Contributing
------------

Ocean's `contributing guide <https://docs.ocean.dwavesys.com/en/stable/contributing.html>`_
has guidelines for contributing to Ocean packages.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dwavesystems/dwavebinarycsp",
    "name": "dwavebinarycsp",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "D-Wave Systems Inc.",
    "author_email": "tools@dwavesys.com",
    "download_url": "https://files.pythonhosted.org/packages/2f/8b/18e3c027be5fc58bfb39c57686332e8b1c39a080386132aef2e8548467a5/dwavebinarycsp-0.3.1.tar.gz",
    "platform": null,
    "description": ":warning: *dwavebinarycsp* is deprecated. For solving problems with constraints,\n    we recommend using the hybrid solvers in the Leap :tm: service. You can find\n    documentation for the hybrid solvers at https://docs.ocean.dwavesys.com.\n\n.. image:: https://img.shields.io/pypi/v/dwavebinarycsp.svg\n    :target: https://pypi.org/project/dwavebinarycsp\n\n.. image:: https://codecov.io/gh/dwavesystems/dwavebinarycsp/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/dwavesystems/dwavebinarycsp\n\n.. image:: https://readthedocs.com/projects/d-wave-systems-binarycsp/badge/?version=latest\n    :target: https://docs.ocean.dwavesys.com/projects/binarycsp/en/latest/?badge=latest\n\n.. image:: https://circleci.com/gh/dwavesystems/dwavebinarycsp.svg?style=svg\n    :target: https://circleci.com/gh/dwavesystems/dwavebinarycsp\n\ndwavebinarycsp\n==============\n\n.. index-start-marker\n\nLibrary to construct a binary quadratic model from a constraint satisfaction problem with\nsmall constraints over binary variables.\n\nBelow is an example usage:\n\n.. code-block:: python\n\n    import dwavebinarycsp\n    import dimod\n\n    csp = dwavebinarycsp.factories.random_2in4sat(8, 4)  # 8 variables, 4 clauses\n\n    bqm = dwavebinarycsp.stitch(csp)\n\n    resp = dimod.ExactSolver().sample(bqm)\n\n    for sample, energy in resp.data(['sample', 'energy']):\n        print(sample, csp.check(sample), energy)\n\n.. index-end-marker\n\nInstallation\n------------\n\n.. installation-start-marker\n\nTo install:\n\n.. code-block:: bash\n\n    pip install dwavebinarycsp\n\nTo build from source:\n\n.. code-block:: bash\n\n    pip install -r requirements.txt\n    python setup.py install\n\n.. installation-end-marker\n\nLicense\n-------\n\nReleased under the Apache License 2.0. See LICENSE file.\n\nContributing\n------------\n\nOcean's `contributing guide <https://docs.ocean.dwavesys.com/en/stable/contributing.html>`_\nhas guidelines for contributing to Ocean packages.\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Solves constraints satisfaction problems with binary quadratic model samplers",
    "version": "0.3.1",
    "project_urls": {
        "Changes": "https://github.com/dwavesystems/dwavebinarycsp/releases",
        "Documentation": "https://docs.ocean.dwavesys.com",
        "Homepage": "https://github.com/dwavesystems/dwavebinarycsp",
        "Souce Code": "https://github.com/dwavesystems/dwavebinarycsp"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d1fa2b5616a53e0eabc194db45d5e1f5feea1ecf32aa4732af4c8892d15c8f21",
                "md5": "86b44d3f9b2fb15a9ee16186c285276c",
                "sha256": "a4a0f3d7f69fc43397467842d7056ac940ab3848ec55a8e2e412f464c864aadd"
            },
            "downloads": -1,
            "filename": "dwavebinarycsp-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "86b44d3f9b2fb15a9ee16186c285276c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 35387,
            "upload_time": "2024-11-27T23:00:39",
            "upload_time_iso_8601": "2024-11-27T23:00:39.002484Z",
            "url": "https://files.pythonhosted.org/packages/d1/fa/2b5616a53e0eabc194db45d5e1f5feea1ecf32aa4732af4c8892d15c8f21/dwavebinarycsp-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f8b18e3c027be5fc58bfb39c57686332e8b1c39a080386132aef2e8548467a5",
                "md5": "b048ae1f6894ebe4d5b9fb5111c14861",
                "sha256": "7af07cd269809db94dbb4bee9b9cee437e9199fb42be6f2fcf68971a6f01bdbe"
            },
            "downloads": -1,
            "filename": "dwavebinarycsp-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b048ae1f6894ebe4d5b9fb5111c14861",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 29301,
            "upload_time": "2024-11-27T23:00:40",
            "upload_time_iso_8601": "2024-11-27T23:00:40.227416Z",
            "url": "https://files.pythonhosted.org/packages/2f/8b/18e3c027be5fc58bfb39c57686332e8b1c39a080386132aef2e8548467a5/dwavebinarycsp-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-27 23:00:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dwavesystems",
    "github_project": "dwavebinarycsp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "requirements": [],
    "lcname": "dwavebinarycsp"
}
        
Elapsed time: 1.90495s