Sampler.sample_ising(h, J, **parameters)[source]

Sample from an Ising model using the implemented sample method.

This method is inherited from the Sampler base class.

Converts the Ising model into a BinaryQuadraticModel and then calls sample().

  • h (dict/list) – Linear biases of the Ising problem. If a dict, should be of the form {v: bias, …} where is a spin-valued variable and bias is its associated bias. If a list, it is treated as a list of biases where the indices are the variable labels.

  • J (dict[(variable, variable), bias]) – Quadratic biases of the Ising problem.

  • **kwargs – See the implemented sampling for additional keyword definitions.