dimod.binary.BinaryQuadraticModel.to_ising#
- BinaryQuadraticModel.to_ising()[source]#
Convert a binary quadratic model to Ising format.
If the binary quadratic model’s vartype is not
Vartype.SPIN
, values are converted.- Returns:
3-tuple of form
(linear, quadratic, offset)
, wherelinear
is a dict of linear biases,quadratic
is a dict of quadratic biases, andoffset
is a number that represents the constant offset of the binary quadratic model.- Return type: