dwave-neal¶
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¶
import neal
sampler = neal.SimulatedAnnealingSampler()
h = {0: -1, 1: -1}
J = {(0, 1): -1}
sampleset = sampler.sample_ising(h, J)
Documentation¶
Release: | 0.5.9 |
---|---|
Date: | Jun 10, 2022 |
Note
This documentation is for the latest version of dwave-neal. Documentation for the version currently installed by dwave-ocean-sdk is here: dwave-neal.