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
|