Add introductory tutorial on Jaynes-Cummings-Hubbard Model
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, andsigmaz - 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!
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.
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 --nbmakelocally - 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?
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 :)
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 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?
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.
Hi @pmenczel, I have fixed the formatting issues, I used nbqa black JCHM-tutorial.md. Can you check again?
There are still some errors
@pmenczel can we check now, I think it should work now.
@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
Don't worry, the remaining errors are not related to this notebook. This is ready to merge, I think.