Interactive exploration of quantum perturbation theory using the anharmonic oscillator.
I am currently taking Quantum Mechanics II, where we are studying perturbation theory. To deepen my understanding of the material, I built an interactive visualization tool that explores how perturbations affect quantum energy levels.
The application models the anharmonic oscillator, where the Hamiltonian is written as
H(λ) = H₀ + λx⁴
Here, the parameter λ controls the strength of the perturbation. By adjusting λ, users can explore how the energy spectrum evolves from the solvable harmonic oscillator to the perturbed system.
Under the hood, the app constructs the Hamiltonian in the harmonic oscillator basis using ladder operators and numerically diagonalizes the matrix to compute the exact energy eigenvalues. These results are displayed alongside the first-order perturbation theory prediction, allowing users to directly compare the approximation with the exact numerical solution.
In perturbation theory, we begin with a Hamiltonian that can be solved exactly and then introduce an additional term that represents a small physical correction. Because the full Hamiltonian cannot usually be solved analytically, we introduce a parameter λ to control the strength of this perturbation.
The energy of the system can then be expanded as a power series in λ:
Eₙ(λ) = Eₙ⁽⁰⁾ + λEₙ⁽¹⁾ + λ²Eₙ⁽²⁾ + ...
This allows us to approximate the system order by order. In this visualization, λ is treated as a continuous parameter so users can see how the exact energy spectrum evolves as the perturbation becomes stronger. The visualization also highlights where first-order perturbation theory begins to deviate from the exact solution.
Quantum mechanics can be highly abstract, but interactive tools make the underlying ideas much easier to understand. Building this visualization helped me better connect the formal perturbative expansion with the actual spectrum of a quantum system.
It also reinforced how numerical methods can be used to explore quantum problems that do not admit simple closed-form solutions, providing a bridge between theoretical derivations and computational experimentation.