Bi-Directional Waveguide via Feedback Reduction
This example reconstructs the N=2 bidirectional-waveguide model using the SLH feedback reduction rule. The resulting Hamiltonian and Lindblad operators are then used to simulate the transmitted and reflected intensities for a coherent input pulse.
using QuantumInputOutput
using SecondQuantizedAlgebra
using QuantumOptics
using Plots
using LinearAlgebraN = 2
# symbolic Hilbert space
ha(i) = NLevelSpace("a$(i)", 2)
h = tensor([ha(i) for i = 1:N]...)
# symbolic operators
σ(α, i, j) = Transition(h, "σ_$(α)", i, j, α)
# symbolic parameters
γR(i) = rnumber("γ^{($(i))}_R")
γL(i) = rnumber("γ^{($(i))}_L")
Δ(i) = rnumber("Δ_{$(i)}")
ϕ(i, j) = rnumber("ϕ_{$(i)$(j)}")
Ein = rnumber("E_{in}")Each quantum dot is treated as a two-port component: port 1 couples to the right-moving field and port 2 couples to the left-moving field. We concatenate the source, the two dots, and the phase shifter, and then eliminate the internal waveguide links with six feedback reductions.
I2 = Matrix{Int}(I, 2, 2)
G_in = SLH(I2, [Ein, 0], 0)
G_qd(i) = SLH(I2, [√(γR(i)) * σ(i, 1, 2), √(γL(i)) * σ(i, 1, 2)], -Δ(i) * σ(i, 2, 2))
G_phase(i, j) = SLH([exp(1im * ϕ(i, j)) 0; 0 exp(1im * ϕ(i, j))], [0, 0], 0)
G_unc = G_in ⊞ G_qd(1) ⊞ G_phase(1, 2) ⊞ G_qd(2)
G_t = feedback(G_unc, 1 => 3, 3 => 5, 5 => 7, 8 => 6, 6 => 4, 4 => 2)The reduced model has two external ports. In the remaining port order, the first Lindblad operator corresponds to the reflected left-moving output and the second one to the transmitted right-moving output.
H = get_hamiltonian(G_t)
L = get_lindblad(G_t)
L_L = L[1]
L_R = L[2]γ_ = 1.0
β = 0.9
γRn = fill(γ_ * β / 2, N)
γLn = fill(γ_ * β / 2, N)
γ_add = fill(γ_ * (1 - β), N)
Δn = fill(0.0, N)
ϕn = fill(π / 10, max(N - 1, 0))
σt = 0.8
α0 = √(0.1)
t0 = 4σt
Tend = 3t0
u1(t) = 1 / (sqrt(σt) * π^(1 / 4)) * exp(-(t - t0)^2 / (2 * σt^2))
Ein_t(t) = α0 * u1(t)
p_sym = [
[γR(i) for i = 1:N];
[γL(i) for i = 1:N];
[Δ(i) for i = 1:N];
[ϕ(i, i + 1) for i = 1:(N-1)]
]
p_num = [γRn; γLn; Δn; ϕn]
dict_p = Dict(p_sym .=> p_num)
dict_p_t = Dict(Ein => Ein_t)ba = NLevelBasis(2)
b = tensor([ba for _ = 1:N]...)
H_QO = translate_qo(H, b; parameter = dict_p, time_parameter = dict_p_t)
L_R_QO = translate_qo(L_R, b; parameter = dict_p, time_parameter = dict_p_t)
L_L_QO = translate_qo(L_L, b; parameter = dict_p, time_parameter = dict_p_t)
σ_qo(α, i, j) = translate_qo(σ(α, i, j), b)
J_add = [√(γ_add[i]) * σ_qo(i, 1, 2) for i = 1:N]
function input_output(t, ρ)
Ht = H_QO(t)
J = [L_R_QO(t), L_L_QO(t), J_add...]
return Ht, J, dagger.(J)
endT = collect(0.0:0.005:1.0) .* Tend
ψ0 = tensor([nlevelstate(ba, 1) for _ = 1:N]...)
t, ρt = timeevolution.master_dynamic(T, ψ0, input_output)I_R = zeros(length(t))
I_L = zeros(length(t))
for (i, ti) in enumerate(t)
LR = L_R_QO(ti)
LL = L_L_QO(ti)
I_R[i] = real(expect(LR' * LR, ρt[i]))
I_L[i] = real(expect(LL' * LL, ρt[i]))
endp = plot(t, I_R; label = "Transmission")
plot!(p, t, I_L; label = "Reflection")
plot!(p, t, abs2.(Ein_t.(t)); color = :grey, ls = :dash, label = "Input")
plot!(
p;
xlabel = "time",
ylabel = "intensity",
legend = :best,
grid = true,
size = (500, 320),
)
pPackage versions
These results were obtained using the following versions:
using InteractiveUtils
versioninfo()
using Pkg
Pkg.status(
["QuantumInputOutput", "SecondQuantizedAlgebra", "QuantumOptics", "Plots"],
mode = PKGMODE_MANIFEST,
)Julia Version 1.12.5
Commit 5fe89b8ddc1 (2026-02-09 16:05 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 4 × AMD EPYC 9V74 80-Core Processor
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, znver4)
GC: Built with stock GC
Threads: 4 default, 1 interactive, 4 GC (on 4 virtual cores)
Environment:
JULIA_PKG_SERVER_REGISTRY_PREFERENCE = eager
JULIA_DEBUG = Documenter
JULIA_NUM_THREADS = auto
Status `~/work/QuantumInputOutput.jl/QuantumInputOutput.jl/docs/Manifest.toml`
[91a5bcdd] Plots v1.41.6
[18f9eda6] QuantumInputOutput v0.1.0 `~/work/QuantumInputOutput.jl/QuantumInputOutput.jl`
[6e0679c1] QuantumOptics v1.2.4
[f7aa4685] SecondQuantizedAlgebra v0.4.4This page was generated using Literate.jl.