Simulates measurement outcomes of a pair of spin-½ particles in a singlet state. You choose measurement angles
for Alice and Bob. The simulator generates outcomes (+1 or −1) with quantum correlations
E = -cos(θ_A - θ_B). In CHSH mode, it estimates the Bell S value and shows violation of the local bound.
Angles are in degrees. For the singlet state, quantum mechanics predicts
E(θ_A, θ_B) = -cos(θ_A - θ_B). The plot below shows the simulated correlation vs the ideal curve.
Choose two settings for Alice (A, A′) and two for Bob (B, B′). The simulator estimates
S = E(A,B) - E(A,B′) + E(A′,B) + E(A′,B′). Local hidden-variable theories obey |S| ≤ 2.
Quantum mechanics reaches |S| up to 2√2 ≈ 2.828. The plot shows the four correlations used in S.