omnisolver.pt.sampler#
Dimod-compatible PT sampler.
Module Contents#
Classes#
Parallel tempering samplers. |
- class omnisolver.pt.sampler.PTSampler#
Bases:
dimod.SamplerParallel tempering samplers.
- property parameters#
Parameters as a dict, where keys are keyword parameters accepted by the sampler methods and values are lists of the properties relevent to each parameter.
- property properties#
Properties as a dict containing any additional information about the sampler.
- sample_ising(h, J, num_replicas=10, num_pt_steps=100, num_sweeps=100, beta_min=0.01, beta_max=1.0, **parameters)#
Solve given Ising problem.
- Parameters:
h – dictionary of biases.
J – dictionary of couplings.
num_replicas – number of system replicas.
num_pt_steps – number of parallel tempering steps.
num_sweeps – number of Monte Carlo sweeps per parallel tempering step.
beta_min – inverse temperature of the hottest replica.
beta_max – inverse temperature of the coldest replica.
- Returns:
single-element sample set with the best solution found.