dimod.AdjDictBQM.remove_interaction

AdjDictBQM.remove_interaction(u, v)[source]

Remove the interaction between variables u and v.

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

If there was an interaction to remove.

Return type:

bool

Raises:
  • ValueError – If either u or v is not a variable in the binary
  • quadratic model.