Gabs.jl is a numerical tooling package for simulating Gaussian quantum information.
Gaussian states and operators have the convenient property that they can be characterized by low-dimensional matrices in the phase space representation. Thus, a large class of continuous variable quantum information can be efficiently simulated on a classical computer. Gabs.jl provides a high-level Julia interface for straightforward and high performance implementations of Gaussian quantum systems.
See the detailed suggested readings & references page for a background on quantum information with Gaussian states.
To install Gabs.jl, start Julia and run the following command:
using Pkg
Pkg.add("Gabs")
To use the package, run the command
using Gabs
Now, the entire library is loaded into the current workspace, with access to its high-level interface and predefined objects.
julia> basis = QuadPairBasis(1)
QuadPairBasis(1)
julia> state = vacuumstate(basis) ⊗ coherentstate(basis, 1.0-im)
GaussianState for 2 modes.
symplectic basis: QuadPairBasis
mean: 4-element Vector{Float64}:
0.0
0.0
1.4142135623730951
-1.4142135623730951
covariance: 4×4 Matrix{Float64}:
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0
julia> op = beamsplitter(basis ⊕ basis, 0.75)
GaussianUnitary for 2 modes.
symplectic basis: QuadPairBasis
displacement: 4-element Vector{Float64}:
0.0
0.0
0.0
0.0
symplectic: 4×4 Matrix{Float64}:
0.5 0.0 0.866025 0.0
0.0 0.5 0.0 0.866025
-0.866025 0.0 0.5 0.0
0.0 -0.866025 0.0 0.5
julia> apply!(state, op)
GaussianState for 2 modes.
symplectic basis: QuadPairBasis
mean: 4-element Vector{Float64}:
1.2247448713915892
-1.2247448713915892
0.7071067811865476
-0.7071067811865476
covariance: 4×4 Matrix{Float64}:
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0
julia> ptrace(state, 1)
GaussianState for 1 mode.
symplectic basis: QuadPairBasis
mean: 2-element Vector{Float64}:
1.2247448713915892
-1.2247448713915892
covariance: 2×2 Matrix{Float64}:
1.0 0.0
0.0 1.0