Simulated Annealing Sampler¶
A dimod sampler that uses the simulated annealing algorithm.
Class¶
-
class
SimulatedAnnealingSampler
[source]¶ Simulated annealing sampler.
Also aliased as
Neal
.Examples
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(sampleset.first.energy) -1.0
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 |
Methods¶
|
Sample from a binary quadratic model using an implemented sample method. |
Sample from an Ising model using the implemented sample method. |
|
Sample from a QUBO using the implemented sample method. |