dimod icon indicating copy to clipboard operation
dimod copied to clipboard

Add `vartype` argument to `QM.add_linear[_from]` and `QM.add_quadratic[_from]`

Open arcondello opened this issue 4 years ago • 0 comments

It would save on needing to do things like

qm.add_linear(qm.add_variable('BINARY'), 1.5)

and would improve performance for the _from methods, e.g.

qm.add_linear_from(((v, 0) for v in range(5)), 'BINARY')

arcondello avatar Dec 22 '21 00:12 arcondello