dwave-samplers
Ocean-compatible collection of solvers/samplers.
What it is and what it does
dwave-samplers is a collection of classical and quantum-inspired optimization solvers designed to work with binary quadratic models (BQMs) and QUBO problems. It provides seven different algorithms—Planar, Random, Simulated Annealing, Simulated Quantum Annealing, Steepest Descent, Tabu, and Tree Decomposition—each suited to different problem structures and use cases. The package runs entirely on your local CPU, making it useful for prototyping, baseline comparisons, and problems where remote quantum hardware is unavailable.
The solvers are built on top of dimod for problem representation and integrate with the D-Wave Ocean SDK ecosystem. They range from exact solvers (Planar, Tree Decomposition) for specialized problem structures to heuristic methods (Simulated Annealing, Tabu) for general optimization. Each sampler accepts a BQM or QUBO, applies its algorithm, and returns a SampleSet with solutions ranked by energy. The package depends on numpy and networkx for numerical and graph operations.
Use it for:
- Prototype optimization algorithms locally before submitting to D-Wave quantum hardware or cloud services.
- Establish classical baseline performance for comparison against quantum or hybrid approaches.
- Solve small to medium-scale QUBO and Ising problems using heuristics like simulated annealing or tabu search.
- Exact solution of planar Ising models or low-treewidth problems using specialized polynomial-time solvers.
- Approximate Boltzmann sampling and thermal equilibrium exploration via simulated annealing with custom temperature schedules.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a collection of classical and hybrid optimization algorithms (simulated annealing, tabu search, steepest descent, and others) that solve binary quadratic models locally on CPU.
Yes. The package is actively maintained, permissively licensed, has no known vulnerabilities, and provides a practical toolkit for local optimization of binary quadratic models. Install it if you work with BQMs, need classical baselines, or want to prototype before using D-Wave's quantum services. The medium install friction is typical for compiled packages and not a barrier.
Install
dwave-samplers on PyPI
pip
pip install dwave-samplersuv
uv add dwave-samplerspoetry
poetry add dwave-samplersInstalling dwave-samplers
Before you install
Medium install friction due to compiled wheels across multiple Python versions and platforms. Package is actively maintained with recent release activity and no known vulnerabilities.
License in practice
Apache License 2.0 (permissive) allows commercial and derivative use with minimal restrictions; you must retain license notices and document modifications.
Quickstart
pip install dwave-samplers
from dwave.samplers import SimulatedAnnealingSampler
import dimod
sampler = SimulatedAnnealingSampler()
bqm = dimod.generators.gnp_random_bqm(100, 0.5, 'BINARY')
sampleset = sampler.sample(bqm)
Requires Python 3.10 or later; compiled wheels available for macOS, Windows, and Linux on x86_64 and ARM64 architectures.
Verify before relying
- Performance characteristics and scalability limits for large problem instances
- Comparison of solution quality across different samplers for specific problem classes
- Memory requirements and computational overhead relative to problem size
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 3 — dimod, networkx, numpy |
| Maintenance | actively maintained — 57 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 117,453/month — #12,161 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dwave_samplers-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl; dwave_samplers-1.8.0-cp310-cp310-macosx_11_0_arm64.whl; dwave_samplers-1.8.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; dwave_samplers-1.8.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; dwave_samplers-1.8.0-cp310-cp310-win_amd64.whl; dwave_samplers-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl; dwave_samplers-1.8.0-cp311-cp311-macosx_11_0_arm64.whl; dwave_samplers-1.8.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; dwave_samplers-1.8.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; dwave_samplers-1.8.0-cp311-cp311-win_amd64.whl; dwave_samplers-1.8.0-cp312-abi3-macosx_10_13_x86_64.whl; dwave_samplers-1.8.0-cp312-abi3-macosx_11_0_arm64.whl; dwave_samplers-1.8.0-cp312-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; dwave_samplers-1.8.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; dwave_samplers-1.8.0-cp312-abi3-win_amd64.whl; dwave_samplers-1.8.0-cp314-cp314t-macosx_10_15_x86_64.whl; dwave_samplers-1.8.0-cp314-cp314t-macosx_11_0_arm64.whl; dwave_samplers-1.8.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; dwave_samplers-1.8.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; dwave_samplers-1.8.0-cp314-cp314t-win_amd64.whl
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
dimoddimod provides classes and interfaces for…
permissive · top 15,000 on PyPI
dwave-graphsProvides graph representations and algorithms…
permissive · top 15,000 on PyPI
dwave-optimizationFormulates nonlinear optimization models…
permissive · top 15,000 on PyPI
dwave-cloud-clientD-Wave Cloud Client provides a Python interface…
permissive · top 15,000 on PyPI
dwave-networkxExtends NetworkX with tools for D-Wave quantum…
permissive · top 15,000 on PyPI
quadprogSolves strictly convex quadratic programming…
copyleft · top 15,000 on PyPI
osqpOSQP is a Python wrapper for the Operator…
permissive · top 5,000 on PyPI
qpsolversProvides a unified Python interface to solve…
copyleft · top 5,000 on PyPI
directsearchSolves unconstrained and linearly constrained…
copyleft · top 15,000 on PyPI
pyDOE3pyDOE3 provides functions to construct…
permissive · top 15,000 on PyPI