Visualizing Problems¶
Typically you use the show()
function on a
SampleSet
returned from the quantum computer or on the SAPI
problem ID[1]. Other problem inputs, such as the binary
quadratic model—in BQM, Ising, or QUBO formats—and an embedding, are
optional.
However, to visualize a logical problem if
dimod‘s EmbeddingComposite
or derived classes are not used, you must supply the embedding.
Below are some options for providing problem data to the
show()
function, where
response
was returned for a problem defined directly on physical qubits and
sampleset
returned from a problem submitted using
EmbeddingComposite
:
show(response)
show('69ace80c-d3b1-448a-a028-b51b94f4a49d') # Using a SAPI problem ID
show((h, J), response)
show(Q, response)
show((h, J), response, dict(embedding=embedding, chain_strength=5))
show(sampleset)
show(bqm, sampleset)
To see detailed parameter information, see the relevant function below.
The show()
function supports flow control for scripts
with the block
parameter. For example, the default setting of once
(dwave.inspector.Block.ONCE
) blocks until your problem is loaded from the
inspector web server and forever
blocks until you terminate with a
Ctrl+C/SIGTERM.
Footnotes
Classes¶
- class Block(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Flow-control settings for scripts.
An enum with values:
NEVER
,ONCE
,FOREVER
. The default setting ofonce
(dwave.inspector.Block.ONCE
) blocks until your problem is loaded from the inspector web server.Examples
This example does not block while the problem is loaded.
>>> dwave.inspector.show(response, block='never')
Functions¶
|
Auto-detect and forward to the |
|
Visualize a quantum machine instruction (QMI) response and binary quadratic model. |
|
Visualize a returned sampleset and binary quadratic model. |
|
Visualize a quantum machine instruction (QMI). |