Bell Test & CHSH Inequality
Entanglement correlations and nonlocality
Prepare a Bell state and choose measurement angles for Alice and Bob. Run trials to compute correlation functions E(a,b) and the CHSH value S. At the optimal angles, the quantum prediction S = 2√2 violates the classical bound |S| ≤ 2, demonstrating that no local hidden-variable theory can reproduce quantum correlations.
Entangled State
Alice's Settings
Bob's Settings
CHSH Value: S = E(a₀,b₀) + E(a₀,b₁) + E(a₁,b₀) - E(a₁,b₁)
theoretical S = -2.828
Theoretical Correlations
E(a₀,b₀) = -0.7071
E(a₀,b₁) = -0.7071
E(a₁,b₀) = -0.7071
E(a₁,b₁) = 0.7071
Correlation Function E(0°, b) vs Bob's Angle b