dimod.AdjMapBQM.get_quadratic

AdjMapBQM.get_quadratic(self, u, v, default=None)

Get the quadratic bias of the specified interaction.

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

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

  • default (number, optional) – Value to return if there is no interactions between u and v.

Returns

The quadratic bias of (u, v).

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

  • ValueError – If (u, v) is not an interaction and default is None.