dimod.AdjDictBQM.set_quadratic

AdjDictBQM.set_quadratic(u, v, bias)[source]

Set the quadratic bias of (u, v).

Parameters:
  • u (hashable) – A variable in the binary quadratic model.
  • v (hashable) – A variable in the binary quadratic model.
  • b (numeric) – The linear bias of v.
Raises:

TypeError – If u or v is not hashable.