cirq.plot_density_matrix
Generates a plot for a given density matrix.
cirq.plot_density_matrix(
matrix: np.ndarray,
ax: Optional[plt.Axes] = None,
*,
show_text: bool = False,
title: Optional[str] = None
) -> plt.Axes
- Each entry of the density matrix, a complex number, is plotted as an
Argand Diagram where the partially filled red circle represents the magnitude
and the line represents the phase angle, going anti-clockwise from positive x - axis.
- The blue rectangles on the diagonal elements represent the probability
of measuring the system in state $|i
angle$.
Rendering scheme is inspired from https://algassert.com/quirk
Args |
matrix
|
The density matrix to visualize
|
show_text
|
If true, the density matrix values are also shown as text labels
|
ax
|
The axes to plot on
|
title
|
Title of the plot
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."],[],[]]