wigner_fock.m
Wigner function of a bosonic mode state given as a density matrix in a truncated Fock basis, evaluated at the specified points of the phase space through the displaced parity operator (Royer, Phys. Rev. A 15, 449, 1977):
W(alpha)=(2/pi)*trace(rho*D(alpha)*P*D(alpha)')
where D(alpha)=expm(alpha*a'-conj(alpha)*a) is the displacement operator and P=expm(1i*pi*a'*a) is the photon number parity operator, both built from the ladder operators truncated to the dimension of the density matrix. The annihilation operator and the diagonal parity operator are built in the truncated Fock basis, and the displacement operator is computed with the matrix exponential at every point of the alpha array.
Syntax
W=wigner_fock(rho,alpha)
Parameters
rho - density matrix of the mode in the Fock basis
with the levels in ascending order, [n x n]
alpha - complex phase space coordinates, an array of
any size; the real part is the position qua-
drature and the imaginary part is the momen-
tum quadrature in the units where a coherent
state |beta> has W=(2/pi)*exp(-2*|alpha-beta|^2)
Outputs
W - Wigner function values, a real array of the
same size as alpha, normalised to a unit in-
tegral over the complex plane
Examples
See cavity_binomial_safe.m in examples/quantum_tech/circuit_qed directory.
Notes
The Fock basis must be large enough for the displaced states to fit: with the highest occupied level m of rho, n must be well above (sqrt(m)+|alpha|)^2 at every point, otherwise the truncated displacement operator distorts the values; pad the density matrix with zero rows and columns when the state itself lives in a smaller space, and check the unit integral on the grid in use. The density matrix must be Hermitian, positive semidefinite, and of unit trace.
See also
Version 2.13, authors: Ilya Kuprov