dimod.binary.BinaryQuadraticModel.set_linear#

BinaryQuadraticModel.set_linear(v: Hashable, bias: float | floating | integer)[source]#

Set the linear bias of of a variable.

Parameters:

v – Variable in the binary quadratic model.

Raises:

TypeError – If v is not hashable.