SecondQuantizedAlgebra.jl
Symbolic algebra for quantum operators
Build and manipulate second-quantized operator expressions in Julia with canonical arithmetic, indexed sums, and exact transformations.
Canonical operator algebra
Apply commutation relations, local identities, normal ordering, and simplification directly to symbolic operator expressions.
Multiple quantum algebras
Combine bosonic, N-level, Pauli, spin, and phase-space operators in composite Hilbert spaces.
Indexed many-body systems
Work with symbolic sums and indexed operator families, including automatic diagonal splitting and free-index constraints.
Unitary transformations
Construct displacement, rotation, squeezing, Bogoliubov, and generator-derived unitary transformations symbolically.
Numerical bridges
Convert symbolic operators to QuantumOpticsBase or QuantumToolbox representations when numerical evaluation is needed.
SecondQuantizedAlgebra.jl provides the noncommutative symbolic layer used to build and transform quantum-operator expressions before numerical simulation. The algebra originated in QuantumCumulants.jl and was separated into a reusable package as its scope expanded (Plankensteiner et al., 2022).
Quick start
Install the package with Julia's package manager:
pkg> add SecondQuantizedAlgebraConstruct a composite cavity–atom space and manipulate its operators directly:
using SecondQuantizedAlgebrahc = FockSpace(:cavity)ha = NLevelSpace(:atoms, 2)h = hc ⊗ ha@qnumbers b::Destroy(h, 1)σ(i, j) = Transition(h, :σ, i, j, 2)@variables g ΔH = Δ * b' * b + g * (b * σ(2, 1) + b' * σ(1, 2))simplify(commutator(H, b))