dwavesystems / dwave-system

An API for easily incorporating the D-Wave system as a sampler, either directly or through Leap's cloud-based hybrid samplers
https://docs.ocean.dwavesys.com/
Apache License 2.0
87 stars 62 forks source link

importing inspector causes qpu call to fail with chain break warning. #451

Open AustinJRoberts opened 2 years ago

AustinJRoberts commented 2 years ago

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:

Austin-Roberts-bqm-embedding.zip