dimod.bqm.adjarraybqm.AdjArrayBQM.set_quadratic

AdjArrayBQM.set_quadratic(self, u, v, Bias b)

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

ValueError – If no interaction (u, v) exists in the binary quadratic model.