🎩 Mermin–Peres Magic Square
A 3×3 square game that no classical team wins every round — quantum teamwork always does.
Opens a free Jupyter session on mybinder.org (via QuBins) — starting it can take a few minutes
git clone the repository, create the conda environment from environment.yml, and open Mermin-Peres-Game.ipynb.Two separated players fill in a 3×3 grid with 0s and 1s — one player a row, the other a column. The parity rules are chosen so that no pre-agreed table of answers can satisfy them all: a short proof shows that the best classical team wins 8 of the 9 possible questions. With two shared pairs of entangled qubits, the quantum team always wins.
The magic square is a clean demonstration of contextuality: measurement outcomes in quantum mechanics cannot be explained by a table of values written down in advance, independent of which other measurements are made alongside — the measurement’s context. The notebook lets you try classical strategies first, then hands you the quantum one. An appendix plays the game on simulated copies of six IBM quantum computers, where noise costs the quantum team some rounds, and, with a free IBM Quantum account, on a real one.