dimod.AdjMapBQM.from_qubo

classmethod AdjMapBQM.from_qubo(Q, offset=0)

Create a binary quadratic model from a QUBO problem.

Parameters:
  • Q (dict) – Coefficients of a quadratic unconstrained binary optimization (QUBO) problem. Should be a dict of the form {(u, v): bias, …} where u, v, are binary-valued variables and bias is their associated coefficient.
  • offset (optional, default=0.0) – Constant offset applied to the model.
Returns:

A binary-valued binary quadratic model.