SkillAgentSearch skills...

WaveguideQED.jl

Library for simulating time binned photons in Waveguide Quantum Electrodynamics

Install / Use

/learn @qojulia/WaveguideQED.jl
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

WaveguideQED.jl

<a href="https://qojulia.github.io/WaveguideQED.jl/dev/"><img src="https://img.shields.io/badge/docs-stable-blue.svg" alt="Documentation of latest stable version"></a> <a href="https://codecov.io/gh/qojulia/WaveguideQED.jl"><img src="https://img.shields.io/codecov/c/gh/qojulia/WaveguideQED.jl?label=codecov" alt="Test coverage from codecov"></a>

A Julia package for simulating quantum states of photon wavepackets using a discrete-time formalism Phys. Rev. A 101, 042322. The package works as an extension to QuantumOptics.jl where bases and operators from WaveguideQED.jl can be used together with operators and bases from QuantumOpics.jl.

Citing

If you find the package usefull in your research. Please consider citing: https://quantum-journal.org/papers/q-2025-04-17-1710/.

Example of usage:

Define a waveguide basis, containing a two-photon wavepacket for a time interval from 0 to 20 with timesteps of 0.2:

using WaveguideQED
times = 0:0.1:10
bw =  WaveguideBasis(2,times)

Define waveguide creation and annihilation operators from this basis:

w = destroy(bw)
wd = create(bw)

Combine with QuantumOptics.jl operators:

using QuantumOptics
bc = FockBasis(2)
a = destroy(bc)
ad = create(bc)
wda = a ⊗ wd
adw = ad ⊗ w

Finally, we can define an initial two-photon Gaussian wavepacket state with view_twophoton and zero photons in the cavity, a Hamiltonian, and simulate the evolution:

ξfun(t1,t2,σ1,σ2,t0) = sqrt(2/σ1) * (log(2)/pi)^(1/4)*exp(-2*log(2)*(t1-t0)^2/σ1^2)*sqrt(2/σ2)*(log(2)/pi)^(1/4)*exp(-2*log(2)*(t2-t0)^2/σ2^2)
ψ_cw = twophoton(bw,ξfun,1,1,5)/sqrt(2)
psi = fockstate(bc,0) ⊗ ψ_cw
dt = times[2] - times[1]
H = im*sqrt(1/dt)*(adw-wda)
ψ = waveguide_evolution(times, psi, H)

Plotting the two-photon state is also simple:

ψ_double = TwoPhotonView(ψ);
using PyPlot
fig,ax = subplots(1,1,figsize=(4.5,4.5))
plot_twophoton!(ax,ψ_double,times)

alt text

Related Skills

View on GitHub
GitHub Stars23
CategoryDevelopment
Updated4h ago
Forks6

Languages

TeX

Security Score

90/100

Audited on Mar 30, 2026

No findings