Computing Library › Quantum Foundations
Quantum Foundations

The CHSH Inequality

CHSH is the workhorse Bell inequality: a correlation bound obeyed by local hidden variables but violated by entangled quantum states.

A testable bound on local realism

Two parties each choose one of two measurement settings and record a plus or minus one outcome. Form the combination S = E(a,b) + E(a,b') + E(a',b) - E(a',b'), where each E is a correlation of outcomes. Any theory in which outcomes are predetermined and choices on one side do not affect results on the other, a local hidden-variable theory, must satisfy |S| <= 2. This is the CHSH inequality.

Quantum violation

Kronos motion — quantum verdict

Entangled states break the bound. Measuring a singlet with suitably chosen angles gives correlations E(a,b) = -cos(theta_ab), and the optimal settings yield |S| = 2 sqrt(2) approximately 2.828. This is the Tsirelson bound, the maximum any quantum state can reach. The gap between 2 and 2 sqrt(2) is the experimentally observed signature that nature is not locally realistic.

python
import numpy as np
def E(theta): return -np.cos(theta)
a,ap,b,bp = 0, np.pi/2, np.pi/4, 3*np.pi/4
S = E(a-b)+E(a-bp)+E(ap-b)-E(ap-bp)
print(round(abs(S),3))   # 2.828 -> violates 2

Loopholes and their closure

Early experiments left loopholes: detectors might miss events (detection loophole) or settings might be chosen too slowly to exclude subluminal influence (locality loophole). Loophole-free experiments in 2015 and after closed both simultaneously using fast random setting choices, high-efficiency detectors, and space-like separation, decisively confirming violation of local realism.

Uses in quantum technology

CHSH is not only foundational; it is operational. A large violation certifies genuine entanglement without trusting the devices, the basis of device-independent protocols. It underlies device-independent randomness generation and key distribution, where security follows from the observed value of S alone. In hardware characterization, CHSH violation is a stringent joint test of state quality and measurement calibration.