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
| Bob 0 | Bob 1 | |
|---|---|---|
| Alice 0 | 1/2 | 0 |
| Alice 1 | 0 | 1/2 |
Correlation = 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
Angles in the X–Z plane, in degrees from +Z toward +X. Defaults are optimal for |Φ+⟩.
| Term | Sign | Exact | Sampled |
|---|---|---|---|
| E(a,b) | + | 0.7071 | 0.688 |
| E(a,b′) | − | -0.7071 | -0.705 |
| E(a′,b) | + | 0.7071 | 0.710 |
| E(a′,b′) | + | 0.7071 | 0.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).