dimod.AdjDictBQM.set_quadratic

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

Set the quadratic bias of an interaction specified by its variables.

Parameters
  • u (hashable) – A variable in the binary quadratic model.

  • v (hashable) – A variable in the binary quadratic model.

  • b (numeric) – The quadratic bias to set for interaction (u, v)

Raises

TypeError – If u or v is not hashable.