Skip to content

Annealing and Ising

dwave-neal

Maintained by dwavesystems

A simulated annealing sampler can be used for approximate Boltzmann sampling or heuristic optimization.

PythonApache-2.0
dwave-neal illustration

Resource snapshot

Category

Annealing and Ising

Stars

62

Last pushed

Nov 25, 2022Updated 3y ago

Open issues

5

What it is

dwave-neal is maintained by dwavesystems and sits in the Annealing and Ising lane of the open-source quantum map.

A simulated annealing sampler can be used for approximate Boltzmann sampling or heuristic optimization. It commonly appears alongside dwavesystems-dimod in example workflows.

Last verified by Qtangl generator on May 27, 2026

Who it's for

Developers interested in Ising-model formulations, annealing workflows, and D-Wave-style solver ecosystems.

What you can build or learn

  • See how annealing-oriented projects model optimization problems.
  • Understand embeddings, samplers, and the surrounding tooling needed in practice.
  • Compare annealing workflows against gate-model and hybrid alternatives.

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.

~218 words · about 1 min readOpen on GitHub

:target: https://pypi.org/project/dwave-neal

.. image:: https://codecov.io/gh/dwavesystems/dwave-neal/branch/master/graph/badge.svg :target: https://codecov.io/gh/dwavesystems/dwave-neal

.. image:: https://readthedocs.com/projects/d-wave-systems-dwave-neal/badge/?version=latest :target: https://docs.ocean.dwavesys.com/projects/neal/en/latest/?badge=latest

.. image:: https://circleci.com/gh/dwavesystems/dwave-neal.svg?style=svg :target: https://circleci.com/gh/dwavesystems/dwave-neal

dwave-neal

.. index-start-marker

An implementation of a simulated annealing sampler.

A simulated annealing sampler can be used for approximate Boltzmann sampling or heuristic optimization. This implementation approaches the equilibrium distribution by performing updates at a sequence of increasing beta values, beta_schedule, terminating at the target beta. Each spin is updated once in a fixed order per point in the beta_schedule according to a Metropolis- Hastings update. When beta is large the target distribution concentrates, at equilibrium, over ground states of the model. Samples are guaranteed to match the equilibrium for long 'smooth' beta schedules.

For more information, see Kirkpatrick, S.; Gelatt Jr, C. D.; Vecchi, M. P. (1983). "Optimization by Simulated Annealing". Science. 220 (4598): 671–680

Example Usage

.. code-block:: python

import neal

sampler = neal.SimulatedAnnealingSampler()

h = {0: -1, 1: -1}
J = {(0, 1): -1}
sampleset = sampler.sample_ising(h, J)

.. index-end-marker

Installation

.. installation-start-marker

To install:

.. code-block:: bash

pip install dwave-neal

To build from source:

.. code-block:: bash

pip install -r requirements.txt
python setup.py build_ext --inplace
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.

Read on GitHub

Activity

Latest release

—

Watchers

7

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.

dwavesystems

chimera-embedding

This is a repository for algorithms to generate native-structured embeddings.

PythonApache-2.0

28 stars · Updated 7y ago

dwavesystems

dimod

A shared API for QUBO/Ising samplers.

PythonApache-2.0FlagshipQtangl relevant

142 stars · Updated 3mo ago

dwavesystems

dwave-cloud-client

A minimal implementation of the REST interface used to communicate with D-Wave Solver API (SAPI) servers.

PythonApache-2.0

62 stars · Updated 3mo ago

dwavesystems

dwave-ocean-sdk

Installer for D-Wave's Ocean tools

PythonApache-2.0FlagshipQtangl relevant

524 stars · Updated 3mo ago

dwavesystems

dwave_embedding_utilities

Provides utilities for mapping between source and target models.

PythonApache-2.0Archive

11 stars · Updated 8y ago

dwavesystems

qbsolv

Qbsolv,a decomposing solver, finds a minimum value of a large quadratic unconstrained binary optimization (QUBO) problem by splitting it into pieces solved either via a D-Wave system or a classical tabu solver.

qApache-2.0FlagshipQtangl relevantArchive

920 stars · Updated 4y ago