dwavesystems / dwavesystems/dimod
Add `vartype` argument to `QM.add_linear[_from]` and `QM.add_quadratic[_from]`
Open
enhancement
- Dominant language
- Python
- Stars
- 143
- Forks
- 91
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 3
Description
It would save on needing to do things like
```python
qm.add_linear(qm.add_variable('BINARY'), 1.5)
```
and would improve performance for the `_from` methods, e.g.
```python
qm.add_linear_from(((v, 0) for v in range(5)), 'BINARY')
```
Contributor guide
Assessment
This issue has not been assessed yet.