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
QuantumInputOutput.translate_qo — Function
translate_qo(op, b::QuantumOpticsBase.Basis; parameter=Dict(), time_parameter=Dict(),
level_map=nothing, operators=Dict(), op_type=sparse)Translate a symbolic operator op into a numeric QuantumOptics.jl operator with the corresponding basis b. The dictionary parameter substitutes symbolic parameters with numbers. Time-dependent functions can be provide with the dictionary time_parameter. If time_parameter is non-empty, the result is a time-dependent function t -> op(t). The kwarg level_map=nothing is used to provide the names of levels for transition operators. The operator type which should be returned can be set with the kwarg op_type=sparse and a list of user-defined operators (e.g. on a different basis than b) can be provided with the dictionary operators=Dict(). These operators will then be used to replace the symbolic expressions.
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.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 the LinearInterpolation directly (callable as g(t)).
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 the LinearInterpolation directly (callable as g(t)).
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 LinearInterpolation directly.
QuantumInputOutput.coupling_delay_out — Function
coupling_delay_out(u, v, T)Compute the out-coupling strength for a delay cavity. Returns LinearInterpolation directly.
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_i^*(t)\, g_j(t) & i > j \end{cases}\]
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.
Utilities
QuantumInputOutput.substitute_operators — Function
substitute_operators(op, dict::Dict; replace_adjoint=true)Like substitute(op, dict::Dict) but with special handling for QMul and QAdd. This is needed if an operator is substitute by a QMul or QAdd, e.g. $a_1 \rightarrow g_2 a_2 + g_3 a_3$
If replace_adjoint=true, the dictionary is extended with adjoint substitutions for all key/value pairs, i.e. adjoint(key) => adjoint(value).