Simple Algorithm
Quantum Computing · Excited State · 24 min

Bell Inequalities & Nonlocality

The CHSH game: a measurable proof that nature is not classical.

In 1935 Einstein, Podolsky and Rosen argued that entangled particles must carry hidden instructions. In 1964 John Bell showed that this idea makes a testable prediction, and nature fails the test. Today the test is a game: no classical team wins the CHSH game more than 75% of the time, while players sharing entangled qubits win about 85% of the time.

What you’ll learn

  • Define a local hidden-variable (LHV) model and name the assumptions it encodes.
  • Prove the CHSH inequality ∣S∣≤2\abs{S}\le 2 by reducing every local strategy to deterministic ones.
  • Derive the correlation E(α,β)=cos⁡(α−β)E(\alpha,\beta)=\cos(\alpha-\beta) for ∣Φ+⟩\ket{\Phi^+} and the quantum value S=22S=2\sqrt2.
  • Convert between the CHSH value and the game's winning probability, pwin=12+S8p_{\text{win}}=\tfrac12+\tfrac S8.
  • Explain why a Bell violation rules out local hidden variables but cannot be used to send signals.

Hidden instructions?

Give Alice and Bob the two halves of a Bell pair ∣Φ+⟩=12(∣00⟩+∣11⟩)\ket{\Phi^+}=\tfrac{1}{\sqrt2}(\ket{00}+\ket{11}) and send them far apart. If both measure ZZ, their bits always agree, yet each bit on its own is a fair coin.

Einstein, Podolsky and Rosen (EPR, 1935) read this as incompleteness: the outcomes must have been fixed at the source, like two sealed envelopes holding matching cards, and quantum mechanics merely does not know which card is inside. A theory of such pre-set answers is a local hidden-variable (LHV) model.

The CHSH game

Clauser, Horne, Shimony and Holt (CHSH, 1969) turned Bell's idea into a robust test. In game form, a referee sends Alice a uniformly random bit xx and Bob a uniformly random bit yy. Without communicating, they reply with bits aa and bb. They win if

a⊕b=x∧y,a\oplus b = x\wedge y,

so their answers must agree unless both received 11, in which case they must disagree.

Questions (x,y)(x,y)x∧yx\wedge yTo win
(0,0)(0,0)00a=ba=b
(0,1)(0,1)00a=ba=b
(1,0)(1,0)00a=ba=b
(1,1)(1,1)11a≠ba\ne b
Predict before you look

What is the highest winning probability a classical team can achieve? Shared randomness and any pre-agreed plan are allowed; entanglement and communication during the game are not.

Show the answer

75 %

Always answering 00 wins the three rows that ask for agreement and loses (1,1)(1,1): 75%75\%. The derivation below shows that no classical strategy does better.

DerivationNo deterministic strategy wins all four rows
  1. a0⊕b0=0,a0⊕b1=0,a1⊕b0=0,a1⊕b1=1a_0\oplus b_0=0,\qquad a_0\oplus b_1=0,\qquad a_1\oplus b_0=0,\qquad a_1\oplus b_1=1

    A deterministic strategy is four bits: Alice's answer axa_x to each question and Bob's answer byb_y. Winning every row requires all four equations.

  2. (a0⊕b0)⊕(a0⊕b1)⊕(a1⊕b0)⊕(a1⊕b1)=0(a_0\oplus b_0)\oplus(a_0\oplus b_1)\oplus(a_1\oplus b_0)\oplus(a_1\oplus b_1)=0

    Add the left-hand sides mod 2: every variable appears exactly twice, so the sum is 00.

  3. 0⊕0⊕0⊕1=1≠00\oplus0\oplus0\oplus1 = 1\neq 0

    The right-hand sides add to 11. Contradiction: at most three of the four equations can hold.

  4. pwindet≤34p_{\text{win}}^{\text{det}}\le\tfrac34

    Each question pair has probability 14\tfrac14, and at least one of them is lost.

Correlators and the CHSH inequality

Physicists usually state the same bound with ±1\pm1 outcomes. Let Ax=(−1)aA_x=(-1)^{a} be Alice's outcome when asked xx, similarly By=(−1)bB_y=(-1)^{b}, and define the correlators Exy=⟨AxBy⟩E_{xy}=\expval{A_xB_y}, the average of the product. The CHSH combination is

S=E00+E01+E10−E11.S=E_{00}+E_{01}+E_{10}-E_{11}.
DerivationThe CHSH inequality
  1. Sλ=A0B0+A0B1+A1B0−A1B1=A0 (B0+B1)+A1 (B0−B1)S_\lambda = A_0B_0+A_0B_1+A_1B_0-A_1B_1 = A_0\,(B_0+B_1)+A_1\,(B_0-B_1)

    Fix λ\lambda. Every Ax,ByA_x,B_y is now a definite number ±1\pm1 (locality: AxA_x does not depend on yy), and the four products regroup.

  2. B0=B1 ⇒ Sλ=2A0B0,B0=−B1 ⇒ Sλ=2A1B0B_0=B_1\ \Rightarrow\ S_\lambda=2A_0B_0,\qquad B_0=-B_1\ \Rightarrow\ S_\lambda=2A_1B_0

    One bracket is ±2\pm2 and the other is 00.

  3. Sλ∈{−2,+2}S_\lambda\in\{-2,+2\}

    Every deterministic strategy gives exactly ±2\pm2.

  4. ∣S∣=∣∑λp(λ) Sλ∣≤∑λp(λ) ∣Sλ∣=2\abs{S}=\Bigl|\sum_\lambda p(\lambda)\,S_\lambda\Bigr|\le\sum_\lambda p(\lambda)\,\abs{S_\lambda}=2

    Measurement independence lets the same p(λ)p(\lambda) appear in all four correlators, so SS is an average of the SλS_\lambda and cannot leave [−2,2][-2,2].

DerivationFrom S to the winning probability
  1. P(win∣x,y)=1+(−1)xyExy2P(\text{win}\mid x,y)=\frac{1+(-1)^{xy}E_{xy}}{2}

    AxBy=(−1)a⊕bA_xB_y=(-1)^{a\oplus b}, so P(a=b)=1+Exy2P(a=b)=\tfrac{1+E_{xy}}{2}. In row (1,1)(1,1) the players must disagree, which flips the sign.

  2. pwin=14∑x,y1+(−1)xyExy2=12+S8p_{\text{win}}=\frac14\sum_{x,y}\frac{1+(-1)^{xy}E_{xy}}{2}=\frac12+\frac{S}{8}

    Average over the four equally likely question pairs.

  3. S≤2  ⟺  pwin≤34S\le 2\iff p_{\text{win}}\le\tfrac34

    The CHSH inequality is the 75% bound, written in a different currency.

Think first An experiment reports E00=E01=E10=0.6E_{00}=E_{01}=E_{10}=0.6 and E11=−0.6E_{11}=-0.6. Can a local hidden-variable model explain it, and what is the corresponding win rate?

S=0.6+0.6+0.6+0.6=2.4>2S=0.6+0.6+0.6+0.6=2.4>2, so no LHV model can produce these correlators. The win rate is 12+2.48=0.8\tfrac12+\tfrac{2.4}{8}=0.8.

The quantum strategy: S = 2√2

Now let Alice and Bob share ∣Φ+⟩\ket{\Phi^+} and measure along directions in the X–Z plane of the Bloch sphere. Measuring at Bloch angle θ\theta means measuring the observable

A(θ)=cos⁡θ Z+sin⁡θ X,A(\theta)=\cos\theta\,Z+\sin\theta\,X,

whose eigenvalues are ±1\pm1; θ=0\theta=0 is ZZ and θ=π/2\theta=\pi/2 is XX.

DerivationCorrelations of Φ⁺ and the optimal angles
  1. ⟨Φ+|Z⊗Z|Φ+⟩=1,⟨Φ+|X⊗X|Φ+⟩=1\mel{\Phi^+}{Z\otimes Z}{\Phi^+}=1,\qquad \mel{\Phi^+}{X\otimes X}{\Phi^+}=1

    Z⊗ZZ\otimes Z fixes ∣00⟩\ket{00} and ∣11⟩\ket{11}; X⊗XX\otimes X swaps them. Either way ∣Φ+⟩\ket{\Phi^+} is a +1+1 eigenstate.

  2. ⟨Φ+|Z⊗X|Φ+⟩=⟨Φ+|X⊗Z|Φ+⟩=0\mel{\Phi^+}{Z\otimes X}{\Phi^+}=\mel{\Phi^+}{X\otimes Z}{\Phi^+}=0

    Z⊗XZ\otimes X maps ∣00⟩+∣11⟩\ket{00}+\ket{11} to ∣01⟩−∣10⟩\ket{01}-\ket{10}, which is orthogonal to ∣Φ+⟩\ket{\Phi^+}; the same holds for X⊗ZX\otimes Z.

  3. E(α,β)=⟨Φ+|A(α)⊗A(β)|Φ+⟩=cos⁡αcos⁡β+sin⁡αsin⁡β=cos⁡(α−β)E(\alpha,\beta)=\mel{\Phi^+}{A(\alpha)\otimes A(\beta)}{\Phi^+}=\cos\alpha\cos\beta+\sin\alpha\sin\beta=\cos(\alpha-\beta)

    Expand A(α)⊗A(β)A(\alpha)\otimes A(\beta) into four terms; only ZZZZ and XXXX survive.

  4. α0=0,α1=π2,β0=π4,β1=−π4\alpha_0=0,\quad \alpha_1=\tfrac{\pi}{2},\qquad \beta_0=\tfrac{\pi}{4},\quad \beta_1=-\tfrac{\pi}{4}

    Alice measures ZZ or XX. Bob measures along the two diagonals, (Z±X)/2(Z\pm X)/\sqrt2.

  5. S=cos⁡π4+cos⁡π4+cos⁡π4−cos⁡3π4=42=22≈2.83S=\cos\tfrac{\pi}{4}+\cos\tfrac{\pi}{4}+\cos\tfrac{\pi}{4}-\cos\tfrac{3\pi}{4}=\frac{4}{\sqrt2}=2\sqrt2\approx2.83

    Three angle pairs differ by 45°45°. The fourth, (α1,β1)(\alpha_1,\beta_1), differs by 135°135°; its cosine is negative, and the minus sign in SS turns it into a gain.

Predict before you look

With S=22S=2\sqrt2, what winning probability does pwin=12+S8p_{\text{win}}=\tfrac12+\tfrac S8 give?

Show the answer

85.4 %

12+228=2+24=cos⁡2π8≈85.4%\tfrac12+\tfrac{2\sqrt2}{8}=\tfrac{2+\sqrt2}{4}=\cos^2\tfrac{\pi}{8}\approx85.4\%. Every question pair is won with this same probability: in the three "agree" rows E=cos⁡45°E=\cos45°, so P(a=b)=1+1/22P(a=b)=\tfrac{1+1/\sqrt2}{2}, and in row (1,1)(1,1) E=−cos⁡45°E=-\cos45° gives the same probability of disagreeing.

What a violation does and does not mean

Experiments since the 1970s violate the CHSH inequality, so at least one LHV assumption fails in nature. Quantum mechanics gives up local hidden variables. It does not give up no-signalling, as a short calculation shows.

DerivationBob's choice leaves no trace in Alice's data
  1. ρA=Tr⁡B∣Φ+⟩ ⁣⟨Φ+∣=12 I\rho_A=\Tr_B\dyad{\Phi^+}=\tfrac12\,\id

    Alice's reduced state is maximally mixed (see the partial trace).

  2. P(a∣x,y)=∑bTr⁡[(Πax⊗Πby) ρ]=Tr⁡[(Πax⊗∑bΠby)ρ]=Tr⁡[Πax ρA]P(a\mid x,y)=\sum_b\Tr\big[(\Pi^x_a\otimes\Pi^y_b)\,\rho\big]=\Tr\Big[\big(\Pi^x_a\otimes\textstyle\sum_b\Pi^y_b\big)\rho\Big]=\Tr\big[\Pi^x_a\,\rho_A\big]

    Summing over Bob's outcomes replaces his projectors by ∑bΠby=I\sum_b\Pi^y_b=\id, whatever his setting yy is.

  3. P(a∣x,y)=12for all a, x, yP(a\mid x,y)=\tfrac12\quad\text{for all } a,\,x,\,y

    Each side sees fair coins. The correlations appear only when the two lists of results are compared, which requires an ordinary classical channel.

Which assumption fails? Bell's theorem says you cannot keep locality, hidden variables and measurement independence all at once. Nonlocal hidden-variable theories such as Bohmian mechanics remain logically possible, but they must be explicitly nonlocal. Theories that deny measurement independence ("superdeterminism") are possible in principle; most physicists regard them as conspiratorial.

Check your understanding

A loophole-free experiment measures S=2.6±0.1S=2.6\pm0.1. Which conclusion is justified?

  1. Alice can now send Bob messages faster than light
  2. No local hidden-variable model with settings chosen independently of λ\lambda can reproduce the data
  3. Every hidden-variable theory is ruled out
  4. The source must have emitted product states
Show the answer

B. No local hidden-variable model with settings chosen independently of λ\lambda can reproduce the data

S>2S>2 by many standard deviations violates the CHSH inequality, which every local model with measurement independence obeys. Nothing more is implied: marginals stay independent of the distant setting, and nonlocal hidden-variable theories are not excluded.

Key takeaways

  • Local hidden-variable models (locality + hidden variables + measurement independence) obey ∣S∣≤2\abs{S}\le2, equivalently a CHSH winning probability of at most 34\tfrac34.
  • The proof: every local strategy is a mixture of deterministic ones, and each deterministic strategy gives S=±2S=\pm2.
  • For ∣Φ+⟩\ket{\Phi^+}, E=cos⁡(θA−θB)E=\cos(\theta_A-\theta_B); with Alice at 0°,90°0°,90° and Bob at ±45°\pm45° (Bloch angles), S=22S=2\sqrt2 and pwin=cos⁡2(π/8)≈85.4%p_{\text{win}}=\cos^2(\pi/8)\approx85.4\%.
  • A violation rules out local hidden variables, yet no-signalling holds: each party's marginal statistics ignore the distant setting.
  • 222\sqrt2 is the quantum maximum (Tsirelson's bound), and loophole-free experiments since 2015 confirm the violation.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

A Bell test finds E00=E01=E10=0.65E_{00}=E_{01}=E_{10}=0.65 and E11=−0.65E_{11}=-0.65. What CHSH winning probability does this correspond to?

  1. 0.650.65
  2. 0.8250.825
  3. 0.750.75
  4. 0.8540.854
Show the answer

B. 0.8250.825

S=4×0.65=2.6S=4\times0.65=2.6, so pwin=12+2.68=0.825p_{\text{win}}=\tfrac12+\tfrac{2.6}{8}=0.825. This beats the classical 0.750.75 but stays below the quantum maximum cos⁡2(π/8)≈0.854\cos^2(\pi/8)\approx0.854.

Question 2

Why can shared randomness not push a classical team above 75% in the CHSH game?

  1. Because random bits cannot be shared in advance
  2. It can, but only by a few percent
  3. A randomized strategy is a mixture of deterministic ones, and its winning probability is the average of theirs
  4. Because the referee's questions are correlated with the shared randomness
Show the answer

C. A randomized strategy is a mixture of deterministic ones, and its winning probability is the average of theirs

Conditioned on the shared random value λ\lambda, the strategy is deterministic and wins at most 34\tfrac34. Averaging over λ\lambda cannot exceed the best term.

Question 3

Alice and Bob share ∣Φ+⟩\ket{\Phi^+}. Alice measures at Bloch angle 00 (that is, ZZ) and Bob at Bloch angle 60°60°. What is the probability that their ±1\pm1 outcomes agree?

  1. 12\tfrac12
  2. ≈0.93\approx0.93
  3. 14\tfrac14
  4. 34\tfrac34
Show the answer

D. 34\tfrac34

E=cos⁡60°=12E=\cos60°=\tfrac12 and P(agree)=1+E2=34P(\text{agree})=\tfrac{1+E}{2}=\tfrac34, which equals cos⁡230°\cos^2 30°: the half-angle appears because Bloch angles are twice the Hilbert-space angles.

Question 4

Alice uses Bloch angles 0°0° (for x=0x=0) and 90°90° (for x=1x=1). Which choice for Bob (y=0y=0, y=1y=1) reaches S=22S=2\sqrt2 with ∣Φ+⟩\ket{\Phi^+}?

  1. 45°45° and −45°-45°
  2. 0°0° and 90°90°
  3. 22.5°22.5° and −22.5°-22.5°
  4. −45°-45° and 45°45°
Show the answer

A. 45°45° and −45°-45°

With E=cos⁡(α−β)E=\cos(\alpha-\beta): E00=E01=E10=cos⁡45°E_{00}=E_{01}=E_{10}=\cos45° and E11=cos⁡135°=−cos⁡45°E_{11}=\cos135°=-\cos45°, so S=4cos⁡45°=22S=4\cos45°=2\sqrt2.

Question 5

Alice and Bob share ∣Φ+⟩\ket{\Phi^+}. Bob switches his measurement from ZZ to XX. How does the distribution of Alice's outcomes, looked at on its own, change?

  1. It becomes biased toward Bob's outcome
  2. It now depends on the angle between their settings
  3. It stays exactly 50/50
  4. It collapses to a definite value
Show the answer

C. It stays exactly 50/50

Alice's statistics are determined by her reduced state ρA=I/2\rho_A=\id/2, which no operation on Bob's side can change. Only the joint statistics depend on both settings.

Go deeper

Further reading

  • J. S. Bell, "On the Einstein Podolsky Rosen paradox", Physics 1, 195 (1964).
  • J. F. Clauser, M. A. Horne, A. Shimony & R. A. Holt, "Proposed experiment to test local hidden-variable theories", Phys. Rev. Lett. 23, 880 (1969).
  • M. A. Nielsen & I. L. Chuang, Quantum Computation and Quantum Information, §2.6 (Cambridge, 10th anniv. ed., 2010).
  • N. Brunner, D. Cavalcanti, S. Pironio, V. Scarani & S. Wehner, "Bell nonlocality", Rev. Mod. Phys. 86, 419 (2014).