dimod.QuadraticModel.set_linear

QuadraticModel.set_linear(v: Hashable, bias: Union[int, float, numpy.number])[source]

Set the linear bias of a variable in the quadratic model.

Parameters
  • v – Variable in the quadratic model.

  • bias – Linear bias to set for variable v.

Raises

TypeError – If v is not hashable.