dimod.binary.BinaryQuadraticModel.set_quadratic#

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

Set the quadratic bias of interaction (u, v).

Parameters:
  • u – Variable in the binary quadratic model.

  • v – Variable in the binary quadratic model.

Raises:

TypeError – If u or v is not hashable.