qiskit-documentation/docs/api/qiskit/0.29/visualization.mdx

94 lines
8.9 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: visualization (v0.29)
description: API reference for qiskit.visualization in qiskit v0.29
in_page_toc_min_heading_level: 2
python_api_type: module
python_api_name: qiskit.visualization
---
<span id="module-qiskit.visualization" />
<span id="qiskit-visualization" />
<span id="visualizations-qiskit-visualization" />
# Visualizations
`qiskit.visualization`
## Counts and State Visualizations
| | |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| [`plot_histogram`](qiskit.visualization.plot_histogram "qiskit.visualization.plot_histogram")(data\[, figsize, color, …]) | Plot a histogram of data. |
| [`plot_bloch_vector`](qiskit.visualization.plot_bloch_vector "qiskit.visualization.plot_bloch_vector")(bloch\[, title, ax, …]) | Plot the Bloch sphere. |
| [`plot_bloch_multivector`](qiskit.visualization.plot_bloch_multivector "qiskit.visualization.plot_bloch_multivector")(state\[, title, …]) | Plot the Bloch sphere. |
| [`plot_state_city`](qiskit.visualization.plot_state_city "qiskit.visualization.plot_state_city")(state\[, title, figsize, …]) | Plot the cityscape of quantum state. |
| [`plot_state_hinton`](qiskit.visualization.plot_state_hinton "qiskit.visualization.plot_state_hinton")(state\[, title, figsize, …]) | Plot a hinton diagram for the density matrix of a quantum state. |
| [`plot_state_paulivec`](qiskit.visualization.plot_state_paulivec "qiskit.visualization.plot_state_paulivec")(state\[, title, figsize, …]) | Plot the paulivec representation of a quantum state. |
| [`plot_state_qsphere`](qiskit.visualization.plot_state_qsphere "qiskit.visualization.plot_state_qsphere")(state\[, figsize, ax, …]) | Plot the qsphere representation of a quantum state. |
## Device Visualizations
| | |
| --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [`plot_gate_map`](qiskit.visualization.plot_gate_map "qiskit.visualization.plot_gate_map")(backend\[, figsize, …]) | Plots the gate map of a device. |
| [`plot_error_map`](qiskit.visualization.plot_error_map "qiskit.visualization.plot_error_map")(backend\[, figsize, show\_title]) | Plots the error map of a given backend. |
| [`plot_circuit_layout`](qiskit.visualization.plot_circuit_layout "qiskit.visualization.plot_circuit_layout")(circuit, backend\[, view]) | Plot the layout of a circuit transpiled for a given target backend. |
## Circuit Visualizations
| | |
| ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| [`circuit_drawer`](qiskit.visualization.circuit_drawer "qiskit.visualization.circuit_drawer")(circuit\[, scale, filename, …]) | Draw the quantum circuit. |
| [`DefaultStyle`](qiskit.visualization.qcstyle.DefaultStyle "qiskit.visualization.qcstyle.DefaultStyle")() | Creates a Default Style dictionary |
## DAG Visualizations
| | |
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [`dag_drawer`](qiskit.visualization.dag_drawer "qiskit.visualization.dag_drawer")(dag\[, scale, filename, style]) | Plot the directed acyclic graph (dag) to represent operation dependencies in a quantum circuit. |
## Pass Manager Visualizations
| | |
| --------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| [`pass_manager_drawer`](qiskit.visualization.pass_manager_drawer "qiskit.visualization.pass_manager_drawer")(pass\_manager\[, …]) | Draws the pass manager. |
## Pulse Visualizations
| | |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [`draw`](qiskit.visualization.pulse_v2.draw "qiskit.visualization.pulse_v2.draw")(program\[, style, backend, time\_range, …]) | Generate visualization data for pulse programs. |
| [`IQXStandard`](qiskit.visualization.pulse_v2.IQXStandard "qiskit.visualization.pulse_v2.IQXStandard")(\*\*kwargs) | Standard pulse stylesheet. |
| [`IQXSimple`](qiskit.visualization.pulse_v2.IQXSimple "qiskit.visualization.pulse_v2.IQXSimple")(\*\*kwargs) | Simple pulse stylesheet without channel notation. |
| [`IQXDebugging`](qiskit.visualization.pulse_v2.IQXDebugging "qiskit.visualization.pulse_v2.IQXDebugging")(\*\*kwargs) | Pulse stylesheet for pulse programmers. |
## Timeline Visualizations
| | |
| ---------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [`timeline_drawer`](qiskit.visualization.timeline_drawer "qiskit.visualization.timeline_drawer")(program\[, style, …]) | Generate visualization data for scheduled circuit programs. |
| [`draw`](qiskit.visualization.timeline.draw "qiskit.visualization.timeline.draw")(program\[, style, time\_range, …]) | Generate visualization data for scheduled circuit programs. |
## Single Qubit State Transition Visualizations
| | |
| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [`visualize_transition`](qiskit.visualization.visualize_transition "qiskit.visualization.visualize_transition")(circuit\[, trace, …]) | Creates animation showing transitions between states of a single qubit by applying quantum gates. |
<span id="array-matrix-visualizations" />
## Array/Matrix Visualizations
| | |
| ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| [`array_to_latex`](qiskit.visualization.array_to_latex "qiskit.visualization.array_to_latex")(array\[, precision, prefix, …]) | Latex representation of a complex numpy array (with dimension 1 or 2) |
## Exceptions
| | |
| -------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| [`VisualizationError`](qiskit.visualization.VisualizationError "qiskit.visualization.VisualizationError")(\*message) | For visualization specific errors. |