skillfed

dwave-samplers

Ocean-compatible collection of solvers/samplers.

dwave-samplers v1.8.0 117.5K downloads/30d#12,161 on PyPI20
Permissive 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) Active released

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-samplers

uv

uv add dwave-samplers

poetry

poetry add dwave-samplers

Installing 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

License :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming 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

Tags

binary quadratic model solverlocal optimization algorithmssimulated annealing samplerQUBO solverclassical optimization heuristics
optimizationquantum-inspiredlocal-solver

More Scientific/Engineering packages

Further reading