Simulated Annealing Sampler

A dimod sampler that uses the simulated annealing algorithm.


class SimulatedAnnealingSampler[source]

Simulated annealing sampler.

Also aliased as Neal.


This example solves a simple Ising problem.

>>> import neal
>>> sampler = neal.SimulatedAnnealingSampler()
>>> h = {'a': 0.0, 'b': 0.0, 'c': 0.0}
>>> J = {('a', 'b'): 1.0, ('b', 'c'): 1.0, ('a', 'c'): 1.0}
>>> sampleset = sampler.sample_ising(h, J, num_reads=10)
>>> print(

Sampler Properties

A dict containing any additional information about the sampler.


A dict where keys are the keyword parameters accepted by the sampler methods (allowed kwargs) and values are lists of relevant to each parameter.


SimulatedAnnealingSampler.sample(bqm[, ...])

Sample from a binary quadratic model using an implemented sample method.

SimulatedAnnealingSampler.sample_ising(h, J, ...)

Sample from an Ising model using the implemented sample method.

SimulatedAnnealingSampler.sample_qubo(Q, ...)

Sample from a QUBO using the implemented sample method.