Skip to content

Commit c7272a3

Browse files
committed
explantion for phase transition, e_ops as a keyword and other minor changes added
1 parent 15cc2d3 commit c7272a3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tutorials-v5/miscellaneous/JCHM-tutorial.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jupyter:
1414

1515
# Introduction to the Jaynes-Cummings-Hubbard Model: Three-Site System
1616

17-
Authors: [Your Name]
17+
Authors: Vanshaj Bindal (Cardiff University)
1818

1919
## Introduction
2020

@@ -237,7 +237,7 @@ tlist = np.linspace(0, 40, 200)
237237

238238
# Calculate time evolution using the master equation solver
239239
# For a closed system without dissipation, this solves the Schrödinger equation
240-
result = mesolve(H, psi0, tlist, [], ops['cavity_n'] + ops['atom_e'])
240+
result = mesolve(H, psi0, tlist, [], e_ops=(ops['cavity_n'] + ops['atom_e']))
241241

242242
# Plot the results to visualize the dynamics
243243
plt.figure(figsize=(12, 10))
@@ -375,6 +375,9 @@ plt.legend()
375375
plt.grid(True)
376376
plt.show()
377377
```
378+
For a finite-size system (especially a small 3-site system), the ground state preserves certain symmetries that cause the expectation value of the field operator (⟨a⟩) to be exactly zero, even across the phase transition. The photon number fluctuations (blue circles) still increase as expected, showing a precursor to the phase transition.
379+
380+
In larger systems (let's say extremely large), ⟨a⟩ would become non-zero in the superfluid phase, serving as a true order parameter. But in our small system, we need to look at other quantities (like photon number fluctuations) to see signatures of the transition.
378381

379382
## Photon Propagation in the Chain
380383

@@ -440,7 +443,7 @@ for delta in delta_values:
440443
psi0 = tensor(basis(N, 1), basis(2, 0), basis(N, 0), basis(2, 0), basis(N, 0), basis(2, 0))
441444

442445
# Calculate time evolution
443-
result = mesolve(H_detuned, psi0, tlist, [], [ops_detuned['cavity_n'][0]])
446+
result = mesolve(H_detuned, psi0, tlist, [], e_ops=[ops_detuned['cavity_n'][0]])
444447

445448
# Plot photon number in first cavity
446449
plt.plot(tlist, result.expect[0], label=f"Detuning Δ = {delta}")
@@ -485,7 +488,7 @@ for g_val in g_values:
485488
psi0 = tensor(basis(N, 1), basis(2, 0), basis(N, 0), basis(2, 0), basis(N, 0), basis(2, 0))
486489

487490
# Calculate time evolution
488-
result = mesolve(H_g, psi0, tlist, [], [ops_g['cavity_n'][1]]) # Measure photon number in second cavity
491+
result = mesolve(H_g, psi0, tlist, [], e_ops=[ops_g['cavity_n'][1]]) # Measure photon number in second cavity
489492

490493
# Plot photon number in second cavity
491494
plt.plot(tlist, result.expect[0], label=f"Coupling g = {g_val}")

0 commit comments

Comments
 (0)