Sample quantum initial states commonly encountered in quantum phase space simulations of Bose fields, including those encountered in quantum optics and Bose-Einstein condensates.
Wigner and positive-P distributions are available, being the most useful for dynamical simulations.
Available distributions are glauberP, positiveP, wigner, positiveW, and husimiQ.
julia> ]add PhaseSpaceToolsjulia> using PhaseSpaceTools
julia> α = 1.0 + 2.0im
julia> state = Coherent(α)
julia> samples, samples_conj = positiveP(state, 4)
julia> mean(samples)
1.0 + 2.0im
julia> real(mean(samples_conj .* samples))
5.0For coherent states, the +P representation is deterministic: samples and samples_conj are fixed at α and conj(α).
BogoliubovCoherentCrescentFockSqueezedSqueezedTwoModeThermal
A coherent state |α⟩ is sampled as
α = 1.0+im*2.0 # coherent amplitude
s = Coherent(α) # define state |α⟩
N = 1000 # number of samples
a,a⁺ = positiveP(s,N)This is a special case where the two phase space variables a and a⁺ are complex conjugate, and non-stochastic in the +P representation.
An approximate Fock state sampler in the Wigner representation:
n = 100
s = Fock(n) # define number state |n⟩
N = 1000 # number of samples
a,a⁺ = wigner(s,N)Provides an approximate sampling of W that reproduces operator averages for large n. For small n, use with care: the implementation warns that the approximation is only valid when n ≫ 1.
See /examples/sampling.ipynb for more usage.
Numerical representation of quantum states in the positive-P and Wigner representations,
M K Olsen, A S Bradley,
Optics Communications 282, 3924 (2009)
