At a glance
In quantum mechanics the wavefunction ψ(x) is used to predict the results of position measurements. This sim prepares one state and measures its position again and again, so you can compare the record of results with the curve that predicts it.
What you'll learn
- How a wavefunction is turned into probabilities (the Born rule).
- How Re ψ, Im ψ and |ψ|² are related, and which of them a position measurement depends on.
- How the height of the histogram bars depends on how many results you have.
- How the measured mean and spread depend on the number of measurements N.
What's on screen
- Upper plot, "Theoretical Function": the prepared state. |ψ(x)|² is violet, Re ψ is blue and Im ψ is pink. Position x is marked in units of σ, from −4σ to +4σ.
- Lower plot, "Measurement Results": blue bars are the record, a pink dashed curve is the theoretical |ψ|², and an amber flash marks the newest result.
- Statistics panel: the number of measurements, their mean and standard deviation, σ = 1.00, and a Convergence bar.
The controls
Press ⌖ on a row to see where that control sits in the sim.
| Control | What it changes | Range | |
|---|---|---|---|
| ⚡ Measure | Takes one batch of position measurements. The results appear one by one in the lower plot. Shortcut: Space. | one batch | |
| Measurements per click | How many measurements one press of Measure takes. | 1, 10, 50, 100, 500, 1000 opens at 100 | |
| Auto Measure | Keeps taking measurements until you stop it (the button reads ⏸ Stop Auto). Shortcut: A. | on / off opens off | |
| Auto-measure rate | How many measurements Auto takes each second. | 1–100 per second opens at 20/s | |
| Animation Speed | How fast the phase of ψ turns in the upper plot. | 0.2×–4.0× opens at 1.0× | |
| View Mode | What the upper plot draws: |ψ(x)|², Re ψ, Im ψ, or Re ψ and Im ψ together. | 4 views opens at |ψ|² | |
| Statistics | Total measurements, Mean Position, Measured Std Dev, Theoretical σ, and the Convergence bar. | panel | |
| Reset | Clears all measurements and statistics. Auto, if it is on, keeps running. Shortcut: R. | top bar |
Fixed: the width is σ = 1, so x is read in units of σ. The state is the same Gaussian every time.
One state, many outcomes
The sim prepares a Gaussian state with width σ and measures its position:
The Born rule turns ψ into probabilities. |ψ(x)|² is a probability density: its integral over an interval is the probability of a result in that interval.
- One measurement returns one number x. Prepare the same state again and the sim returns a different x. The Born rule predicts frequencies: about 68% of results fall within ±1σ, and about 95% within ±2σ.
- ψ has units of 1/√length, so |ψ|² is probability per length. With σ = 1 the peak is 1/√(2π) = 0.399, the top tick on the lower plot.
Re ψ and Im ψ combine into |ψ|²
ψ is a complex number at each x. The sim writes it as a fixed envelope A(x) ≥ 0 times a phase that turns with time, so its two parts swing between +A and −A:
- Re ψ (blue) and Im ψ (pink) go negative for part of each turn. A probability density cannot, and it does not: |ψ|² = (Re ψ)² + (Im ψ)², and squaring removes the sign.
- The dashed outline in the Re and Im views is ±A(x). It never moves. Those views are scaled so that the peak of A is 1 (axis "Amplitude"), unlike the |ψ|² view, whose axis shows density up to 0.399.
Why the bars are densities, not counts
The lower plot has 50 bins of width Δ = 0.16σ across −4σ to +4σ. Each bar is the fraction of results in its bin, divided by Δ:
- Bar area = fraction of results in that bin, so the bars always add up to area 1, whatever N is. Extra data does not raise the bars; it makes them settle onto the dashed curve, which is drawn on the same scale.
- A result beyond ±4σ (about 1 in 16,000) is counted in the statistics but has no bar.
With fewer than about 15 results, a single count is already taller than the plot allows, so its bar is drawn cut off at the top.
How fast the record converges
The Statistics panel estimates two properties of the state: the mean position (0) and the spread (σ = 1). Both estimates scatter around the true value by an amount that shrinks as N grows:
This control moves the sim's Measurements per click too.
- The error falls as 1/√N: halving it costs four times the data, and ten times the data buys about three times the accuracy.
- The Convergence bar is 100(1 − |s − σ|/σ) percent, so it measures only the spread, not the mean.
A turning phase changes no probabilities
In this sim the phase factor e−iωt is the same at every x, so it cancels when you form |ψ|²:
- Only the split between Re ψ and Im ψ changes with time (one full turn takes about 1 s at 1.0×). Every measurable density, and so every histogram, stays the same.
- The distribution does not drift: this state has ⟨p⟩ = 0. A drifting distribution needs a phase that varies with x, such as eikx.
Not modelled: the width stays σ for ever. That is right for a stationary state such as the ground state of a harmonic oscillator, but a free packet released from rest would spread.
Where it matters
- Single-electron interference. In 1989 Tonomura and colleagues sent electrons one at a time through an electron biprism. Each arrived as a single dot, and the interference fringes showed up only after tens of thousands of dots had accumulated.
- Scanning-tunnelling images. Electrons held inside a ring of atoms on a metal surface (a "quantum corral") show up as standing-wave rings. The image brightness follows the local density of states, built from |ψ|² of the electron states.
- Orbital pictures. Chemistry textbooks draw an orbital as a surface of constant |ψ|², commonly chosen to enclose 90% of the probability.
Go deeper: the price of a narrow state
This Gaussian has the smallest possible product of position and momentum spreads, ΔxΔp = ħ/2. The sim does not show momentum, but the relation is why a narrow state is hard to keep still:
It is also the ground state of a harmonic oscillator when σ² = ħ/(2mω₀). Its phase then turns at ω = ω₀/2, which is E₀/ħ.
Summary
Key points
- P(a ≤ x ≤ b) = ∫|ψ|² dx over [a, b], and the total area is 1.
- Re ψ and Im ψ can be negative; |ψ|² = (Re ψ)² + (Im ψ)² cannot.
- The bars are densities, count ÷ (N · 0.16σ), so more data sharpens them without raising them.
- The scatter of the mean and of the spread both shrink as 1/√N.
Common mix-ups
- "Where Re ψ is negative, the probability is negative." The probability density is |ψ|², which is never negative.
- "More measurements make the bars taller." The bars settle onto the curve, and the total area stays 1.
- "The turning phase makes the distribution move." One phase that is the same at every x cancels out of |ψ|².
Things to try on your own
- Set Measurements per click to 10, press Reset, then Measure, and note the Measured Std Dev. Repeat five times and compare the scatter with the typical 0.24 for N = 10.
- Choose Re ψ & Im ψ at 0.2× and time one full turn with a stopwatch (about 5 s). Then try 4.0×.
- Switch Auto Measure on at 100/s and note the Total at which you can no longer see the bars differ from the dashed curve.