Two qubits, 4 complex amplitudes. Prepare a Bell state with real gates (H on qubit A, then CNOT). Each qubit alone is maximally mixed (Bloch vector length 0) while the pair is perfectly correlated.
2D twin. This page runs exactly the same solver, qubit algebra and Bell/CHSH code as the 3D twin (one shared file, assets/core.js), so every number is identical. Here the state is drawn as plots: phase-coloured probability density with V(x) and <H> on one energy scale, a rotatable Bloch sphere with its three coordinate-plane projections, and the correlation curve E(a,b) with the CHSH bound chart.
Wave packet. Units are hbar = m = 1. The state obeys i d psi/dt = [ -1/2 d^2/dx^2 + V(x) ] psi. It is advanced with the Strang split-step Fourier scheme psi -> e^{-iV dt/2} F^-1 e^{-i k^2 dt/2} F e^{-iV dt/2} psi on a 1024-point grid (own radix-2 FFT). The scheme is unitary, second order in dt and exact for V = 0.
Initial state: psi = (2 pi sigma^2)^(-1/4) exp(-(x-x0)^2/(4 sigma^2) + i k0 x), so |psi|^2 has standard deviation sigma and mean momentum k0. Free spreading: sigma(t) = sigma sqrt(1 + (t/(2 sigma^2))^2). Harmonic trap: <x>(t) = x0 cos(wt) + (k0/w) sin(wt) and the packet revives after T = 2 pi/w.
Tunnelling. Walls are smoothed over 0.12 length units (tanh) so the grid resolves them; this makes the effective barrier very slightly narrower than the sharp-wall formula, a difference well below 1 percentage point. For a rectangular barrier and E < V0: T = 1/(1 + V0^2 sinh^2(kappa a) / (4 E (V0 - E))), kappa = sqrt(2(V0 - E)); for E > V0 sinh becomes sin(k2 a) with k2 = sqrt(2(E - V0)) and the denominator 4E(E - V0). A real packet has a k-spread sigma_k = 1/(2 sigma), so the experiment compares the simulated transmitted probability with T(E) weighted by the packet's |phi(k)|^2.
Measurement. "Measure position" draws x from |psi|^2 (Born rule) and multiplies psi by a Gaussian of width 0.5 around the result (finite-resolution collapse), then renormalises.
Qubit. |psi> = alpha|0> + beta|1>, Bloch vector (x,y,z) = (2 Re a*b, 2 Im a*b, |a|^2 - |b|^2). Gates are exact 2x2 unitaries (H, X, Y, Z, S, T, Rx/Ry/Rz). The Rabi drive integrates i d|psi>/dt = (Omega/2 (cos phi sx + sin phi sy) + Delta/2 sz)|psi> with RK4 and is checked against P1 = Omega^2/(Omega^2+Delta^2) sin^2(sqrt(Omega^2+Delta^2) t/2).
Bell test. For the state (|00>+|11>)/sqrt2 and observables A(theta) = cos theta Z + sin theta X, the correlation is E(a,b) = cos(a-b). The CHSH sum S = E(a,b) + E(a,b') + E(a',b) - E(a',b') reaches 2 sqrt2 = 2.828 for a=0, a'=pi/2, b=pi/4, b'=-pi/4, while any local hidden-variable model gives |S| <= 2.
Simplifications. 1D, single particle, no spin or decoherence in the packet mode; absorbing layers (a smooth mask on the outer 10 % of the box) remove outgoing probability, which is tracked as "absorbed". The qubit is ideal (no T1/T2). Shot noise in the Bell test is real sampling noise, not added by hand.