Skip to content
Tutorials Center
My learning

Topics

Lesson 33 of 47 · Quantum Simulations

Chapter overview: quantum simulations

A map of numerical quantum mechanics: solving the Schrödinger equation on a grid, evolving wave packets, and using the variational principle, in natural units.

Quantum mechanics replaces trajectories by a wave function ψ(x, t). Its square, |ψ|², is the probability density for finding a particle near x. The equation that governs ψ is the Schrödinger equation, and for a handful of textbook cases it can be solved with pencil and paper. For everything else (a particle in an odd-shaped potential, a collision with a barrier, a molecule) we calculate. This chapter shows three reliable ways to do it, all in one dimension, all in a few lines of NumPy.

Left: a quantum well with three energy levels and wave functions. Right: a wave packet before and after hitting a barrier
Two kinds of quantum simulation: finding the stationary states, and watching a wave packet evolve.

What you will learn

  • The two forms of the Schrödinger equation and which one to use when.
  • Why we work in natural units with ħ = m = 1.
  • The three methods of this chapter: matrix diagonalization, split-step propagation and the variational principle.
  • What each lesson covers.

Key terms

Wave function ψ: a complex-valued function whose squared magnitude is a probability density.

Hamiltonian H: the energy operator, kinetic plus potential: H = −(ħ²/2m) d²/dx² + V(x).

Eigenstate: a state with a definite energy: Hψ = Eψ.

Wave packet: a localized superposition of many momenta, the quantum picture of a moving particle.

Unitary evolution: time evolution that preserves the total probability, ∫|ψ|² dx = 1.

Two equations, two jobs

The time-independent Schrödinger equation Hψ = Eψ asks: which states have a sharp energy, and what are those energies? On a grid, it becomes a matrix eigenvalue problem and the computer returns the energy levels and shapes directly. This answers "what is the spectrum of this well?".

The time-dependent equation iħ ∂ψ/∂t = Hψ asks: how does a given starting state evolve? We solve it by stepping forward in time. This answers "what happens when the packet reaches the barrier?".

Natural units

Writing ħ, m and the particle charge in every formula is tiresome and error-prone. In natural units we set ħ = m = 1. Then the Hamiltonian is simply H = −½ d²/dx² + V(x), and all quantities are plain numbers. To return to real units at the end, you only need two scales: a length ℓ and an energy ε related by ε = ħ²/(m ℓ²). For an electron and ℓ = 1 Å = 1e-10 m that energy unit is about 7.62 eV.

Method 1: levels

Matrix Hψ = Eψ on a grid
eigh Energies and shapes
1 / 4

What each lesson covers

Try it

Convert natural units to electron-volts and picometers for an electron. This calculator applies the definitions above.

Python From natural units to real units

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A first look at a wave function: a Gaussian wave packet is a bump multiplied by a plane wave. We plot its real part and its probability density and check that the density is normalized.

Python A Gaussian wave packet

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What does |ψ(x)|² represent?

    The squared magnitude of the wave function is a probability density.
  2. 2. Which equation do you solve to find the energy levels of a well?

    Energy eigenstates satisfy Hψ = Eψ.
  3. 3. In natural units with ħ = m = 1, the Hamiltonian is...

    The kinetic term −ħ²/(2m) d²/dx² becomes −½ d²/dx².
  4. 4. Unitary time evolution guarantees that...

    A unitary operator preserves the norm of ψ.

Summary

  • ψ is a complex wave function; |ψ|² is a probability density and must integrate to 1.
  • Levels: diagonalize the Hamiltonian matrix. Motion: step ψ in time. Bounds: the variational principle.
  • Natural units (ħ = m = 1) turn H into −½ d²/dx² + V; convert back at the end with a length and an energy scale.
  • Always test against a case with a known answer.

Next: Energy levels from matrices