dwavesystems / dwavesystems/dimod

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

Open
#1,067 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.