plot_mode
plot_mode#
- plot_mode(means, cov, n=100, x_range=None, y_range=None, ax=None, **kwargs)[source]#
Plots the Wigner function of a single mode state.
- Parameters
means (ArrayLike) – The means of the X and P quadratures of the quantum state. For example, a coherent state \(lpha = 3+4i\) has means defined as :math:`egin{bmatrix} 3 & 4 end{bmatrix}’. The shape of the means must be a length of 2.
cov (ArrayLike) – The covariance matrix of the quantum state. For example, all coherent states has a covariance matrix of \(egin{bmatrix} 1/4 & 0 \ 0 & 1/4 \end{bmatrix}\). The shape of the matrix must be 2 x 2.
n (int) – The number of points per axis to plot. Default is 100.
x_range (tuple) – The range of the x axis to plot as a tuple, (eg. (-5,5)). Defualt attempts to find the range automatically.
y_range (tuple) – The range of the y axis to plot as a tuple, (eg. (-5,5)). Defualt attempts to find the range automatically.
ax (matplotlib.axes.Axes) – The axis to plot on, by default it creates a new figure.
**kwargs – Keyword arguments to pass to matplotlib.pyplot.contourf.