dimod.QuadraticModel.set_linear#
- QuadraticModel.set_linear(v: Hashable, bias: float | floating | integer)[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.
ValueError – If the variable is not in the model.