API
SLH rules
QuantumInputOutput.SLH — Type
SLH{N, ST, LT, HT}SLH triple with scattering matrix S, Lindblad vector L, and Hamiltonian H. S and L can also be vectors of scattering matrices and Lindblad terms.
QuantumInputOutput.scattering — Function
scattering(G::SLH)Return the scattering matrix S of an SLH object.
QuantumInputOutput.lindblad — Function
lindblad(G::SLH)Return the Lindblad vector L of an SLH object.
QuantumInputOutput.hamiltonian — Function
hamiltonian(G::SLH)Return the Hamiltonian H of an SLH object.
QuantumInputOutput.:▷ — Function
▷(G1::SLH{N}, G2::SLH{N}) where NCascade two SLH triples:
$G_1 \triangleright G_2 = (S_2 S_1,\; L_2 + S_2 L_1,\; H_1 + H_2 - \tfrac{i}{2}(L_2^\dagger S_2 L_1 - L_1^\dagger S_2^\dagger L_2))$
Unicode \triangleright<tab>. See also cascade.
QuantumInputOutput.cascade — Function
cascade(G::SLH...)Cascade SLH triples from first to last. Alias for ▷.
QuantumInputOutput.:⊞ — Function
⊞(G1::SLH{N1}, G2::SLH{N2})Concatenate (parallel composition) of two SLH triples:
$G_1 \boxplus G_2 = \left(\begin{pmatrix} S_1 & 0 \\ 0 & S_2 \end{pmatrix},\; \begin{pmatrix} L_1 \\ L_2 \end{pmatrix},\; H_1 + H_2\right)$
Unicode \boxplus<tab>. See also concatenate.
QuantumInputOutput.concatenate — Function
concatenate(G::SLH...)Concatenate (parallel composition) of SLH triples. Alias for ⊞.
QuantumInputOutput.feedback — Function
feedback(G::SLH{N}, x::Int, y::Int) where NApply the SLH feedback reduction rule: connect output port x to input port y. Returns SLH{N-1}.
Translation
SecondQuantizedAlgebra.to_numeric — Function
to_numeric(G::SLH, b::QuantumOpticsBase.Basis; kwargs...)Translate the Hamiltonian and Lindblad operators of an SLH object G into numeric QuantumOptics.jl operators on the basis b. Returns the tuple (H_QO, L_QO), where L_QO is a vector holding one translated operator per jump operator in lindblad(G). All keyword arguments (parameter, time_parameter, operators, adjoint_ops, op_type) are forwarded to SecondQuantizedAlgebra.to_numeric.
Pulses
QuantumInputOutput.Gaussian — Type
Gaussian(τ, σ; δ=0)Gaussian pulse shape descriptor with center time τ, width σ, and detuning δ. Use with coupling_input and coupling_output for analytical coupling formulas.
QuantumInputOutput.PulseCoupling — Type
PulseCoupling(f)A single-argument time function g(t) used as a to_numeric time_parameter value. Wraps any evaluator f (a sampled interpolation, an analytic closure, ...) behind exactly one call method, so it satisfies SecondQuantizedAlgebra's single-arity time_parameter contract by construction (a raw interpolation is rejected for having methods of conflicting arity). Callable as g(t) and broadcastable as g.(T).
QuantumInputOutput.coupling_input — Function
coupling_input(u, T)Compute the virtual-cavity input coupling $g_u(t)$ from an input mode u(t) sampled on time grid T. Returns a PulseCoupling (callable as g(t), broadcastable as g.(T)) that plugs directly into a to_numeric time_parameter.
coupling_input(g::Gaussian)Analytical input coupling $g_u(t)$ for a Gaussian pulse.
QuantumInputOutput.coupling_output — Function
coupling_output(v, T)Compute the virtual-cavity output coupling $g_v(t)$ from an output mode v(t) sampled on time grid T. Returns a PulseCoupling (callable as g(t), broadcastable as g.(T)) that plugs directly into a to_numeric time_parameter.
coupling_output(g::Gaussian)Analytical output coupling $g_v(t)$ for a Gaussian pulse.
QuantumInputOutput.effective_input_mode — Function
effective_input_mode(u_fcts, gu_fcts, T, i)
effective_input_mode(u_fcts, T, i)Compute the effective input mode $u_i^{\mathrm{eff}}(t)$ for a system with multiple input modes, due to the pulse distortion from the subsequent input cavities. The input modes in u_fcts must be sorted starting with the first input cavity before the system.
All kwargs are passed on to the ODE solver.
QuantumInputOutput.effective_output_mode — Function
effective_output_mode(v_fcts, gv_fcts, T, i)
effective_output_mode(v_fcts, T, i)Compute the effective output mode $v_i^{\mathrm{eff}}(t)$ for a system with multiple output modes, due to the pulse distortion from the preceding output cavities. The output modes in v_fcts must be sorted starting with the first output cavity after the system.
All kwargs are passed on to the ODE solver.
QuantumInputOutput.coupling_delay_in — Function
coupling_delay_in(u, v, T)Compute the in-coupling strength for a delay cavity. Returns a PulseCoupling (callable as g(t), broadcastable as g.(T)).
QuantumInputOutput.coupling_delay_out — Function
coupling_delay_out(u, v, T)Compute the out-coupling strength for a delay cavity. Returns a PulseCoupling (callable as g(t), broadcastable as g.(T)).
Interaction Picture
QuantumInputOutput.coupling_matrix — Function
coupling_matrix(gs::Tuple)Build the antisymmetric coupling coefficient matrix A(t) from a tuple of coupling functions/constants gs = (g_1, ..., g_N). Returns a closure t -> A(t).
\[A_{ij}(t) = \frac{1}{2} \begin{cases} 0 & i = j \\ g_i(t)\, g_j^*(t) & i < j \\ -g_j^*(t)\, g_i(t) & i > j \end{cases}\]
so that A(t) is anti-Hermitian. All couplings may be time-dependent or constant.
QuantumInputOutput.solve_mode_evolution — Function
solve_mode_evolution(A::Function, T; alg=Tsit5(), kwargs...)Solve the interaction-picture coefficient-matrix ODE dM/dt = A(t) M(t) with M(0) = I. Returns the ODE solution directly (callable as sol(t)).
All kwargs are passed on to the ODE solver.
QuantumInputOutput.solve_mode_evolution_symmetric — Function
solve_mode_evolution_symmetric(u, T)Analytic interaction-picture coefficient matrix for two modes when u(t) = v(t). Returns a callable t -> M(t) where
\[M(t) = \begin{bmatrix} \cos \theta(t) & -\sin \theta(t) \\ \sin \theta(t) & \cos \theta(t) \end{bmatrix},\]
where
\[\sin^2 \theta(t) = \int_0^t |u(t')|^2\,dt'.\]
Correlations
QuantumInputOutput.correlation_matrix — Function
correlation_matrix(T, ρt, f, Ls; kwargs...)
correlation_matrix(T, ρt, H, J, Ls; kwargs...)Compute the two-time correlation matrix $g^{(1)}(t_1, t_2) = \langle L_s^\dagger(t_1) L_s(t_2) \rangle$ on the time grid T. Writes directly into output matrix.
Supply the dynamics either as a master_dynamic-style function f(t, ρ), or as operators passed straight to the solver: a time-dependent H (e.g. the TimeDependentSum from to_numeric) with jump operators J, or a constant H with constant J. The operator form is much faster for time-dependent problems (the integrator is built once). Ls is either a constant operator or a function Ls(t) returning the operator at t.