
Exploring Quantum Entanglement: CHSH Game Simulator
The CHSH game is a two-player experiment that demonstrates how quantum entanglement produces correlations impossible under classical physics. In this interactive CHSH game simulator, you can compare the classical maximum win rate of 75% with the quantum result of approximately 85.4%, explore all four Bell states, and see Bell’s inequality violated in real time.
1 · How to Play the CHSH Game
The CHSH (Clauser-Horne-Shimony-Holt) game is a cooperative thought experiment that reveals the strange power of quantum entanglement. Two players, Alice and Bob, cannot communicate during the game but may share a pre-agreed strategy or, crucially, a pair of entangled qubits.
- The referee gives Alice a random input bit x and Bob a random input bit y.
- Without communicating, Alice returns a and Bob returns b.
- They win when
a ⊕ b = x ∧ y: their answers match unless both input bits are 1. - Repeat many rounds and compare the classical and quantum win rates.
| Player | Receives from referee | Outputs |
|---|---|---|
| Alice | Random bit x | Bit a |
| Bob | Random bit y | Bit b |
They win if and only if:
Worked example: one CHSH round
Suppose the referee sends x = 1 to Alice and y = 1 to Bob. Their winning condition is a ⊕ b = 1, so their output bits must differ. If Alice answers a = 0 and Bob answers b = 1, then 0 ⊕ 1 = 1 and they win the round.
2 · Classical vs Quantum CHSH Strategies
In 1964, John Bell proved that no local hidden variable theory can reproduce all predictions of quantum mechanics. The CHSH inequality formalises Bell’s theorem as a single testable number S:
| Theory | CHSH Value (S) | Win Rate |
|---|---|---|
| Classical (any local strategy) | S ≤ 2 |
75% |
| Quantum mechanics | S = 2√2 ≈ 2.828 |
~85.4% |
Why is the quantum CHSH win rate 85.4%?
The optimal quantum strategy wins with probability cos²(π/8) = (2 + √2) / 4 ≈ 0.8536. Carefully chosen measurement angles turn entanglement into correlations stronger than any local classical strategy can produce.
This violation is not a loophole or a trick. It proves that the correlations produced by entangled qubits cannot be explained by any shared classical information, even with pre-agreed randomness. Loophole-free Bell test experiments confirm that quantum entanglement is a genuine physical phenomenon with no classical analogue.
3 · Measurement Angles and Quantum Correlation
The quantum advantage arises from choosing measurement bases at specific angles. For the standard |Φ+⟩ Bell state, the optimal angles are:
| Player | Input bit | Measurement basis |
|---|---|---|
| Alice | x = 0 | 0° |
| Alice | x = 1 | 45° |
| Bob | y = 0 | 22.5° |
| Bob | y = 1 | −22.5° |
The probability that Alice and Bob produce the same outcome is:
where δ is the angle between their chosen measurement bases. This quantum correlation is what enables them to exceed the 75% classical ceiling. Different Bell states exhibit either parallel correlation (|Φ+⟩, |Ψ+⟩: qubits tend to give the same outcome) or orthogonal correlation (|Φ−⟩, |Ψ−⟩: one qubit effectively rotated 90° relative to the other). The simulator adjusts its probability calculations accordingly for each state.
🧪 4 · The Four Bell States
The simulator supports all four maximally entangled Bell states. Each uses optimised measurement angles to achieve the theoretical quantum win rate of ~85%.
| State | Definition | Correlation |
|---|---|---|
| |Φ+⟩ | (|00⟩ + |11⟩) / √2 | Parallel |
| |Φ−⟩ | (|00⟩ − |11⟩) / √2 | Orthogonal |
| |Ψ+⟩ | (|01⟩ + |10⟩) / √2 | Parallel |
| |Ψ−⟩ | (|01⟩ − |10⟩) / √2 | Orthogonal |
🎯 5 · CHSH Game Simulator Features
| Feature | Details |
|---|---|
| 🎯 Interactive Visualization | Real-time p5.js visualization showing the entangled state, Alice’s measurement collapse, and Bob’s final measurement. Coloured basis quadrants and correlation indicators included. |
| 🎮 Strategy Comparison | Switch between Classical (always outputs 0, max 75%) and Quantum (entangled qubits, ~85.4%) strategies in real time. |
| 🎲 Flexible Input Controls | Set Alice’s x and Bob’s y to Random or Fixed (0 or 1) to test specific measurement configurations. |
| 📊 Real-Time Statistics | Running totals for rounds played, wins, losses, and win percentage converging toward theoretical predictions. |
| 🔄 Round History Navigation | Step through previous rounds to review specific outcomes and trace the quantum measurement process. |
6 · Try the Quantum Entanglement Simulator
A suggested sequence to build intuition:
- Open the simulator and select the Classical strategy. Run 100 rounds and watch the win rate converge toward 75%.
- Switch to the Quantum strategy with the |Φ+⟩ Bell state. Run another 100 rounds and observe the rate climb toward 85%.
- Try the other three Bell states. Note how each state’s correlation type (parallel vs orthogonal) affects the outcome distribution.
- Set Alice and Bob’s inputs to Fixed values to test individual measurement configurations and trace the correlation manually.
- Use Round History to step back through specific rounds and verify the win condition
(a + b) mod 2 = x × yby hand.
7 · Open Source Code on GitHub
The complete source code is on GitHub. Contributions welcome: explore the code, report issues, suggest improvements, or fork it to build your own quantum visualisations.
Planned enhancements include a 3D Bloch sphere visualisation (Three.js), step-by-step animated transitions, an in-app educational tutorial, a mathematical deep-dive panel, and improved mobile layout.
The CHSH game demonstrates that quantum entanglement is not a mathematical abstraction but a measurable, observable phenomenon with no classical analogue. This simulator makes that phenomenon interactive and accessible to anyone curious about quantum mechanics.
Further reading
QUANTUM SERIES 2026 · Quantum Entanglement and Bell Inequalities
✦ This article was generated with the assistance of Claude by Anthropic ✦
Malcolm Low is an Associate Professor at the Singapore Institute of Technology, writing on quantum computing, programming, and applied computing from Singapore.
Website: malcolmlow.com · Singapore
What is the CHSH game?
The CHSH game is a thought experiment used to test Bell’s inequality — two players, unable to communicate during the round, try to win a coordination game more often than classical physics allows, using entangled qubits shared in advance.
What is Bell’s inequality?
Bell’s inequality sets an upper limit — 75% — on how often two players can win the CHSH game using any classical (non-quantum) strategy, no matter how cleverly they coordinate beforehand.
Can quantum entanglement really beat 75% in the CHSH game?
Yes — using entangled qubits and the right measurement angles, quantum strategies can win roughly 85% of rounds, provably exceeding the classical limit set by Bell’s inequality.
Why does the CHSH game matter for quantum computing?
It’s one of the clearest experimental demonstrations that quantum mechanics behaves fundamentally differently from classical physics, and the same entanglement principles underpin many practical quantum algorithms.
Where entanglement goes next: See how shared entanglement enables quantum teleportation without cloning a qubit.
Share this:
- Share on Facebook (Opens in new window) Facebook
- Email a link to a friend (Opens in new window) Email
- Share on LinkedIn (Opens in new window) LinkedIn
- Share on Telegram (Opens in new window) Telegram
- Share on WhatsApp (Opens in new window) WhatsApp
- More
- Share on Bluesky (Opens in new window) Bluesky
- Print (Opens in new window) Print
- Share on Threads (Opens in new window) Threads
- Share on Reddit (Opens in new window) Reddit
- Share on Tumblr (Opens in new window) Tumblr
- Share on Pinterest (Opens in new window) Pinterest
- Share on X (Opens in new window) X
Leave a comment