dwave.cloud.solver.UnstructuredSolver.sample_ising¶
- UnstructuredSolver.sample_ising(linear, quadratic, offset=0, label=None, **params)[source]¶
Sample from the specified Ising model.
- Parameters
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.
label (str, optional) – Problem label you can optionally tag submissions with for ease of identification.
**params – Parameters for the sampling method, solver-specific.
- Returns
Note
To use this method, dimod package has to be installed.