BinaryQuadraticModel.add_linear_from(linear: Mapping[Hashable, float | floating | integer] | Iterable[Tuple[Hashable, float | floating | integer]])[source]#

Add variables and linear biases to a binary quadratic model.


linear – Variables and their associated linear biases, as either a dict of form {v: bias, ...} or an iterable of (v, bias) pairs, where v is a variable and bias is its associated linear bias.