openjij
Framework for the Ising model and QUBO.
|
Public Member Functions | |
sample (self, bqm, **parameters) | |
sample_ising (self, h, J, **parameters) | |
sample_qubo (self, Q, **parameters) | |
Public Attributes | |
sample_ising | |
sample_qubo | |
Static Public Attributes | |
parameters = dict() | |
properties = dict() | |
Protected Member Functions | |
_set_params (self, **kwargs) | |
_sampling (self, **kwargs) | |
_cxxjij_sampling (self, model, init_generator, algorithm, system, reinitialize_state=None, seed=None, offset=None) | |
_get_result (self, system, model) | |
Base sampler class of python wrapper for cxxjij simulator.
|
protected |
Basic sampling function: for cxxjij sampling. Args: model (openjij.BinaryQuadraticModel): model has a information of instaunce (h, J, Q) init_generator (callable): return initial state, must have argument structure algorithm (callable): system algorithm of cxxjij system (:obj:): [description] reinitialize_state (bool, optional): [description]. Defaults to None. seed (int, optional): seed for algorithm. Defaults to None. offset (float): an offset which is added to the calculated energy Returns: :class:`openjij.sampler.response.Response`: results
Referenced by openjij.sampler.sa_sampler.SASampler._sample_hubo_old(), openjij.sampler.sqa_sampler.SQASampler.sample(), and openjij.sampler.csqa_sampler.CSQASampler.sample_ising().
|
protected |
Reimplemented in openjij.sampler.csqa_sampler.CSQASampler, and openjij.sampler.sqa_sampler.SQASampler.
|
protected |
|
protected |
References openjij.sampler.csqa_sampler.CSQASampler._default_params, openjij.sampler.sa_sampler.SASampler._default_params, openjij.sampler.sqa_sampler.SQASampler._default_params, openjij.sampler.csqa_sampler.CSQASampler._params, openjij.sampler.sa_sampler.SASampler._params, and openjij.sampler.sqa_sampler.SQASampler._params.
Referenced by openjij.sampler.sa_sampler.SASampler._sample_hubo_old(), openjij.sampler.sa_sampler.SASampler.sample(), openjij.sampler.sqa_sampler.SQASampler.sample(), and openjij.sampler.csqa_sampler.CSQASampler.sample_ising().
openjij.sampler.sampler.BaseSampler.sample | ( | self, | |
bqm, | |||
** | parameters | ||
) |
Sample from a binary quadratic model. Args: bqm (openjij.BinaryQuadraticModel): Binary Qudratic Model **parameters: See the implemented sampling for additional keyword definitions. Returns: :class:`openjij.sampler.response.Response`: results
Reimplemented in openjij.sampler.sa_sampler.SASampler, and openjij.sampler.sqa_sampler.SQASampler.
Referenced by openjij.sampler.sampler.BaseSampler.sample_ising(), and openjij.sampler.sampler.BaseSampler.sample_qubo().
openjij.sampler.sampler.BaseSampler.sample_ising | ( | self, | |
h, | |||
J, | |||
** | parameters | ||
) |
Sample from an Ising model using the implemented sample method. Args: h (dict): Linear biases J (dict): Quadratic biases Returns: :class:`openjij.sampler.response.Response`: results
Reimplemented in openjij.sampler.csqa_sampler.CSQASampler.
References openjij.sampler.sampler.BaseSampler.sample(), openjij.sampler.sa_sampler.SASampler.sample(), and openjij.sampler.sqa_sampler.SQASampler.sample().
openjij.sampler.sampler.BaseSampler.sample_qubo | ( | self, | |
Q, | |||
** | parameters | ||
) |
Sample from a QUBO model using the implemented sample method. Args: Q (dict or numpy.ndarray): Coefficients of a quadratic unconstrained binary optimization Returns: :class:`openjij.sampler.response.Response`: results
References openjij.sampler.sampler.BaseSampler.sample(), openjij.sampler.sa_sampler.SASampler.sample(), and openjij.sampler.sqa_sampler.SQASampler.sample().
|
static |
Reimplemented in openjij.sampler.sa_sampler.SASampler, and openjij.sampler.sqa_sampler.SQASampler.
|
static |
openjij.sampler.sampler.BaseSampler.sample_ising |
Reimplemented in openjij.sampler.csqa_sampler.CSQASampler.
openjij.sampler.sampler.BaseSampler.sample_qubo |