API Reference

SLH type

SLHQuantumSystems.SLHType

SLH(name, inputs, outputs, S, L, H)

An SLH triple describes an open quantum system. See Combes, arXiv.1611.00375

The name of the system should be unique. When multiple systems are combined, the names of their inputs and outputs will have the system name appended to them. The inputs and outputs describe 'ports' where signals leave and enter the system. Quantum systems must have the same number of inputs and outputs, which we denote by n.

size(S) = (n, n) <- S is an nxn matrix

size(L) = (n,)

size(H) = ()

The two ways of combining SLH systems are concatenate() and feedbackreduce()

source

SLH Operations

SLHQuantumSystems.concatenateFunction

concatenate(name, syslist::Vector{SLH})

creates a composite system with no interconnections. Combes eq. 59

When systems are concatenated, the names of their inputs, outputs, operators, parameters, and Hilbert spaces are 'promoted' by prepending the name of the system to the existing name. This prevents name collisions as long as all SLHSystems are created with a unique name.

source
SLHQuantumSystems.feedbackreduceFunction

feedbackreduce(A::SLH,output,input)

Connects the output port to the input port, reducing the number of outputs and inputs by one each. Combes eq 61.

source

Symbolic Utilities

SLHQuantumSystems.get_qnumbersFunction
get_qnumbers(expr)

Extract all quantum operators from an expression.

Arguments

  • expr: A symbolic expression

Returns

  • Set of quantum operators found in the expression
source
SLHQuantumSystems.get_cnumbersFunction
get_cnumbers(expr)

Extract all symbolic parameters from an expression.

Arguments

  • expr: A symbolic expression

Returns

  • Set of symbolic parameters found in the expression
source
SLHQuantumSystems.get_additive_termsFunction
get_additive_terms(expr)

Extract additive terms from a symbolic expression.

Takes a symbolic expression and returns a list of terms that contain no addition, only multiplication. Summing all returned terms results in the original expression.

Arguments

  • expr: A symbolic expression

Returns

  • Vector of terms
source

Subspaces and Mode Parameters

SLHQuantumSystems.param_keyFunction
param_key(mode::Subspace, base::Symbol) → Symbol

Return the parameter dict key for base in the context of mode. For an unnamed mode (mode.name == ""), returns base directly. For a named mode, returns Symbol(mode.name, "_", base).

This is the single source of truth for parameter naming: all functions that look up mode parameters should use this rather than positional indexing.

source
SLHQuantumSystems.quadrature_scaleFunction
quadrature_scale(subsys::MechanicalMode, params) → [x_zpf, p_zpf]

SI conversion factors for the mechanical quadrature state vector. The dimensionless quadrature states relate to physical quantities as: xphys = √2 · xzpf · q pphys = √2 · pzpf · r where q = (b+b†)/√2 and r = i(b†-b)/√2 are the SLH quadrature coordinates.

source

State Space

SLHQuantumSystems.LadderBasisType

Ladder (creation/annihilation) operator basis. State vector ordered as (a₁, a₁†, a₂, a₂†, ...) after interlacing. ABCD matrices are complex-valued.

source
SLHQuantumSystems.QuadratureBasisType

Quadrature (amplitude/phase) operator basis. State vector ordered as (X₁, P₁, X₂, P₂, ...). All modes use the same 1/√2 unitary transform from the ladder basis. For optical modes: X = (a+a†)/√2, P = i(a†-a)/√2. For mechanical modes: q = (b+b†)/√2, r = i(b†-b)/√2 (dimensionless, normalized consistently with optical quadratures; SI conversion via xzpf, pzpf). ABCD matrices are real-valued for physical systems; all entries in rad/s.

source

Frequency Response

SLHQuantumSystems.fresponse_state2outputFunction
fresponse_state2output(sys::QuantumStateSpace, freqs, from::Int, to::Int) → Vector{ComplexF64}

Transfer from state quadrature index from to output quadrature index to over freqs [rad/s].

Computes C[to,:] * (iω·I - A)⁻¹ * eₓ for each ω, where eₓ is a unit vector selecting state from. For QuadratureBasis systems, states are ordered (x₁, p₁, x₂, p₂, …).

Implemented by passing a dummy system with B = eₓ, D = 0 to freqresp, so it inherits all of ControlSystems.jl's numerics (Hessenberg form, etc.) rather than using a naive matrix inverse.

source

Spectral Densities

SLHQuantumSystems.SpectralDensityMatrixType
SpectralDensityMatrix

Frequency-resolved output noise spectral density matrix S_out(ω).

Stores S as a 3D array with shape (nout, nout, nω), following the same axis convention as freqresp: S[:, :, k] is the full matrix at freqs[k].

Field names contains the quadrature-expanded output port names.

source
SLHQuantumSystems.spectral_densityFunction
spectral_density(sys::QuantumStateSpace, freqs; S_in=vacuum_noise(sys))
→ SpectralDensityMatrix

Compute the output noise spectral density matrix

S_out(ω) = G(ω) · S_in · G†(ω)

where G(ω) = freqresp(sys, freqs) is the transfer matrix.

Arguments

  • sys: A numeric (parameter-substituted) QuantumStateSpace.
  • freqs: Vector of angular frequencies [rad/s].
  • S_in: Input noise covariance. Defaults to vacuum (1/2)·I.
source
SLHQuantumSystems.vacuum_noiseFunction
vacuum_noise(sys::QuantumStateSpace) → Matrix

Return the vacuum input noise covariance matrix (1/2)·I, sized for the number of input channels (2 quadratures per port).

source

Component Library

SLHQuantumSystems.cavityFunction
cavity(name)

Create a basic optical cavity SLH system.

Creates a single-mode cavity with detuning and decay. The cavity has one input and one output port with direct transmission (S=1).

Arguments

  • name: Symbol identifying the cavity (used for operator and parameter naming)

Returns

  • SLH: System with Hamiltonian H = Δ·a†a and coupling L = [κa]

Parameters

  • κ: Cavity decay rate
  • Δ: Cavity detuning from driving field
source
SLHQuantumSystems.squeezing_cavityFunction
squeezing_cavity(name)

Create a squeezing cavity SLH system.

Creates a cavity that generates squeezed light through a parametric interaction (two-mode squeezing Hamiltonian).

Arguments

  • name: Symbol identifying the cavity (used for operator and parameter naming)

Returns

  • SLH: System with squeezing Hamiltonian H = iϵ(a†² - a²) and coupling L = [κ·a]

Parameters

  • κ: Cavity decay rate
  • ϵ: Squeezing strength
source

Function Index