dwavesystems / dwavesystems/dimod
Add a method to specify the value domain of a variable in CQM
- Dominant language
- Python
- Stars
- 143
- Forks
- 91
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 3
Description
**Description**
Is it possible to add a method to specify the value domain of an integer variable while defining it in CQM? For example, I can define an integer variable by `x = dimod.Integer(lower_bound=0, upper_bound=10)`. However, in some cases, I would like to define it with a specific domain (maybe a list) such as `x = dimod.Integer(domain=[0, 1, 3, 4, 8])`.
**Possible solution**
I noticed this is similar to the `fix_variable()` method in BQM. Since we can *fix* the value of a binary variable, maybe it is also necessary to fix some possible values for an integer variable.
Or, is it possible to add a `!=` constraint to CQM?
Would you please tell me if I missed some information?
Contributor guide
Assessment
This issue has not been assessed yet.