plot_wigner_function

qctrlvisualizer.plot_wigner_function(wigner_function: numpy.ndarray, position: numpy.ndarray, momentum: numpy.ndarray, contour_count: int = 100, *, figure: Optional[matplotlib.figure.Figure, None] = None)

Create a contour plot of the specified Wigner function.

Parameters:
  • wigner_function (np.ndarray) – The Wigner function values. Only the real part of this array will be plotted. Must be a 2D array of shape (L, K).

  • position (np.ndarray) – The dimensionless position vector. Must be a strictly increasing 1D array of length L.

  • momentum (np.ndarray) – The dimensionless momentum vector. Must be a strictly increasing 1D array of length K.

  • contour_count (int, optional) – The number of contour lines, the larger the value the finer the contour plot will be. Defaults to 100.

  • figure (matplotlib.figure.Figure, optional) – A matplotlib Figure in which to place the plots. If passed, its dimensions and axes will be overridden.