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

Get the quadratic bias of the specified interaction.

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

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

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

Returns

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.