Skip to content
Communication Labs · Bell State LaboratoryAvailable

Entanglement, measured from any direction.

Share a Bell pair between Alice and Bob, choose where each of them measures, and compare exact joint probabilities with finite-shot samples. Then push the CHSH combination past the classical limit of 2.

1 · Correlations for one pair of settings

Alice (q0): measurement direction

n = (0.000, 0.000, 1.000)

Bob (q1): measurement direction

n = (0.000, 0.000, 1.000)

∣Φ+⟩=12(∣00⟩+∣11⟩)|\Phi^+\rangle = \tfrac{1}{\sqrt2}(|00\rangle + |11\rangle)
Exact joint probabilities P(Alice, Bob) from simulation (0 ↔ +1, 1 ↔ −1)
Bob 0Bob 1
Alice 01/20
Alice 101/2

Correlation E=P=−P≠E = P_{=} - P_{\neq} = 1.0000

Draw finite-shot samples from the exact distribution (seeded, reproducible).

Circuit (generated Qiskit code)
from qiskit import QuantumCircuit

qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.barrier()
qc.measure(0, 0)
qc.measure(1, 1)
Open in Studio →

2 · CHSH inequality

S=E(a,b)−E(a,b′)+E(a′,b)+E(a′,b′),∣S∣local≤2,∣S∣quantum≤22S = E(a,b) - E(a,b') + E(a',b) + E(a',b'),\qquad |S|_{\text{local}} \le 2,\qquad |S|_{\text{quantum}} \le 2\sqrt{2}

Angles in the X–Z plane, in degrees from +Z toward +X. Defaults are optimal for |Φ+⟩.

TermSignExactSampled
E(a,b)+0.70710.688
E(a,b′)−-0.7071-0.705
E(a′,b)+0.70710.710
E(a′,b′)+0.70710.710

Exact S = 2.8284 (= 2√2, Tsirelson's bound) · Sampled S = 2.813 ± 0.032 (2,000 shots × 4 settings, seed 7)

Quantum mechanics predicts |S| > 2 for these settings: no local hidden-variable model can reproduce these correlations.

Model and assumptions

  • • Ideal gates and perfect preparation and detection; no noise, loss or timing.
  • • Measurement along n is implemented as R_Y(−θ)·R_Z(−φ) followed by a Z-basis measurement; outcome 0 ↔ eigenvalue +1.
  • • Every probability is computed by simulating the circuit shown above; samples are drawn with a seeded PRNG.
  • • This is a simulation of quantum-mechanical predictions, not a Bell experiment. It cannot test locality, and it does not model detection or freedom-of-choice loopholes.

References: J. S. Bell, Physics 1, 195 (1964); J. F. Clauser, M. A. Horne, A. Shimony, R. A. Holt, Phys. Rev. Lett. 23, 880 (1969); B. S. Cirel'son, Lett. Math. Phys. 4, 93 (1980).