Skip to content

Commit

Permalink
Merge 2720ae2 into 7a584b5
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgang-n committed Feb 20, 2019
2 parents 7a584b5 + 2720ae2 commit 38a9ac8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/QuantumOptics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export bases, Basis, GenericBasis, CompositeBasis, basis,
randstate, randoperator, thermalstate, coherentthermalstate, phase_average, passive_state,
spin, SpinBasis, sigmax, sigmay, sigmaz, sigmap, sigmam, spinup, spindown,
subspace, SubspaceBasis, projector,
particle, PositionBasis, MomentumBasis, samplepoints, gaussianstate,
particle, PositionBasis, MomentumBasis, samplepoints, spacing, gaussianstate,
position, momentum, potentialoperator, transform,
nlevel, NLevelBasis, transition, nlevelstate,
manybody, ManyBodyBasis, fermionstates, bosonstates,
Expand Down
8 changes: 4 additions & 4 deletions src/particle.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ Create a Gaussian state around `x0` and` p0` with width `sigma`.
In real space the gaussian state is defined as
```math
\\Psi(x) = \\frac{\\sqrt{\\Delta x}}{\\pi^{1/4}\\sqrt{\\sigma}}
\\Psi(x) = \\frac{1}{\\pi^{1/4}\\sqrt{\\sigma}}
e^{i p_0 (x-\\frac{x_0}{2}) - \\frac{(x-x_0)^2}{2 \\sigma^2}}
```
and is connected to the momentum space definition
```math
\\Psi(p) = \\frac{\\sqrt{\\sigma} \\sqrt{\\Delta x}}{\\pi^{1/4}}
\\Psi(p) = \\frac{\\sqrt{\\sigma}}{\\pi^{1/4}}
e^{-i x_0 (p-\\frac{p_0}{2}) - \\frac{1}{2}(p-p_0)^2 \\sigma^2}
```
Expand All @@ -107,8 +107,8 @@ The state has the properties
* ``\\mathrm{Var}(p) = \\frac{1}{2 σ^2}``
Due to the numerically necessary discretization additional scaling
factora ``\\sqrt{Δx}`` and ``\\sqrt{Δp}`` are used so that
``Ψx_i = \\sqrt{Δ x} Ψ(x_i)`` and ``Ψp_i = \\sqrt{Δ x} Ψ(p_i)`` so
factors ``\\sqrt{Δx}`` and ``\\sqrt{Δp}`` are used so that
``\\langle x_i|Ψ\\rangle = \\sqrt{Δ x} Ψ(x_i)`` and ``\\langle p_i|Ψ\\rangle = \\sqrt{Δ p} Ψ(p_i)`` so
that the resulting Ket state is normalized.
"""
function gaussianstate(b::PositionBasis, x0::Real, p0::Real, sigma::Real)
Expand Down

0 comments on commit 38a9ac8

Please sign in to comment.