dimod.QuadraticModel.set_upper_bound#

QuadraticModel.set_upper_bound(v: Hashable, ub: float)[source]#

Set the upper bound for a variable.

Parameters:
  • v – Variable in the quadratic model.

  • ub – Upper bound to set for variable v.

Raises:

ValueError – If v is a SPIN or BINARY variable.