dwavesystems / dwavesystems/dimod
Add constraint/objective construction from NumPy arrays
Open
enhancement
- Dominant language
- Python
- Stars
- 143
- Forks
- 91
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 3
Description
Requested by @mhramani https://github.com/dwavesystems/dimod/pull/1307#pullrequestreview-1276064366.
Something like
```python
indices = [0, 1, 5]
biases = [1, 2, 3]
cqm.add_constraint((indices, biases), "==", 5)
```
which would be interpreted as a linear constraint $x_0 + 2x_1 + 3x_5 = 5$.
Contributor guide
Assessment
This issue has not been assessed yet.