dwavesystems / dwavesystems/dwave-system
importing inspector causes qpu call to fail with chain break warning.
- Dominant language
- Python
- Stars
- 98
- Forks
- 67
- Avg merge
- 7m
- Merged PRs (30d)
- 1
Description
**Description**
Including `from dwave import inspector` causes qpu call to fail, even though inspector is not used.
Returns `KeyError: 542`
Gives messages along the way:
`warninghandler.chain_break(response, embedding)`
`broken = broken_chains(ground, chains)`
**To Reproduce**
An example bqm and embedding are included in zip file. The keys in the embedding may need to be changed from string to tuple first.
`
from dwave.system import DWaveSampler
from dwave.preprocessing.composites import FixVariablesComposite
from dwave import inspector
qpu = DWaveSampler()
sampler = FixedEmbeddingComposite(qpu, embedding=embedding)
sample_set = sampler.sample(bqm, num_reads=num_reads)
`
**Expected behavior**
Returns dimod sample set
**Environment:**
- OS: Mac OS 11.5.2
- Python version: 3.8
[Austin-Roberts-bqm-embedding.zip](https://github.com/dwavesystems/dwave-system/files/8641983/Austin-Roberts-bqm-embedding.zip)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the failure with DWaveSampler, FixedEmbeddingComposite, the supplied BQM and embedding, and the otherwise unused `from dwave import inspector` import. Trace the `warninghandler.chain_break(response, embedding)` and `broken_chains(ground, chains)` entry points to identify why the call raises `KeyError: 542`; done means the same example returns a dimod sample set without the chain-break warning failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100