cirq.vis.plot_density_matrix

Generates a plot for a given density matrix.

  1. 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.
  2. 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

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