A real CHSH/Bell test computed live in 2D. Two analyzer stations measure a singlet-state pair along four independently adjustable angles. The correlation between outcomes at each angle pair is computed directly from the quantum-mechanical formula, and also verified by genuine Monte-Carlo sampling.
Quantum correlation (formula, evaluated live):
E(a,b) = -cos(a - b)
Monte-Carlo trial (drawn from the actual joint
distribution, not looked up):
outcome A = ±1 with 50/50 probability
P(B=A | a,b) = sin²((a-b)/2)
outcome B = A with that probability, else -A
→ average(A·B) converges to -cos(a-b) as trials→∞
CHSH statistic:
S = E(a,b) - E(a,b') + E(a',b) + E(a',b')
Classical local-hidden-variable theories are bounded
by |S| ≤ 2. Quantum mechanics allows |S| up to the
Tsirelson bound 2√2 ≈ 2.8284, reached exactly at
a=0°, a'=90°, b=45°, b'=135°.
- a / a′ / b′ sliders — the four independent analyzer angles feeding all four correlations at once.
- Set Tsirelson-optimal angles — jumps to the textbook a=0°, a′=90°, b=45°, b′=135° configuration, where S reaches its quantum maximum.
- Sweep chart below the stage holds a=0°, a′=90°, b′=135° fixed and sweeps b from 0° to 180°, plotting S(b) from the same live formula — the curve peaks exactly at b=45°, confirming the optimum numerically rather than by assertion.
- Monte-Carlo verification — the paired dots flying to each station are drawn from a from-scratch random sampler consistent with the quantum joint distribution at the current (a,b); its running average of A·B converges to the formula value E(a,b), the same check used to certify entanglement in real physics labs.