⚗️ Quantum Harmonic Oscillator

About the Quantum Harmonic Oscillator

This simulation visualises the quantum harmonic oscillator: a particle of mass m bound in a parabolic potential V(x) = ½mω²x². Solving the time-independent Schrödinger equation gives quantised energy levels Eₙ = ℏω(n + ½) and stationary wavefunctions ψₙ(x). Each ψₙ is built from a Hermite polynomial Hₙ multiplied by a Gaussian envelope, computed here through a stable Hermite recurrence relation in natural units (ℏ = m = 1).

The page draws the parabolic potential, the evenly spaced energy levels, and each wavefunction plotted along its own level. The n slider selects the quantum number (0 to 10) and the ω slider tunes the angular frequency (0.5 to 3), which widens or narrows both the level spacing and the well. Buttons toggle showing all states up to n ≤ 5, switching ψ(x) for the probability density |ψ|², and animating through n. The oscillator underpins vibrational spectra of molecules, phonons in solids, and quantum field theory.

Frequently Asked Questions

What is the quantum harmonic oscillator?

It is a particle confined by a restoring force proportional to its displacement, giving a parabolic potential V(x) = ½mω²x². Quantum mechanics restricts its energy to discrete levels rather than a continuous range, making it the cornerstone model for vibrations and oscillations at the atomic scale.

What does the energy equation Eₙ = ℏω(n + ½) mean?

It gives the allowed energies, labelled by the quantum number n = 0, 1, 2, and so on. The levels are equally spaced by ℏω, which is unique to the harmonic potential. The extra ½ term means the lowest energy is not zero, a feature with no classical counterpart.

What is zero-point energy?

Even in its ground state (n = 0) the oscillator retains a minimum energy E₀ = ½ℏω, shown at the bottom of the simulation. The particle can never be perfectly still, because doing so would violate the Heisenberg uncertainty principle by fixing both position and momentum exactly.

How are the wavefunctions calculated?

Each ψₙ(x) is a Hermite polynomial Hₙ(ξ) multiplied by a Gaussian factor exp(-ξ²/2) and a normalisation constant Nₙ = (2ⁿ n! √π)^(-½), where ξ is the dimensionless coordinate √(mω/ℏ)·x. The simulation evaluates Hₙ with a numerically stable recurrence rather than the explicit polynomial form.

What do the controls do?

The n slider chooses the quantum number from 0 to 10, selecting which state to highlight. The ω slider sets the angular frequency from 0.5 to 3, changing the well width and level spacing. Buttons let you show every state up to n ≤ 5, switch between ψ(x) and the probability density |ψ|², and step automatically through increasing n.

Why are the energy levels equally spaced?

The even spacing of ℏω is a special property of the parabolic potential. In other wells, such as a box or the hydrogen atom, the gaps shrink or grow with n. The harmonic spacing arises from the simple ladder structure of the system, which raising and lowering operators step through one quantum at a time.

What does the probability density |ψ|² show?

Toggling |ψ|² displays the probability of finding the particle at each position. For high n the density piles up near the classical turning points, where a classical oscillator moves slowest and spends most time. This convergence towards classical behaviour at large n illustrates the correspondence principle.

Is this simulation physically accurate?

Yes, within its assumptions. It plots exact analytic solutions of the one-dimensional time-independent Schrödinger equation for the harmonic potential, using natural units. It shows stationary states rather than time evolution, and curves are scaled for clarity, but the energies, nodes, and shapes are faithful to the real eigenstates.

Why does the wavefunction have nodes?

The state ψₙ has exactly n nodes, points where it crosses zero. Each additional node adds curvature and therefore kinetic energy, which is why higher n means higher energy. Counting nodes is a quick way to read off the quantum number directly from the plotted wavefunction.

Where does the harmonic oscillator appear in real physics?

It models molecular bond vibrations seen in infrared spectroscopy, lattice vibrations (phonons) in crystals, electromagnetic field modes in quantum optics, and trapped ions and atoms. Any system near a stable equilibrium behaves approximately harmonically for small displacements, making it one of the most widely used models in physics.