Wigner

wigner_discretized

Calculates the discretized Wigner function for a single mode using Clenshaw recursion.

wigner_discretized

mrmustard.physics.wigner.wigner_discretized(rho, q_vec, p_vec)[source]

Calculates the discretized Wigner function for a single mode using Clenshaw recursion.

Uses Clenshaw summations for the Wigner coefficients \(W_{mn}\) in \(W = \sum_{mn} W_{mn} |m\rangle\langle n|\), adapted from the routine in QuTiP <http://qutip.org/docs/4.0.2/apidoc/functions.html?highlight=wigner#qutip.wigner.wigner>`_, which is released under the BSD license:

Copyright (C) 2011 and later, P.D. Nation, J.R. Johansson, A.J.G. Pitchford, C. Granade, and A.L. Grimsmo. All rights reserved.

Parameters:
  • rho (complex array) – the density matrix of the state in Fock representation

  • q_vec (array) – array of discretized \(q\) quadrature values

  • p_vec (array) – array of discretized \(p\) quadrature values

Returns:

array containing the discretized Wigner function, and the Q and

P coordinates (in meshgrid form) in which the function is calculated

Return type:

tuple(array, array, array)