dwavesystems / dwavesystems/dimod

Add constraint/objective construction from NumPy arrays

Open
#1,308 4 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

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

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.