dimod
A shared API for binary quadratic model samplers.
Decision gist · record as of 2026-08-14
Yes. dimod is actively maintained, has no known vulnerabilities, and is essential if you work with binary quadratic models or the D-Wave Ocean SDK. The Apache 2.0 license is permissive. Medium install friction is manageable thanks to pre-built wheels for modern Python versions (3.10–3.14). Install it if you need a standard interface for BQM solvers or plan to use quantum annealing tools.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; C++ and Cython compilation needed during wheel build on unsupported platforms.
- Medium install friction due to compiled C++ and Cython components, but pre-built wheels are available for Python 3.10–3.14 across macOS, Windows, and Linux.
- Maintenance is active with recent commits and no known vulnerabilities.
License · maintenance · safety
Apache 2.0 (permissive) — Licensed under Apache 2.0 (permissive), allowing use in commercial and private projects with minimal restrictions; you must include a copy of the license and state significant changes.
last release 2026-06-08 (67 days) · last repo commit 2026-08-04 · 142 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 273,858 downloads/mo, #8,196 on PyPI
Alternatives
Verify before relying
pip install dimod
import dimod
bqm = dimod.BinaryQuadraticModel({0: -1, 1: 1}, {(0, 1): 2}, 0.0, dimod.BINARY)
sampleset = dimod.ExactSolver().sample(bqm)
print(sampleset)- Performance characteristics and scalability limits for large BQMs are not detailed in the fact sheet.
- Integration depth with D-Wave quantum hardware and other third-party samplers beyond reference examples.
- Whether higher-order model support covers all non-quadratic formulations or a specific subset.
What it is and what it does
dimod is a Python library that defines a shared API for samplers working with binary quadratic models (BQMs)—a class of optimization problems that includes Ising models and QUBO (Quadratic Unconstrained Binary Optimization) formulations. It provides data structures to represent these models, reference implementations of both simple and composed samplers, and abstract base classes for building custom solvers. The library also supports higher-order (non-quadratic) models beyond the standard BQM.
You use dimod to construct an optimization problem as a BQM, then pass it to a sampler—either dimod's built-in ExactSolver for small problems or a third-party sampler (such as D-Wave's quantum hardware) for larger ones. The library abstracts away the details of different solver implementations, letting you swap samplers without rewriting your problem definition. It is the foundation layer for the D-Wave Ocean SDK ecosystem.
Use it for
- Define and solve small optimization problems using dimod's exact brute-force solver for verification or prototyping.
- Build a custom sampler by inheriting from dimod's abstract base classes and integrating it into the Ocean ecosystem.
- Prepare QUBO or Ising models for submission to quantum annealers or other specialized solvers via a uniform interface.
- Compose multiple samplers (e.g., classical preprocessing followed by quantum sampling) using dimod's sampler abstraction.
- Experiment with higher-order optimization models beyond standard quadratic formulations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
dimod is actively maintained, has no known vulnerabilities, and is essential if you work with binary quadratic models or the D-Wave Ocean SDK. The Apache 2.0 license is permissive. Medium install friction is manageable thanks to pre-built wheels for modern Python versions (3.10–3.14). Install it if you need a standard interface for BQM solvers or plan to use quantum annealing tools.
Install
dimod on PyPI
Before you install
Medium install friction due to compiled C++ and Cython components, but pre-built wheels are available for Python 3.10–3.14 across macOS, Windows, and Linux. Maintenance is active with recent commits and no known vulnerabilities.
Requires Python 3.10 or later; C++ and Cython compilation needed during wheel build on unsupported platforms.
License in practice
Licensed under Apache 2.0 (permissive), allowing use in commercial and private projects with minimal restrictions; you must include a copy of the license and state significant changes.
Quickstart
pip install dimod
import dimod
bqm = dimod.BinaryQuadraticModel({0: -1, 1: 1}, {(0, 1): 2}, 0.0, dimod.BINARY)
sampleset = dimod.ExactSolver().sample(bqm)
print(sampleset)
Verify before relying
- Performance characteristics and scalability limits for large BQMs are not detailed in the fact sheet.
- Integration depth with D-Wave quantum hardware and other third-party samplers beyond reference examples.
- Whether higher-order model support covers all non-quadratic formulations or a specific subset.
Package facts
| License | Apache 2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagenumpy |
| Maintenance | Actively maintained 67 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 273,858 / month, #8,196 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: C++Programming Language :: CythonProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPython |
Evidence: dimod-0.12.22-cp310-cp310-macosx_10_9_x86_64.whl; dimod-0.12.22-cp310-cp310-macosx_11_0_arm64.whl; dimod-0.12.22-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; dimod-0.12.22-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; dimod-0.12.22-cp310-cp310-win_amd64.whl; dimod-0.12.22-cp311-cp311-macosx_10_9_x86_64.whl; dimod-0.12.22-cp311-cp311-macosx_11_0_arm64.whl; dimod-0.12.22-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; dimod-0.12.22-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; dimod-0.12.22-cp311-cp311-win_amd64.whl; dimod-0.12.22-cp312-cp312-macosx_10_13_x86_64.whl; dimod-0.12.22-cp312-cp312-macosx_11_0_arm64.whl; dimod-0.12.22-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; dimod-0.12.22-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; dimod-0.12.22-cp312-cp312-win_amd64.whl; dimod-0.12.22-cp313-cp313-macosx_10_13_x86_64.whl; dimod-0.12.22-cp313-cp313-macosx_11_0_arm64.whl; dimod-0.12.22-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; dimod-0.12.22-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; dimod-0.12.22-cp313-cp313-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “binary quadratic model solver”
- dimoddimod provides classes and interfaces for defining and solving binary…
- dwave-samplersProvides a collection of classical and hybrid optimization algorithms…
- daqpDAQP is a dual active-set solver for convex quadratic programs,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also dwave-samplers · dwave-graphs · qpsolvers · osqp · daqp · dwave-networkx · quadprog · clarabel · Mosek