How do I call the problem inspector?

The problem inspector is a very useful tool for learning about and fine tuning problem embeddings. You're probably eager to try it out! So how exactly do you call it?

First you need to import the inspector. Then you can use the show function to display your original problem and the response from the sampler. Here's a simple example.

import dwave.inspector as inspector
from dwave.system import DWaveSampler, EmbeddingComposite

h = {'a': -1, 'b': 2, 'c': 1}
J = {('a', 'b'): 1.5, ('a', 'c'): -1, ('b', 'c'): 3}

sampler = EmbeddingComposite(DWaveSampler())
sampleset = sampler.sample_ising(h, J, num_reads=5)

inspector.show(sampleset)

The example above will invoke the problem inspector and display something like:

mceclip0.png

For more information on using the problem inspector take a look at the documentation here.

To see the problem inspector in action check out our

 

Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.