dimod
dimod copied to clipboard
Add `vartype` argument to `QM.add_linear[_from]` and `QM.add_quadratic[_from]`
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')