dwavesystems / dwavesystems/dwave-ocean-sdk
Switch quadratic interaction in diet example to ints
- Dominant language
- Python
- Stars
- 539
- Forks
- 192
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 2
Description
**Description**
[Diet Example](https://docs.ocean.dwavesys.com/en/stable/examples/hybrid_cqm_diet.html#variables) has this code:
```
>>> quantities[0] * quantities[1]
QuadraticModel({'rice': 0.0, 'tofu': 0.0}, {('tofu', 'rice'): 1.0}, 0.0,
{'rice': 'REAL', 'tofu': 'REAL'}, dtype='float64')
```
It should be switched to
```
>>> quantities[2] * quantities[5]
Out[7]: QuadraticModel({'banana': 0.0, 'avocado': 0.0}, {('avocado', 'banana'): 1.0}, 0.0, {'banana': 'INTEGER', 'avocado': 'INTEGER'}, dtype='float64')
```
**To Reproduce**
See above
**Expected behavior**
Need int vars, not real
**Environment:**
- OS: Any
- Python version: Any
**Additional context**
CC @tmittal7
And remove the ``# doctest: +SKIP`` that kept us from catching this earlier.
Contributor guide
Assessment
This issue has not been assessed yet.