dimod.binary.BinaryQuadraticModel.from_qubo#
- classmethod BinaryQuadraticModel.from_qubo(Q: Mapping, offset: float = 0)[source]#
Create a binary quadratic model from a QUBO problem.
- Parameters:
Q – Coefficients of a quadratic unconstrained binary optimization (QUBO) problem as a dict of form
{(u, v): bias, ...}
, whereu
,v
, are binary-valued variables andbias
is their associated coefficient.offset (optional, default=0.0) – Constant offset applied to the model.
- Returns:
A binary-valued binary quadratic model.