This note is part of [[quantum/Practical Quantum Information System]]. > [!info] Course code > Use the companion repository for this lecture's runnable lab, helper functions, and regression checks: > - [notebooks/by_concept/hamiltonians.ipynb](https://github.com/montekkundan/quantum-code/blob/main/notebooks/by_concept/hamiltonians.ipynb) > - [qcourse/hamiltonians.py](https://github.com/montekkundan/quantum-code/blob/main/qcourse/hamiltonians.py) > - [tests/test_hamiltonians_noise.py](https://github.com/montekkundan/quantum-code/blob/main/tests/test_hamiltonians_noise.py) [TODO: add video - Hamiltonians] ## What This Concept Is Up to this point, most of the course speaks the language of circuits. Hamiltonians are the point where you remember that real quantum systems are physical dynamical systems before they are textbook gate lists. A [[quantum/Glossary#Hamiltonian|Hamiltonian]] tells you about energy structure and continuous-time evolution. This note matters because it connects the algorithmic viewpoint back to physics. Circuits are one model of control. Hamiltonians are a model of the system's underlying evolution. Serious quantum information work needs both pictures. ## Foundation Terms You Need First A [[quantum/Glossary#Hamiltonian|Hamiltonian]] is the operator that generates time evolution in a closed system. [[quantum/Glossary#Unitary|Unitary evolution]] over time can be written using a matrix exponential of the Hamiltonian. Tensor products remain the tool for combining subsystem Hamiltonians into joint descriptions. The mental shift here is from step-by-step gate recipes to continuous evolution generated by an operator. ## How The Idea Actually Works If the Hamiltonian is $H$, then the ideal closed-system evolution over time $t$ is $ U(t) = e^{-iHt}. $ That compact expression contains a lot of physics. The Hamiltonian determines which states are energy eigenstates, how phases accumulate over time, and how superpositions evolve. This is one reason Hamiltonians are so central to simulation. If someone gives you a physical model of interacting spins, oscillators, or qubits, they often specify it as a Hamiltonian. The computational task is then to understand or approximate the resulting evolution, ground states, spectra, or observables. This note is also where the circuit and physics pictures start talking to each other directly. Small-time evolution under a Hamiltonian can sometimes be approximated by gate sequences. Conversely, gate-based algorithms can often be interpreted as controlled manipulations of underlying Hamiltonian-like dynamics. Learning Hamiltonians well makes the later adiabatic and many-body notes much easier, because it gives you the operator-level language they require. ## Why It Matters - It reconnects circuit language to physical quantum dynamics. - It is essential for simulation, adiabatic methods, and many hardware models. - It helps you think about quantum systems as operators and spectra, not only as gate lists. ## Related Questions > [!question] Why does $U(t)=e^{-iHt}$ produce unitary evolution? >> [!answer] For a Hermitian Hamiltonian $H$, the exponential $e^{-iHt}$ is unitary. Hermiticity gives real energy eigenvalues, and the exponential turns them into phase rotations that preserve norm. > [!question] Why are Hamiltonians useful for simulation notes? >> [!answer] Physical models are often specified by energies and interactions rather than by gate lists. Hamiltonian simulation asks how the state evolves, what observables change, and how to approximate that evolution computationally. > [!question] When should this note use QuTiP or CUDA-Q instead of only Qiskit? >> [!answer] Use QuTiP for density-matrix dynamics, open systems, and small Hamiltonian experiments. Use CUDA-Q when the goal is accelerated or hybrid simulation workflows that connect more directly to scalable circuit/Hamiltonian experiments. ## Study Checks Use these after the explanation, not before it. ### Quick Checks - MCQ: What equation describes closed-system Hamiltonian time evolution? A. $\rho'=A\rho+B$ B. $|\psi(t)\rangle=e^{-iHt}|\psi(0)\rangle$ C. $p=x+y$ D. $U^\dagger U=0$ **Answer:** B. |psi(t)> = exp(-i H t) |psi(0)>. - What is a Kraus channel required to preserve? **Answer:** Trace, with Kraus operators satisfying sum_k E_k dagger E_k = I. - When is QuTiP especially useful? **Answer:** For density matrices, Hamiltonians, open systems, and noise dynamics. ### Oral Exam Anchors > [!question] Oral exam anchor > Explain how Hamiltonians generate time evolution and why this matters for a circuit-focused course. A good answer should say: For a closed quantum system with Hamiltonian H, time evolution is |psi(t)> = exp(-iHt)|psi(0)> in units where hbar=1. The operator exp(-iHt) is unitary when H is Hermitian. This matters even in a circuit-focused course because real quantum hardware evolves under physical Hamiltonians. Circuits are a control abstraction, while Hamiltonians describe continuous dynamics, energy spectra, adiabatic algorithms, simulation problems, and many noise models. Understanding both languages lets you connect algorithms to devices. **Explain quantum noise using density matrices and channels.** A good answer should say: Quantum noise is naturally described by density matrices and quantum channels. A channel maps an input density matrix rho to an output density matrix. Many physical channels can be written in Kraus form: E(rho) = sum_k E_k rho E_k dagger, with the trace-preserving condition sum_k E_k dagger E_k = I. This formalism includes decoherence, depolarization, amplitude damping, phase damping, and other open-system effects. It is more general than unitary evolution because the system may be interacting with an environment that is not explicitly tracked. ## Practical Lab Use Hamiltonian simulation here to connect operator algebra with time-evolution plots and state trajectories. - Choose a small Hamiltonian and simulate time evolution in QuTiP or CUDA-Q. - Plot one observable or state component as a function of time. - Translate one simple case back into an approximate circuit picture if possible. ## Homework Connect matrix exponentials to physical interpretation. - Explain how a Hamiltonian generates time evolution. - Work through one small matrix-exponential example. - Describe why Hamiltonians are a natural starting point for physical quantum systems. ## References - Scott Aaronson, [Introduction to Quantum Information Science](https://www.scottaaronson.com/qclec.pdf), Lecture 25. - [[Resources]] - QuTiP documentation, [main docs](https://qutip.org/). - NVIDIA CUDA-Q documentation, [main docs](https://nvidia.github.io/cuda-quantum/latest/index.html).