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) – A 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 there associated quadratic bias. Otherwise, whould be an iterable of (u, v, bias) triplets.