qutip-tutorials icon indicating copy to clipboard operation
qutip-tutorials copied to clipboard

Add introductory tutorial on Jaynes-Cummings-Hubbard Model

Open Vanshaj0429 opened this issue 8 months ago • 4 comments

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 avatar Apr 21 '25 11:04 Vanshaj0429

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 avatar Apr 21 '25 12:04 Vanshaj0429

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?

Vanshaj0429 avatar Apr 22 '25 19:04 Vanshaj0429

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 :)

Vanshaj0429 avatar Apr 26 '25 13:04 Vanshaj0429

Thank you for your replies! You have requested a review, but a few points are still open above (your name, e_ops, phase transition). Other than these, it looks ready to merge for me!

pmenczel avatar Apr 28 '25 03:04 pmenczel

@pmenczel and @nwlambert, I have made the necessary changes, I think it looks good to me now. Apologies for the delay on this PR. Can you have a look?

Vanshaj0429 avatar Jul 27 '25 11:07 Vanshaj0429

Hi, thank you for the changes. One more thing - sorry, I missed it previously. The CI tests fail because of the PEP8 check, could you please fix the formatting?

You can see the exact problems in the details of the failed tests, or by running nbqa flake8 JCHM-tutorial.md. The main problem seems to be the import *, which is discouraged.

pmenczel avatar Jul 28 '25 02:07 pmenczel

Hi @pmenczel, I have fixed the formatting issues, I used nbqa black JCHM-tutorial.md. Can you check again?

Vanshaj0429 avatar Aug 03 '25 18:08 Vanshaj0429

There are still some errors

pmenczel avatar Aug 04 '25 06:08 pmenczel

@pmenczel can we check now, I think it should work now.

Vanshaj0429 avatar Aug 18 '25 16:08 Vanshaj0429

@pmenczel can we check now, I think it should work now.

It passed the pep8 check but is still failing, but it seems it is not related to my notebook? Can you suggest what might be the issue? @pmenczel

Vanshaj0429 avatar Aug 19 '25 06:08 Vanshaj0429

Don't worry, the remaining errors are not related to this notebook. This is ready to merge, I think.

pmenczel avatar Aug 19 '25 07:08 pmenczel