|View source on GitHub|
Generates a plot for a given density matrix.
cirq.vis.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
||The density matrix to visualize|
||If true, the density matrix values are also shown as text labels|
||The axes to plot on|
||Title of the plot|