Skip to content

General-purpose SDKs

dwavebinarycsp

Maintained by dwavesystems

For solving problems with constraints, we recommend using the hybrid solvers in the Leap :tm: service.

PythonApache-2.0Archive
dwavebinarycsp illustration

Resource snapshot

Category

General-purpose SDKs

Stars

21

Last pushed

Mar 18, 2025Updated 1y ago

Open issues

22

What it is

dwavebinarycsp is maintained by dwavesystems and sits in the General-purpose SDKs lane of the open-source quantum map.

For solving problems with constraints, we recommend using the hybrid solvers in the Leap :tm: service. It commonly appears alongside dwavesystems-dimod, dwavesystems-dwave-ocean-sdk in example workflows.

Last verified by Qtangl generator on May 27, 2026

Who it's for

Developers who want a broad entry point for building circuits, experimenting with algorithms, and integrating quantum workflows into larger applications.

What you can build or learn

  • Prototype end-to-end circuit workflows without committing to a niche backend too early.
  • Learn how the project represents circuits, gates, jobs, and results.
  • Compare how a major ecosystem frames practical quantum development.

Plays well with

License

Apache-2.0

SPDX identifier detected from the repository metadata or license files.

Repository README

Preview from the project README.

Rendered as Markdown inside a scrollable preview. Long READMEs stay contained; expand or open on GitHub for the full document.

~151 words · about 1 min readOpen on GitHub

: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.

: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://circleci.com/gh/dwavesystems/dwavebinarycsp.svg?style=svg :target: https://circleci.com/gh/dwavesystems/dwavebinarycsp

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

.. start_binarycsp_about

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)

.. end_binarycsp_about

Installation

To install:

.. code-block:: bash

pip install dwavebinarycsp

To build from source:

.. code-block:: bash

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 <https://docs.dwavequantum.com/en/latest/ocean/contribute.html>_ has guidelines for contributing to Ocean packages.

Read on GitHub

Activity

Latest release

—

Watchers

4

Python support

—

Learn digest

Get monthly updates when library entries change.

Monthly digest: new library entries, updated flagships, and one editorial pick.

Related resources

Keep exploring nearby tools.

quantumlib

Cirq

Python framework for creating, editing, and running Noisy Intermediate-Scale Quantum (NISQ) circuits.

PythonApache-2.0Flagship

4,971 stars · Updated 3mo ago

XanaduAI

pennylane

PennyLane is an open-source quantum software platform for quantum computing, quantum machine learning, and quantum chemistry.

PythonApache-2.0FlagshipQtangl relevant

3,229 stars · Updated 3mo ago

QISKit

qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.

PythonApache-2.0FlagshipQtangl relevant

7,412 stars · Updated 3mo ago

Qiskit

qiskit-terra

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.

PythonApache-2.0

7,412 stars · Updated 3mo ago

Microsoft

QuantumKatas

Tutorials and programming exercises for learning Q# and quantum computing

Jupyter NotebookMITFlagshipArchive

4,862 stars · Updated 2y ago

QuantumBFS

Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.

JuliaApache-2.0Flagship

1,032 stars · Updated 3mo ago