Skip to content

Add introductory tutorial on Jaynes-Cummings-Hubbard Model #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Vanshaj0429
Copy link

Summary

This tutorial introduces the Jaynes-Cummings-Hubbard Model on a three-site cavity array, showcasing how to build and simulate light–matter interactions using QuTiP. It walks through Hamiltonian construction, ground state analysis, time evolution, and phase transition signatures, offering a compact, hands-on guide to exploring quantum dynamics in coupled cavity QED systems.

The notebook is written in Jupytext Markdown format and adheres to the qutip-tutorials contribution guidelines. All code cells execute successfully and pass pytest --nbmake.

Tutorial Highlights

Key Concepts Covered:

  • Construction of the full JCHM Hamiltonian for three coupled atom-cavity sites

  • Analysis of the ground state properties and atomic excitation

  • Time evolution of localized photon excitations using mesolve

  • Exploration of phase transition signatures using:

     Photon number fluctuations (Δn)
     Cavity field amplitude (⟨a⟩)
    

Effects of:

  • Varying hopping strength J
  • Detuning (Δ = ω_a - ω_c)
  • Atom-cavity coupling strength g

Tools & Techniques

  • Operator construction via tensor, qeye, destroy, and sigmaz
  • Diagonalization using eigenstates
  • Numerical time evolution via qutip.mesolve
  • Visualization with matplotlib

File Location

tutorials-v5/miscellaneous/JCHM-tutorial.md

Additional Notes

Let me know if:

  • You'd like more or less detail included in the notebook
  • Also if you'd like this notebook to be placed in other subfolder
  • Looking forward to any feedback or suggestions — happy to iterate!

@Vanshaj0429 Vanshaj0429 changed the title Add a introductory tutorial on Jaynes-Cummings-Hubbard Model Add introductory tutorial on Jaynes-Cummings-Hubbard Model Apr 21, 2025
@Vanshaj0429
Copy link
Author

Hi @Ericgig, I have opened this PR on possibility of adding a tutorial on Jaynes-Cummings-Hubbard model. Would love to have your feedback on it.

@Vanshaj0429
Copy link
Author

Hi @Ericgig!

This is my first contribution to the QuTiP tutorials, and I’ve added a new notebook titled JCHM-tutorial.md to tutorials-v5/miscellaneous/.

The notebook:

  • Runs cleanly from start to finish
  • Passes pytest --nbmake locally
  • Doesn’t contain any links (just math, code, and plots)

It looks like the CI failed because of dead links in some unrelated files:

heom-5a-fermions-single-impurity-model.md
013_nonmarkovian_monte_carlo.md

Since those aren’t touched by this PR, I believe the failure isn't caused by my changes.
Please let me know if I should open a separate PR to help fix those or I am missing something here and how to proceed forward?

Copy link
Member

@pmenczel pmenczel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thank you for your contribution. May I ask how you came up with creating this tutorial, and its contents? Is this a topic you are very familiar with?


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

Authors: [Your Name]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to put your name here!


$$i\hbar\frac{d|\psi(t)\rangle}{dt} = H|\psi(t)\rangle$$

In QuTiP, we use the `mesolve` function to numerically solve this equation. For a closed quantum system without dissipation, the dynamics will be purely coherent, showing quantum oscillations as photons hop between cavities and interact with atoms.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a closed system, it would be a bit more usual to use sesolve. (mesolve will just delegate to sesolve in this case)


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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
result = mesolve(H, psi0, tlist, [], ops['cavity_n'] + ops['atom_e'])
result = mesolve(H, psi0, tlist, [], e_ops=(ops['cavity_n'] + ops['atom_e']))

(or sesolve)

e_ops will be a keyword-only parameter from qutip 5.3.

return np.mean(delta_n_values), np.mean(alpha_values)
```

Now let's calculate these order parameters across a range of hopping strengths to see how they change as we approach and cross the phase transition:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit confused here since I do not really see anything in the plots I get. In fact, $\langle a \rangle$ remains zero through the whole plot for me.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's what's happening as per my understanding:

For a finite-size system (especially a small 3-site system), the ground state preserves certain symmetries (this is my educated guess) 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.

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.


### Theoretical Background on Photon Propagation

In the JCHM, photons don't simply move from one cavity to the next in a classical way. Instead, they show quantum mechanical wave-like behavior, with interference effects and probability amplitudes spreading across the lattice. The propagation pattern depends on both the hopping strength J and the cavity-atom coupling strength g.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry, but this plot confuses me. Is it possible that the axes labels are switched?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No axes are fine, there was an orientation issue which made it hard to interpret. I have fixed that now, and you could see the below screenshot once I make the commit:

Screenshot 2025-04-26 at 6 27 53 PM

This is heatmap now represents the correct dynamics as show below:

Screenshot 2025-04-26 at 6 28 52 PM

@Vanshaj0429
Copy link
Author

This looks great! Thank you for your contribution. May I ask how you came up with creating this tutorial, and its contents? Is this a topic you are very familiar with?

Hi @pmenczel! Thanks for reviewing. I have been in talks with Eric to make some contribution as part of my GSoC application. I am a recent Master's graduate in physics from Cardiff University. There I worked on a project that focused on simulating features of Jaynes Cummings model using QuTiP. I also wanted to explore the Jaynes Cummings Hubbard model, but couldn't do it at the time due to time constraints. This tutorial is somewhat an extension of my previous work trying to simulate more rich models. https://github.com/Vanshaj0429/cavity-qed-simulations

If you have any more questions or feedback. I am happy to answer :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants