Skip to content

Commit 4f4000d

Browse files
authored
Add tutorial for the Dicke model (#31)
1 parent 54d32c2 commit 4f4000d

File tree

1 file changed

+198
-0
lines changed

1 file changed

+198
-0
lines changed
+198
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
---
2+
title: "The Dicke Model"
3+
author: Li-Xun Cai
4+
date: 2025-03-11 # last update (keep this comment as a reminder)
5+
6+
engine: julia
7+
---
8+
9+
Inspirations taken from [this QuTiP tutorial](https://nbviewer.org/urls/qutip.org/qutip-tutorials/tutorials-v5/lectures/Lecture-3A-Dicke-model.ipynb) by J. R. Johansson.
10+
11+
This tutorial mainly demonstrates the use of
12+
13+
- [`jmat`](https://qutip.org/QuantumToolbox.jl/stable/resources/api#QuantumToolbox.jmat)
14+
- [`plot_wigner`](https://qutip.org/QuantumToolbox.jl/stable/resources/api#QuantumToolbox.plot_wigner)
15+
- [`plot_fock_distribution`](https://qutip.org/QuantumToolbox.jl/stable/resources/api#QuantumToolbox.plot_fock_distribution)
16+
- [`entropy_mutual`](https://qutip.org/QuantumToolbox.jl/stable/resources/api#QuantumToolbox.entropy_mutual)
17+
18+
to explore the Dicke model.
19+
20+
## Introduction
21+
22+
The Dicke model describes a system where $N$ two-level atoms interact with a single quantized electromagnetic mode. The original microscopic form of the Dicke Hamiltonian is given by:
23+
24+
$$
25+
\hat{H}_D = \omega \hat{a}^\dagger \hat{a} + \sum_{i=1}^{N} \frac{\omega_0}{2} \hat{\sigma}_z^{(i)} + \sum_{i=1}^{N} \frac{g}{\sqrt{N}} (\hat{a} + \hat{a}^\dagger) (\hat{\sigma}_+^{(i)} + \hat{\sigma}_-^{(i)})
26+
$$
27+
28+
where:
29+
30+
- $\hat{a}$ and $\hat{a}^\dagger$ are the cavity (with frequency $\omega$) annihilation and creation operators, respectively.
31+
- $\hat{\sigma}_z^{(i)}, \hat{\sigma}_\pm^{(i)}$ are the Pauli matrices for the $i$-th two-level atom, with transition frequency $\omega_0$.
32+
- $g$ represents the light-matter coupling strength.
33+
34+
This formulation explicitly treats each spin individually. However, when the atoms interact identically with the cavity, we can rewrite the Hamiltonian regarding collective spin operators.
35+
36+
$$
37+
\hat{J}_z = \sum_{i=1}^{N} \hat{\sigma}_z^{(i)}, \quad \hat{J}_{\pm} = \sum_{i=1}^{N} \hat{\sigma}_{\pm}^{(i)},
38+
$$
39+
which describe the total spin of the system as a pseudospin of length $j = N/2$. Using these collective operators, the reformulated Dicke Hamiltonian takes the form:
40+
41+
$$
42+
\hat{H}_D = \omega \hat{a}^\dagger \hat{a} + \omega_0 \hat{J}_z + \frac{g}{\sqrt{N}} (\hat{a} + \hat{a}^\dagger) (\hat{J}_+ + \hat{J}_-)
43+
$$
44+
45+
This formulation reduces complexity, as it allows us to work on a collective basis instead of the whole individual spin Hilbert space. The superradiant phase transition occurs when the coupling strength $g$ exceeds a critical threshold $g_c = 0.5\sqrt{\omega/\omega_0}$, leading to a macroscopic population of the cavity mode.
46+
47+
48+
## Code demonstration
49+
50+
```{julia}
51+
using QuantumToolbox
52+
using CairoMakie
53+
```
54+
55+
```{julia}
56+
ω = 1
57+
ω0 = 1
58+
59+
gc = √(ω/ω0)/2
60+
61+
κ = 0.05;
62+
```
63+
64+
Here, we define some functions for later usage.
65+
```{julia}
66+
# M: cavity Hilbert space truncation, N: number of atoms
67+
Jz(M, N) = (qeye(M) ⊗ jmat(N/2, :z))
68+
69+
a(M, N) = (destroy(M) ⊗ qeye(N+1))
70+
71+
function H(M, N, g)
72+
j = N / 2
73+
n = 2 * j + 1
74+
75+
a_ = a(M, N)
76+
Jz_ = Jz(M, N)
77+
Jp = qeye(M) ⊗ jmat(j, :+)
78+
Jm = qeye(M) ⊗ jmat(j, :-);
79+
80+
H0 = ω * a_' * a_ + ω0 * Jz_
81+
H1 = 1/ √N * (a_ + a_') * (Jp + Jm)
82+
83+
return (H0 + g * H1)
84+
end;
85+
```
86+
87+
Take the example of 4 atoms.
88+
```{julia}
89+
M0, N0 = 16, 4
90+
91+
H0(g) = H(M0, N0, g)
92+
93+
a0 = a(M0, N0)
94+
Jz0 = Jz(M0, N0);
95+
```
96+
97+
```{julia}
98+
gs = 0.0:0.05:1.0
99+
ψGs = map(gs) do g
100+
H = H0(g)
101+
vals, vecs = eigenstates(H)
102+
vecs[1]
103+
end
104+
105+
nvec = expect(a0'*a0, ψGs)
106+
Jzvec = expect(Jz0, ψGs);
107+
```
108+
109+
```{julia}
110+
fig = Figure(size = (800, 300))
111+
axn = Axis(
112+
fig[1,1],
113+
xlabel = "interaction strength",
114+
ylabel = L"\langle \hat{n} \rangle"
115+
)
116+
axJz = Axis(
117+
fig[1,2],
118+
xlabel = "interaction strength",
119+
ylabel = L"\langle \hat{J}_{z} \rangle"
120+
)
121+
ylims!(-N0/2, N0/2)
122+
lines!(axn, gs, real(nvec))
123+
lines!(axJz, gs, real(Jzvec))
124+
display(fig);
125+
```
126+
The expectation value of photon number and $\hat{J}_z$ showed a sudden increment around $g_c$.
127+
128+
```{julia}
129+
# the indices in coupling strength list (gs)
130+
# to display wigner and fock distribution
131+
cases = 1:5:21
132+
133+
fig = Figure(size = (900,650))
134+
for (hpos, idx) in enumerate(cases)
135+
g = gs[idx] # coupling strength
136+
ρcav = ptrace(ψGs[idx], 1) # cavity reduced state
137+
138+
# plot wigner
139+
_, ax, hm = plot_wigner(ρcav, location = fig[1,hpos])
140+
ax.title = "g = $g"
141+
ax.aspect = 1
142+
143+
# plot fock distribution
144+
_, ax2 = plot_fock_distribution(ρcav, location = fig[2,hpos])
145+
146+
if hpos != 1
147+
ax.xlabelvisible, ax.ylabelvisible, ax2.ylabelvisible = fill(false, 3)
148+
ax.xticksvisible, ax.yticksvisible, ax2.yticksvisible = fill(false, 3)
149+
ax2.yticks = (0:0.5:1, ["" for i in 0:0.5:1])
150+
if hpos == 5 # Add colorbar with the last returned heatmap (_hm)
151+
Colorbar(fig[1,6], hm)
152+
end
153+
end
154+
end
155+
156+
# plot average photon number with respect to coupling strength
157+
ax3 = Axis(fig[3,1:6], height=200, xlabel=L"g", ylabel=L"\langle \hat{n} \rangle")
158+
xlims!(ax3, -0.02, 1.02)
159+
lines!(ax3, gs, real(nvec), color=:teal)
160+
ax3.xlabelsize, ax3.ylabelsize = 20, 20
161+
vlines!(ax3, gs[cases], color=:orange, linestyle = :dash, linewidth = 4)
162+
163+
display(fig);
164+
```
165+
As $g$ increases, the cavity ground state's wigner function plot looks more coherent than a thermal state.
166+
167+
```{julia}
168+
Ns = 8:8:24
169+
slists = map(Ns) do N
170+
slist = map(gs) do g
171+
H_ = H(M0, N, g)
172+
_, vecs = eigenstates(H_)
173+
entropy_mutual(vecs[1], 1, 2)
174+
end
175+
end;
176+
```
177+
178+
```{julia}
179+
fig = Figure(size=(800, 400))
180+
ax = Axis(fig[1,1])
181+
ax.xlabel = "coupling strength"
182+
ax.ylabel = "mutual entropy"
183+
184+
for (idx, slist) in enumerate(slists)
185+
lines!(gs, slist, label = string(Ns[idx]))
186+
end
187+
188+
Legend(fig[1,2], ax, label = "number of atoms")
189+
display(fig);
190+
```
191+
We further consult mutual entropy between the cavity and the spins as a measure of their correlation; the result showed that as the number of atoms $N$ increases, the peak of mutual entropy moves closer to $g_c$.
192+
193+
194+
195+
## Version Information
196+
```{julia}
197+
QuantumToolbox.versioninfo()
198+
```

0 commit comments

Comments
 (0)