Visualization
Draw circuit diagrams and plot experimental results, conversion graphs, and more.
API Reference: qbraid.visualization
Draw Circuit Diagrams
qBraid’s circuit_drawer
function takes in any type of supported quantum circuit and draws the corresponding visualization.
Here’s an example using braket
and cirq
:
Draw OpenQASM 3 circuits
The qasm3_drawer
takes in a string of OpenQASM3 code and outputs an ASCII representation of the described circuit.
Plot Experimental Results
Gather the measurement counts and plot the histogram data for any result
of type qbraid.runtime.GateModelJobResult
:
Or, using the same measurement counts data, plot the probability distribution:
Or, plot a batch of measurement counts for any list[qbraid.runtime.GateModeResultData]
:
Using the qBraid runtime job and results primitives, experimental data is returned in a standardized format, facilitating straightforward comparisons and benchmarking of results across different providers and backends.
Plot Transpiler Conversions
Plot all supported conversions between registered program types available through the qbraid.transpiler
: