Construct a binary polynomial from a higher-order Ising problem.
h (dict) – The linear biases.
J (dict) – The higher-order biases.
offset (optional, default=0.0) – Constant offset applied to the model.
BinaryPolynomial
Examples
>>> poly = dimod.BinaryPolynomial.from_hising({'a': 2}, {('a', 'b'): -1}, 0) >>> poly.degree 2