UnstructuredSolver.sample_ising(linear, quadratic, offset=0, **params)

Sample from the specified Ising model.

  • linear (dict/list) – Linear biases of the Ising problem. If a dict, should be of the form {v: bias, …} where v 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.
  • quadratic (dict[(variable, variable), bias]) – Quadratic terms of the model (J), stored in a dict. With keys that are 2-tuples of variables and values are quadratic biases associated with the pair of variables (the interaction).
  • offset (optional, default=0) – Constant offset applied to the model.
  • **params – Parameters for the sampling method, solver-specific.



To use this method, dimod package has to be installed.