dwavesystems / dwavesystems/dimod

Sampler.sample_qubo should explicitly call out that non-unique interactions are added

Open
#493 1 comment 0 reactions 0 assignees View on GitHub
enhancement question
Dominant language
Python
Stars
143
Forks
91
Avg merge
1h 24m
Merged PRs (30d)
3

Description

**Application**
In Ocean, `Q = {('a', 'b'): -1, ('b', 'a'): 1}` is equivalent to `Q = {('a', 'b'): 0}`. In the BQM-as-polynomial formulation this is (hopefully) clear.

However, for those users who are used to thinking of QUBOs as matrices, a common point of confusion is whether the matrix should be upper-triangular or symmetric, and whether the biases are added, ignored or treated separately.

**Proposed Solution**
In the docstring for the BQM, we call out the addition [explicitly](https://github.com/dwavesystems/dimod/blob/306f43063bec4c4eed97f936aafc7deaaf700ecd/dimod/binary_quadratic_model.py#L95). We should also add this to the docstring for `Sampler.sample_qubo`.

**Additional Context**
There may be other places in the documentation that we should call this out. @vgoliber

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.