Size: 5px
Opacity: 92%
Ψ TWO-STATE TIME EVOLUTION
System
🎤 PRESENTATION TOOLS
🔴 LASER
✏️ MARKER
Choose each pane's view from its menu · drag the Bloch sphere to rotate it · −/+ zoom the probability plot (double-click resets either) · SPACE = play/pause
⏱️ TIME
t = 0.00
—
0.5×
📊 LIVE READOUTS
c₁(t)—
c₂(t)—
|c₁|², |c₂|²—
Δφ = φ₂−φ₁—
⟨σx⟩, ⟨σy⟩, ⟨σz⟩—
P(+), P(−)—
👁 DISPLAY OPTIONS
Units
×

Two-State Time Evolution

two_state_time_evolution  |  v1.1  |  Sep 29, 2026

Phase, angular frequency and relative phase for a quantum system with two non-degenerate energy eigenstates.

This version assumes a time-independent Hamiltonian: H, its eigenstates and its eigenvalues stay fixed while the state evolves.

QUICK START

  1. Choose the initial state |ψ(0)⟩: one of the six spin states |±⟩z, |±⟩x, |±⟩y, a direction (θ, φ), or |c₂| and φ₂ directly.
  2. Choose the energies E₁ and E₂.
  3. Choose the measurement basis |±⟩: the plot shows P(+) and P(−), the probabilities of the two outcomes.
  4. Press ▶ PLAY. Watch each coefficient rotate in the complex plane at its own angular frequency.
  5. Compare with the Relative phase view: in a frame that rotates with c₁, only c₂ moves, and it moves at ω₂₁ = (E₂ − E₁)/ℏ.
  6. Use 1 / 2 / 4 VIEWS and each pane's menu to choose what is on screen.

SPIN ½ OR QUBIT

The math is identical for any two-state system. The SYSTEM toggle (top left, below SET TO FULL SCREEN) changes the labels. This INFO text uses the spin labels; in QUBIT mode the simulation shows the following instead:

Spin ½Qubit
|+⟩z, |−⟩z|0⟩, |1⟩ (computational basis, |0⟩ at the north pole)
|+⟩x, |−⟩x|+⟩, |−⟩
|+⟩y, |−⟩y|+i⟩, |−i⟩
|+⟩n, |−⟩n|θ,φ⟩ = cos(θ/2)|0⟩ + eiφsin(θ/2)|1⟩, and its orthogonal partner |θ,φ⟩⊥
c₁, c₂, E₁, E₂, ω₂₁, T₂₁c₀, c₁, E₀, E₁, ω₁₀, T₁₀
eV and fs; E from −3 to 5 eVμeV and ns; E from −25 to 25 μeV

The qubit defaults are E₀ = −10.35 μeV and E₁ = +10.35 μeV, i.e. H = −(ℏωq/2)σz with a 5 GHz splitting (20.7 μeV, period 0.2 ns), typical of a superconducting qubit. Each system remembers its own energies when you switch.

THE PHYSICS

1. Stationary states and their phases

Assumption: the Hamiltonian is time independent. That is what makes the energy eigenstates stationary states and gives each coefficient the simple phase factor e−iEnt/ℏ. Changing E₁, E₂ or the eigenstates is not a time-dependent H: it defines a new H and restarts the clock at t = 0.

By default the energy eigenstates are |E₁⟩ = |+⟩z with energy E₁ and |E₂⟩ = |−⟩z with energy E₂ (a spin in a magnetic field along z). The small |±⟩z ✎ button in the ENERGIES panel changes them to |±⟩x, |±⟩y, or |±⟩n for any direction n̂ = (θ, φ). Writing |1⟩ = |E₁⟩ and |2⟩ = |E₂⟩, the Schrödinger equation gives

|ψ(t)⟩ = c₁(0) e−iE₁t/ℏ |1⟩ + c₂(0) e−iE₂t/ℏ |2⟩

Each coefficient keeps its magnitude and only its phase changes. Writing cn(t) = |cn| eiφn(t),

φn(t) = φn(0) − ωn t,    ωn = En/ℏ,    Tn = 2π/|ωn|

So each coefficient is a phasor: an arrow of fixed length |cn| turning in the complex plane at angular frequency ωn. Because of the minus sign, a positive energy turns the arrow clockwise. A negative energy turns it counter-clockwise.

2. The phase convention

An overall phase has no physical meaning, so it is chosen to make c₁(0) real and non-negative. The initial state is then set by just two numbers, both belonging to c₂:

c₂(0) = |c₂| eiφ₂,    c₁(0) = √(1 − |c₂|²)

In terms of the spin direction (θ from the z axis, φ around from the x axis) this is c₁ = cos(θ/2), c₂ = sin(θ/2) eiφ. The six buttons are the usual special cases:

|+⟩z = |1⟩|−⟩z = |2⟩
|+⟩x = (|1⟩ + |2⟩)/√2|−⟩x = (|1⟩ − |2⟩)/√2
|+⟩y = (|1⟩ + i|2⟩)/√2|−⟩y = (|1⟩ − i|2⟩)/√2

The convention fixes the phase only at t = 0. As time runs, c₁(t) turns away from the real axis like any other coefficient.

If the energy eigenstates are not |±⟩z, the initial state is still entered in the z basis with this convention, and the coefficients that evolve are cn(0) = ⟨En|ψ(0)⟩. These are shown in the equation above the views and are generally complex. |±⟩n are written with the same convention: |+⟩n = cos(θ/2)|+⟩z + sin(θ/2)eiφ|−⟩z and |−⟩n = sin(θ/2)|+⟩z − cos(θ/2)eiφ|−⟩z.

3. Probabilities in the energy basis do not change

|cn(t)|² = |cn(0)|² for all t. The arrows never change length, so the probability of measuring E₁ or E₂ is constant: choose the energy eigenbasis as the measurement basis and both curves in the Measurement probabilities view stay flat.

4. Global phase versus relative phase

Multiplying the whole state by one overall phase eiα changes nothing measurable. Factor out c₁'s phase:

|ψ(t)⟩ = eiφ₁(t) [ |c₁| |1⟩ + |c₂| eiΔφ(t) |2⟩ ],    Δφ(t) = Δφ(0) − ω₂₁ t
ω₂₁ = (E₂ − E₁)/ℏ,    T₂₁ = 2π/|ω₂₁|

Only the relative phase Δφ is physical, and it evolves at the difference frequency. The Relative phase view shows this in a frame that rotates with c₁: c₁ stands still and c₂ turns at ω₂₁. Try BOTH E + 1: both arrows speed up, but Δφ and every measurable quantity are unchanged. Adding a constant to the Hamiltonian is unobservable.

5. What does oscillate: measurement probabilities

Choose a measurement basis |±⟩ (|±⟩z, |±⟩x, |±⟩y or |±⟩n). The probabilities of the two outcomes are

P(+) = |⟨+|ψ(t)⟩|²,    P(−) = |⟨−|ψ(t)⟩|²,    P(+) + P(−) = 1

If the measurement basis is the energy eigenbasis, both are constant. For any other basis they contain an interference term that depends on Δφ, so they oscillate at ω₂₁ (the Bohr frequency), not at ω₁ or ω₂. For example, with energy eigenstates |±⟩z and measurement basis |±⟩x:

P(+x) = ½ + |c₁||c₂| cos Δφ(t)

If |ψ(0)⟩ is itself an energy eigenstate, no probability changes at all: a stationary state has no time dependence in any observable.

6. The Bloch sphere

With the convention above, cos(θ/2) = |c₁|, sin(θ/2) = |c₂|, and the azimuth is φ = Δφ. The Bloch vector is (⟨σx⟩, ⟨σy⟩, ⟨σz⟩) = (2|c₁||c₂| cos Δφ, 2|c₁||c₂| sin Δφ, |c₁|² − |c₂|²), with |+⟩z at the north pole. Time evolution is a precession about the energy axis (drawn in orange and blue, labeled E₁ and E₂; the z axis by default) at ω₂₁: the latitude (the probabilities |cn|²) is fixed and only the longitude (the relative phase) changes. The green and yellow dots mark |+⟩ and |−⟩ of the measurement basis. If the state vector makes an angle γ with the green dot, then P(+) = cos²(γ/2) and P(−) = sin²(γ/2).

Units

The UNITS toggle (in DISPLAY OPTIONS) chooses physical units (the default) or ℏ = 1. Physical units depend on the system: eV and fs for a spin and μeV and ns for a qubit. Conveniently, ℏ = 0.6582 in both (0.6582 eV·fs = 0.6582 μeV·ns), so a period is T = h/E = 4.136 fs ÷ E(eV), or 4.136 ns ÷ E(μeV). With the spin defaults E₁ = 1 eV and E₂ = 2.5 eV: T₁ = 4.14 fs, T₂ = 1.65 fs and T₂₁ = 2.76 fs (a 1.5 eV gap is a near-infrared photon, the scale of atomic transitions). ℏ = 1 is dimensionless: energies in a unit ε, angular frequencies in ε/ℏ and time in ℏ/ε, so ω equals E numerically. Switching units keeps the energy numbers and resets t to 0.

CONTROLS

  • Initial state: the six buttons choose |±⟩z, |±⟩x, |±⟩y. (θ, φ) opens sliders for a direction in space, in units of π. |c₂|, φ₂ opens sliders for the |−⟩z coefficient directly, and the |+⟩z coefficient follows from normalization. The two slider modes describe the same state, so switching between them keeps it.
  • Measurement basis: |±⟩z, |±⟩x, |±⟩y or |±⟩n(θ, φ). The Measurement probabilities view plots P(+) and P(−); its −/+ buttons zoom the time axis.
  • Resetting the clock: changing the initial state, the energy eigenstates or an energy sets t back to 0. Changing the measurement basis does not, because it only changes what is being measured.
  • Define Hamiltonian: the DEFINE HAMILTONIAN panel starts collapsed and shows a summary of the eigenstates and energies; click it to open it in place. EIGENSTATES opens a pop-up to choose |±⟩z (default), |±⟩x, |±⟩y or |±⟩n(θ, φ). MATRIX REPRESENTATION shows H as a 2×2 matrix in the z, x or y basis (or n, when the eigenstates are |±⟩n). The level diagram labels each line with its ket. Changing the eigenstates resets t to 0.
  • Energies: E₁, E₂ from −3 to 5 eV for a spin (−25 to 25 μeV for a qubit). The panel lists ω₁, ω₂, ω₂₁ and the matching periods. BOTH E ± 1 shifts the zero of energy.
  • Time: PLAY/PAUSE (or SPACE), reset to t = 0, step forward or back, and jump ahead by exactly one period T₁, T₂ or T₂₁. Every arrow that period belongs to returns to where it started.
  • Display: TRAILS show where each arrow was a moment ago. PHASE ARCS mark each phase angle from the real axis. ω ARROWS show the sense and rate of rotation, with the arc length proportional to ω. PROJECTIONS drop the Re/Im components onto the axes, and on the Bloch sphere drop the vector onto the equator.
  • Views: Rotating phasors, Relative phase, Bloch sphere, Measurement probabilities. Any pane can show any view.
  • Reset to defaults: RESET TO DEFAULTS (top left, click twice) puts every setting back to how the page opened. It keeps full screen, the presentation tools and the SPIN ½ / QUBIT choice.
  • Magnetic field: for a spin, the ENERGIES / MAGNETIC FIELD toggle at the top of DEFINE HAMILTONIAN sets H with a field B₀ in tesla instead, and adds an oscillating field that makes H time dependent (magnetic resonance).
  • Presentation tools: SET TO FULL SCREEN (top left), a laser pointer and a markerboard for drawing over the screen.

THINGS TO TRY

  1. Start in |+⟩z. The arrow turns, but does anything measurable change? Try every measurement basis.
  2. Start in |+⟩x and measure in the x basis. Pause and press + T₁. Which arrow returns to its starting position? Reset and press + T₂₁. What returns now, and what is P(+)?
  3. Start in |+⟩x and compare the x and y measurement bases. How are the two P(+) curves shifted relative to each other? Why?
  4. Set E₂ = 2E₁. How many turns does c₂ make while c₁ makes one?
  5. Press BOTH E + 1. Which views change and which do not? Why?
  6. Make E₁ negative. Which way does c₁ turn now?
  7. Slide E₂ toward E₁. What happens to T₂₁ and to the oscillation of P(+)?
  8. Start in |+⟩z, measure in the z basis, and change the energy eigenstates to |±⟩x. Why do P(+) and P(−) now swap back and forth between 1 and 0? Watch the Bloch sphere.
  9. Use (θ, φ) to start at θ = 0.25π and measure in the x basis. What is the largest P(+)? Check your answer on the Bloch sphere.

MAGNETIC-FIELD MODE

This section describes the mode chosen with MAGNETIC FIELD at the top of DEFINE HAMILTONIAN.

A spin in a static field

A spin in a field B₀ along n̂ has H = −μ·B₀ with μ = γS (proton) or μ = −γS (electron, neutron), so E = ±ℏω₀/2 with the Larmor frequency ω₀ = γB₀. For the electron and neutron |+⟩n is the upper level; for the proton it is the lower one, so its phasors and its precession turn the other way. The energies are symmetric about zero, so ω₂₁ = ∓ω₀.

Magnetic resonance: a time-dependent H

The OSCILLATING DRIVE adds a field B₁cos(ωt) perpendicular to B₀. With B₀ along z (following L. Engelhardt, Am. J. Phys. 83, 1051 (2015)),

H(t)/ℏ = ω₀ Sz + Ω Sx cos(ωt),    ω₀ = γB₀,    Ω = γB₁

(S in units of ℏ for an electron or neutron; the proton's H has the opposite sign. Ω is called ω₁ in the paper; here ω₁ already means E₁/ℏ.) The energy eigenstates of H₀ are no longer stationary: |c₁| and |c₂| change, so the arrows change length and the Bloch vector leaves its circle. There is no closed-form solution, so the simulation integrates the Schrödinger equation numerically (exactly unitary steps; because H(t) repeats every drive period, one period is enough to reach any time).

Resonance. When ω = ω₀ the spin flips completely: starting in |+⟩z, P(−z) reaches 1 at the flip time τ = 2π/Ω. Off resonance the flip is incomplete, with pflip ≈ (Ω/2)²/[(Ω/2)² + (ω − ω₀)²], a peak of full width Ω (Rabi's formula). The + τ button jumps by the time of the largest flip, π/√((Ω/2)² + (ω − ω₀)²).

Why it flips. The spin precesses about the total field B(t) (the red arrow on the Bloch sphere). The drive tips B(t) back and forth; on resonance the tip reverses each time the spin is at the bottom of its precession, so the spin spirals from the north pole to the south pole. The small wiggles in P(t), 2ω₀/Ω of them per flip, come from the spin being pulled down twice per drive cycle.

Illustrative or realistic. ILLUSTRATIVE uses strong drives (Ω/ω₀ around 0.1, as in the paper) so the spiral and the wiggles can be seen. REALISTIC uses laboratory strengths (B₁ from 1 μT to 1 mT): Ω/ω₀ is about 10−² or much less, so a flip takes hundreds to millions of Larmor turns. Then the views are strobed: the arrows are shown once every two drive periods, like a strobe light synchronized to the drive, and the fast precession is drawn as a blur (its speed on screen is only for show). The probability plot shows the band that the fast precession sweeps. The detuning is set in units of Ω, and playback speed scales to the flip time.

Units in this mode

This mode uses μeV and ns, with fields in tesla (the SET BY toggle shows angular frequencies ω₀ = γB₀ and Ω = γB₁ in rad/ns instead). Conveniently ℏ = 0.6582 μeV·ns, so a period is T = h/E = 4.136 ns ÷ E(μeV). Gyromagnetic ratios: electron 176.1 rad/ns/T (28.02 GHz/T), proton 0.2675 rad/ns/T (42.58 MHz/T), neutron 0.1832 rad/ns/T (29.16 MHz/T). The electron default, B₀ = 0.35 T, is an X-band ESR field (ω₀/2π = 9.8 GHz); the proton default, 3 T, is an MRI field (128 MHz). Note that f = ω/2π: a “GHz” that is really rad/ns is off by 2π.

Controls in this mode

  • Field: choose ELECTRON, PROTON or NEUTRON and set B₀ (0–1 T for the electron, 0–10 T for the nuclei), by slider or by dragging a level; B₀ DIRECTION sets its direction. SET BY shows the field as an angular frequency instead. Switching back to ENERGIES returns to E₁ and E₂ as they were.
  • Oscillating drive: (just below the ENERGIES / MAGNETIC FIELD toggle) ON/OFF; switching it on sets up magnetic resonance (B₀ along z, start in |+⟩z, measure along z, t = 0) and shows all four views, with Relative phase and the Bloch sphere below. Then ILLUSTRATIVE or REALISTIC range, the strength B₁ (or Ω), and the frequency ω (realistic range: the detuning in units of Ω). ω = ω₀ tunes to resonance. The level diagram draws the drive's photon energy ℏω next to the gap. The readouts give ω₀, Ω/ω₀ and the flip time τ.
  • Time: with the drive on, + τ jumps ahead by one flip time.

Things to try

  1. Magnetic resonance. Start in |+⟩z, measure in z, and turn the drive ON (on resonance). Watch the Bloch vector spiral down. Press + τ: is the spin flipped?
  2. Count the small wiggles in P(t) between t = 0 and τ. Compare with 2ω₀/Ω. Halve B₁: what happens to τ and to the number of wiggles?
  3. Move ω away from ω₀ by about Ω/2, then by 2Ω. What is the largest P(−z) now? Compare with Rabi's formula in section 7.
  4. Set ω = 0: now B₁ is a static tilt. Why does the spin no longer flip?
  5. Switch to REALISTIC. How many Larmor turns does one flip take? Why does a small B₁ make magnetic resonance such a precise probe of B₀?

CREDITS & LICENSE

Larry Engelhardt, Francis Marion University
Built with Claude Opus 5.5, 2026. Layout, styling and presentation tools adapted from the
Electric Charge Simulator v7.02 by Mehmet Fatih Tasar, Georgia State University.

This work is licensed under a CC BY-NC-SA 4.0 International License.