dimod.binary.BinaryQuadraticModel.to_qubo#
- BinaryQuadraticModel.to_qubo() Tuple[Mapping[Tuple[Hashable, Hashable], float | floating | integer], float | floating | integer] [source]#
Convert a binary quadratic model to QUBO format.
If the binary quadratic model’s vartype is not
Vartype.BINARY
, values are converted.- Returns:
2-tuple of form
({(u, v): bias, ...}, offset)
, whereu
,v
, are binary-valued variables andbias
is their associated coefficient, andoffset
is a number that represents the constant offset of the binary quadratic model.- Return type: