Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/correlations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function benchmark_correlations!(SUITE)
G_cas = ▷(G_u, G_c, G_v)

H_sym = hamiltonian(G_cas)
L_sym = lindblad(G_cas)[1]
L_sym = jump_operator(G_cas)[1]

γ_ = 1.0
σ_pulse = 1 / γ_
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/interaction_picture.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function benchmark_interaction_picture!(SUITE)
G_cas = ▷(G_u, G_s, G_v)

H = hamiltonian(G_cas)
L = lindblad(G_cas)[1]
L = jump_operator(G_cas)[1]
H_uv = hamiltonian(▷(G_u, G_v))
H_int_ = simplify(H - H_uv)

Expand Down
6 changes: 3 additions & 3 deletions benchmarks/slh_algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function benchmark_slh_algebra!(SUITE)
SUITE["SLH Algebra"]["symbolic"]["3-cavity cascade"] = @benchmarkable begin
G_cas = ▷($G_u, $G_c, $G_v)
hamiltonian(G_cas)
lindblad(G_cas)
jump_operator(G_cas)
end

SUITE["SLH Algebra"]["symbolic"]["concatenate + cascade"] = @benchmarkable begin
Expand Down Expand Up @@ -87,7 +87,7 @@ function benchmark_slh_algebra!(SUITE)
G_L_t = $G_L2 ▷ $G_ϕ_12 ▷ $G_L1
G_t = G_R_t ⊞ G_L_t
hamiltonian(G_t)
lindblad(G_t)
jump_operator(G_t)
end

## --- Time-dependent closure evaluation (the ODE hot loop) ---
Expand All @@ -99,7 +99,7 @@ function benchmark_slh_algebra!(SUITE)
G_t = G_R_t ⊞ G_L_t

H_f = hamiltonian(G_t)
L_f = lindblad(G_t)
L_f = jump_operator(G_t)

t_mid = T[length(T)÷2]

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/translation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function benchmark_translation!(SUITE)
G_v = SLH(1, gv_sym * av_, 0)
G_cas = ▷(G_u, G_c, G_v)
H_sym = hamiltonian(G_cas)
L_sym = lindblad(G_cas)[1]
L_sym = jump_operator(G_cas)[1]

## --- Static translation (no time dependence) ---

Expand Down
1 change: 1 addition & 0 deletions docs/src/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ scattering
```

```@docs
jump_operator
lindblad
```

Expand Down
4 changes: 2 additions & 2 deletions docs/src/implementation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ av = Destroy(h, :a_v, 3)

An SLH component is represented as `(S, L, H)` by the [`SLH`](@ref) type. The cascade [`▷`](@ref), concatenation [`⊞`](@ref), and feedback reduction [`feedback`](@ref) rules implement the standard network composition from the SLH framework.

The resulting effective operators are accessed by [`hamiltonian`](@ref) and [`lindblad`](@ref) and remain symbolic until translation. This is especially useful when you want to further manipulate the expressions, e.g. to transform into the interaction picture.
The resulting effective operators are accessed by [`hamiltonian`](@ref) and [`jump_operator`](@ref) and remain symbolic until translation. This is especially useful when you want to further manipulate the expressions, e.g. to transform into the interaction picture.

```julia
G_cas = ▷(G_u, G_s, G_v)

H = hamiltonian(G_cas)
L = lindblad(G_cas)
L = jump_operator(G_cas)
```

For networks with internal loops, the symbolic model can be reduced directly with [`feedback`](@ref), which applies the SLH feedback reduction rule before translation. This keeps the symbolic workflow consistent: build a network from cascades and concatenations, eliminate internal connections symbolically, and only then translate the reduced Hamiltonian and Lindblad operators to numerics.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ H = hamiltonian(G_cas)
```

```@example tutorial
L = lindblad(G_cas)[1]
L = jump_operator(G_cas)[1]
```

## 2. Numerical parameters and input pulse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ H = hamiltonian(G_cas)

#

L = lindblad(G_cas)[1] # only one Lindblad term in this example
L = jump_operator(G_cas)[1] # only one Lindblad term in this example

# To solve the dynamics of the system we translate the symbolic expressions into numeric operators (matrices) of QuantumOptics.jl. To do so, we define the numerical parameters and operator basis.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ H = G_cas.hamiltonian

#

L = G_cas.lindblad[1] # only one Lindblad in this example
L = G_cas.jump_operator[1] # only one Lindblad in this example

#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ H = hamiltonian(G_cas)

#

L = lindblad(G_cas)[1] # only one Lindblad in this example
L = jump_operator(G_cas)[1] # only one jump operator in this example

#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ G_v2 = SLH(1, g_v2' * av2, 0)
G = cascade(G_s, G_v1, G_v2)

H = hamiltonian(G)
L = lindblad(G)[1]
L = jump_operator(G)[1]
nothing # hide

# We use the parameters quoted in the paper and initialize the emitter in the excited state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ H = hamiltonian(G_cas)

#

L = lindblad(G_cas)[1] # only one Lindblad in this example
L = jump_operator(G_cas)[1] # only one Lindblad in this example

# Next, the numerical parameters and functions of the system are defined.

Expand Down
8 changes: 4 additions & 4 deletions examples/04-1_two-sided-cavity_with-atom_coh-drive.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ H1 = hamiltonian(G_cav_L_R_drive)

#

L1_L = lindblad(G_cav_L_R_drive)[1]
L1_L = jump_operator(G_cav_L_R_drive)[1]

#

L1_R = lindblad(G_cav_L_R_drive)[2]
L1_R = jump_operator(G_cav_L_R_drive)[2]

# Here, the usual classical cavity drive-term $\sqrt{\kappa_L} E (a^\dagger + a)$ appears as a combination of Hamiltonian and Lindblad term.
# To solve the dynamics of the system we translate the symbolic expressions into numeric operators (matrices) of [QuantumOptics.jl](https://github.com/qojulia/QuantumOptics.jl). Since we do not want to include the basis of the atoms, we provide a dictionary of operators with the kwarg `operators` in the function [`to_numeric`](@ref).
Expand Down Expand Up @@ -140,11 +140,11 @@ H2 = G_ac_drive.hamiltonian

#

L2_L = G_ac_drive.lindblad[1]
L2_L = G_ac_drive.jump_operator[1]

#

L2_R = G_ac_drive.lindblad[2]
L2_R = G_ac_drive.jump_operator[2]

#

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ H1 = hamiltonian(G_cav_L_R_drive)

#

L1_L = lindblad(G_cav_L_R_drive)[1]
L1_L = jump_operator(G_cav_L_R_drive)[1]

#

L1_R = lindblad(G_cav_L_R_drive)[2]
L1_R = jump_operator(G_cav_L_R_drive)[2]

# The typical cavity drive-term $\sqrt{\kappa_L} E (a^\dagger + a)$ is a combination of Hamiltonian term and Lindblad.
# We use the function `meanfield` to obtain the equation for the intra-cavity field, which leads to a closed set of equations in this particular case.
Expand Down Expand Up @@ -153,11 +153,11 @@ H2 = G_ac_drive.hamiltonian

#

L2_L = G_ac_drive.lindblad[1]
L2_L = G_ac_drive.jump_operator[1]

#

L2_R = G_ac_drive.lindblad[2]
L2_R = G_ac_drive.jump_operator[2]

# We derive the equations of motion for system with a second-order mean-field approximation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ H = hamiltonian(G_t)

#

L = lindblad(G_t)
L = jump_operator(G_t)
L_R = L[1]

#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ nothing # hide
# The full Hamiltonian and Lindblad terms are extracted from the final SLH element. Note that as soon as one time-dependent function is involved in a cascade or concatenate, the returned $H$ and $L$ will also be time-dependent.

H = hamiltonian(G_t)
L = lindblad(G_t)
L = jump_operator(G_t)
L_R = L[1]
L_L = L[2]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ nothing # hide
# second one to the transmitted right-moving output.

H = hamiltonian(G_t)
L = lindblad(G_t)
L = jump_operator(G_t)
L_L = L[1]
L_R = L[2]
nothing # hide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ H = hamiltonian(G_cas)

#

L = lindblad(G_cas)[1]
L = jump_operator(G_cas)[1]

# Usually we deal with the above derived Hamiltonian and Lindblad. In this example, however, we transform the system into the interaction picture of the virtual cavity-cavity interaction Hamiltonian $H_{uv}$.

Expand Down
2 changes: 1 addition & 1 deletion examples/07-1_beamsplitter_loss__quantum-pulse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ H = hamiltonian(G)

#

L = lindblad(G)
L = jump_operator(G)
L[1]

#
Expand Down
2 changes: 1 addition & 1 deletion examples/07-2_hong-ou-mandel__quantum-pulse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ H = hamiltonian(G)

#

L = lindblad(G)
L = jump_operator(G)
L[1]

#
Expand Down
2 changes: 1 addition & 1 deletion examples/08-1_pulse-delay__simple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ G_v2 = concatenate(SLH(1, 0, 0), G_v)

G_cas = cascade(G_u2, G_d, G_v2)
H = hamiltonian(G_cas)
L = lindblad(G_cas)
L = jump_operator(G_cas)
nothing # hide

#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ nothing # hide
#

S_loop = scattering(G_loop)
L_loop = lindblad(G_loop)[1]
L_loop = jump_operator(G_loop)[1]

#

Expand Down
2 changes: 1 addition & 1 deletion examples/10-1_SUPER_excitation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ nothing # hide

## Hamiltonian and Lindbladian
Hcas = hamiltonian(G_cas)
Lcas = lindblad(G_cas)[1]
Lcas = jump_operator(G_cas)[1]
Lcasd = adjoint(Lcas)
nothing # hide

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ H_s = p / 2 * (a'^2 + a^2) - K / 2 * (a'^2) * (a^2) + Δ * a' * a
G_s = SLH(1, √(γ) * a, H_s)

H = hamiltonian(G_s)
L = lindblad(G_s)[1]
L = jump_operator(G_s)[1]
nothing # hide

# Next, we define the numerical parameters from Sec. II.D. The classical pump
Expand Down Expand Up @@ -127,7 +127,7 @@ G_v = SLH(1, g_v * av, 0)
G = G_s2 ▷ G_v

H_2 = hamiltonian(G)
L_2 = lindblad(G)[1]
L_2 = jump_operator(G)[1]

gv_t = coupling_output(v_mode, T)
dict_p_t_2 = Dict(p => p_t, g_v => gv_t)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ G_atom = SLH(I4, L_atom, Δ*σ(2, 2))

G_u_bs_d1_d2_atom = G_u_bs_d1_d2 ▷ G_atom
H = hamiltonian(G_u_bs_d1_d2_atom)
L = lindblad(G_u_bs_d1_d2_atom)
L = jump_operator(G_u_bs_d1_d2_atom)

#

Expand Down
12 changes: 6 additions & 6 deletions examples/drafts/10-1_SUPER_excitation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ G_cas = ▷(G_u2, G_u1, G_2lvl, G_v1, G_v2) # cascade

# Hamiltonian and Lindbladian
Hcas = hamiltonian(G_cas)
Lcas = lindblad(G_cas)[1]
Lcas = jump_operator(G_cas)[1]
Lcasd = adjoint(Lcas)

# Time-dependent couplings
Expand Down Expand Up @@ -577,8 +577,8 @@ Gcon = ⊞(G_ch1, G_ch2) # concatenation

# Hamiltonian and Lindblad operators (two channels)
Hcon = hamiltonian(Gcon)
Lch1g = lindblad(Gcon)[1]
Lch2g = lindblad(Gcon)[2]
Lch1g = jump_operator(Gcon)[1]
Lch2g = jump_operator(Gcon)[2]
Ldch1g = adjoint(Lch1g)
Ldch2g = adjoint(Lch2g)

Expand Down Expand Up @@ -734,7 +734,7 @@ G_cas_1m = ▷(G_u, G_2lvls, G_v)

# Hamiltonian and Lindbladian
Hcas_1m = hamiltonian(G_cas_1m)
Lcas_1m = lindblad(G_cas_1m)[1]
Lcas_1m = jump_operator(G_cas_1m)[1]
Lcas_1md = adjoint(Lcas_1m)

# Time-dependent couplings
Expand Down Expand Up @@ -869,7 +869,7 @@ T = [dt:dt:Tend;]
G_cas_1m0 = ▷(G_u, G_2lvls, G_v)

Hcas_1m0 = hamiltonian(G_cas_1m0)
Lcas_1m0 = lindblad(G_cas_1m0)[1]
Lcas_1m0 = jump_operator(G_cas_1m0)[1]
Lcas_1m0d = adjoint(Lcas_1m0)

# Set v-coupling to zero (collect only input-system correlations)
Expand Down Expand Up @@ -1201,7 +1201,7 @@ G_cas_1m = ▷(G_u, G_2lvls, G_v)

# Hamiltonian and Lindbladian
Hcas_1m = hamiltonian(G_cas_1m)
Lcas_1m = lindblad(G_cas_1m)[1]
Lcas_1m = jump_operator(G_cas_1m)[1]
Lcas_1md = adjoint(Lcas_1m)

# Time-dependent couplings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ G_v = SLH(1, g_v' * av, 0)
G = cascade(G_s, G_v)

H = hamiltonian(G)
L = lindblad(G)[1]
L = jump_operator(G)[1]
nothing # hide

# We use the spontaneous-emission rate as the frequency unit. At
Expand Down
1 change: 1 addition & 0 deletions src/QuantumInputOutput.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const SQA = SecondQuantizedAlgebra
export SLH,
Gaussian,
scattering,
jump_operator,
lindblad,
hamiltonian,
# Composition
Expand Down
Loading
Loading