dimod.AdjVectorBQM.add_interactions_from

AdjVectorBQM.add_interactions_from(quadratic)

Add interactions and/or quadratic biases to a binary quadratic model.

Parameters

quadratic (dict/iterable) – Collection of interactions and their associated quadratic bias. If a dict, should be of the form {(u, v): bias, …} where u and v are variables in the model and bias is the associated quadratic bias. Otherwise, should be an iterable of (u, v, bias) triplets.