dwavesystems / dwavesystems/dwave-system
Unexpected cutoff behavior for CutOffComposite
- Dominant language
- Python
- Stars
- 98
- Forks
- 67
- Avg merge
- 7m
- Merged PRs (30d)
- 1
Description
**Description**
For `bqm = dimod.BinaryQuadraticModel({}, {'ab': -0.8, 'ac': -0.7}, 0, dimod.SPIN)` I expected that `CutOffComposite(AutoEmbeddingComposite(sampler), -.75).sample(bqm, num_reads=1000)` would remove interaction `ac` and found the result puzzling until I saw in the code:
```
(u, v, bias)
for (u, v), bias in original.quadratic.items()
if not comp(abs(bias), cutoff))
```
Either the absolute value for cutoff should be explicitly stated in the parameter description or `abs()` should be dropped.
I'm in this repo now anyway, if you say what your preferred behavior is, I can implement.
**To Reproduce**
See above.
**Expected behavior**
Stated above
**Environment:**
- OS: all
- Python version: all
**Additional context**
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.