dimod.AdjVectorBQM.add_interaction

AdjVectorBQM.add_interaction(u, v, bias)

Add an interaction and/or quadratic bias to a binary quadratic model.

Parameters:
  • u (variable) – One of the pair of variables to add to the model. Can be any python object that is a valid dict key.
  • v (variable) – One of the pair of variables to add to the model. Can be any python object that is a valid dict key.
  • bias (bias) – Quadratic bias associated with u, v. If u, v is already in the model, this value is added to the current quadratic bias.