dimod.AdjMapBQM.from_ising¶
-
classmethod
AdjMapBQM.
from_ising
(h, J, offset=0)¶ Create a binary quadratic model from an Ising problem.
- Parameters
h (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.
J (dict[(variable, variable), bias]) – Quadratic biases of the Ising problem.
offset (optional, default=0.0) – Constant offset applied to the model.
- Returns
A spin-valued binary quadratic model.