dimod.DiscreteQuadraticModel.set_quadratic#

DiscreteQuadraticModel.set_quadratic(u, v, biases)[source]#

Set biases associated with the interaction between u and v.

Parameters:
  • u – A variable in the discrete quadratic model.

  • v – A variable in the discrete quadratic model.

  • biases (array-like/dict) – The quadratic biases. If a dict, then a dictionary of the form {case_u, case_v: bias, …}. Otherwise, then should be, a num_cases(u)() by num_cases(v)() array-like.