qp_distributions
qfunc(psi, xvec, yvec, g=2)
Husimi-Q function of a given state vector or density matrix at phase-space
points 0.5 * g * (xvec + i*yvec)
.
Parameters
state : Qarray A state vector or density matrix. This cannot have tensor-product structure.
xvec, yvec : array_like x- and y-coordinates at which to calculate the Husimi-Q function.
float, default: 2
Scaling factor for a = 0.5 * g * (x + iy)
. The value of g
is
related to the value of :math:\hbar
in the commutation relation
:math:[x,\,y] = i\hbar
via :math:\hbar=2/g^2
.
Returns
jnp.ndarray
Values representing the Husimi-Q function calculated over the specified
range [xvec, yvec]
.
Source code in jaxquantum/core/qp_distributions.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
|
wigner(psi, xvec, yvec, method='clenshaw', g=2)
Wigner function for a state vector or density matrix at points
xvec + i * yvec
.
Parameters
Qarray
A state vector or density matrix.
array_like
x-coordinates at which to calculate the Wigner function.
array_like
y-coordinates at which to calculate the Wigner function.
float, default: 2
Scaling factor for a = 0.5 * g * (x + iy)
, default g = 2
.
The value of g
is related to the value of hbar
in the commutation
relation [x, y] = i * hbar
via hbar=2/g^2
.
string {'clenshaw', 'iterative', 'laguerre', 'fft'}, default: 'clenshaw'
Only 'clenshaw' is currently supported.
Select method 'clenshaw' 'iterative', 'laguerre', or 'fft', where 'clenshaw'
and 'iterative' use an iterative method to evaluate the Wigner functions for density
matrices :math:|m><n|
, while 'laguerre' uses the Laguerre polynomials
in scipy for the same task. The 'fft' method evaluates the Fourier
transform of the density matrix. The 'iterative' method is default, and
in general recommended, but the 'laguerre' method is more efficient for
very sparse density matrices (e.g., superpositions of Fock states in a
large Hilbert space). The 'clenshaw' method is the preferred method for
dealing with density matrices that have a large number of excitations
(>~50). 'clenshaw' is a fast and numerically stable method.
Returns
array
Values representing the Wigner function calculated over the specified range [xvec,yvec].
References
Ulf Leonhardt, Measuring the Quantum State of Light, (Cambridge University Press, 1997)
Source code in jaxquantum/core/qp_distributions.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
|