by Joy Christian
Einstein Centre for Local-Realistic Physics, 15 Thackley End, Oxford OX2 6LB, United Kingdom
Publication date: 5 December 2016
Angles = seq(from = 0, to = 360, by = 7.2) * 2 * pi/360 # (cf. the full version: http://rpubs.com/jjc/84238)
K = length(Angles) # The total number of angles between 0 and 2pi
corrs = matrix(nrow = K, ncol = K, data = 0) # Container for correlations
Ns = matrix(nrow = K, ncol = K, data = 0) # Container for events A and B
Ls = matrix(nrow = K, ncol = K, data = 0) # Container for initial states
M = 10^4 # Size of the pre-ensemble. Next one can try 10^5, or even 10^6
r = runif(M, 0, 2*pi) # M uniformly distributed numbers between 0 and 2pi
z = runif(M, -1, +1) # M uniformly distributed numbers between -1 and +1
h = sqrt(1 - z^2)
x = h * cos(r)
y = h * sin(r)
e = rbind(x, y, z)
s = runif(M, 0, pi) # Initial states of the spins are the pairs (e, s) within S^3
f = -1 + (2/sqrt(1 + ((3 * s)/pi))) # For details see the paper arXiv:1405.2355
p = function(u,v){colSums(u*v)} # original polarizer function of Bell
q = function(u,v,s){ifelse(abs(p(u,v)) > f, 1, 0)} # selects the states
g = function(u,v,s){p(u,v)*q(u,v,s)} # cf. http://rpubs.com/jjc/84238
for (i in 1:K) {
alpha = Angles[i]
a = c(cos(alpha), sin(alpha), 0) # Alice's measurement direction 'a'
for (j in 1:K) {
beta = Angles[j]
b = c(cos(beta), sin(beta), 0) # Bob's measurement direction 'b'
A = +sign(p(a,e))*q(a,e,s) # Alice's results A(a, e, s) = +/-1
B = -sign(p(b,e))*q(b,e,s) # Bob's results B(b, e, s) = -/+1
N = length((A*B)[A & B]) # Number of all possible events observed in S^3
corrs[i,j] = sum(A*B)/N # Product moment correlation coefficient E(a,b)
# corrs[i] = sum(A)/length(A) # Verifies < A > = 0 for all vectors a
# corrs[j] = sum(B)/length(B) # Verifies < B > = 0 for all vectors b
L = length(s[q(a,e,s) & q(b,e,s)]) # Number of initial states (e,s) in S^3
Ns[i,j] = N # Number of events simultaneously observed by Alice and Bob
Ls[i,j] = L # Number of initial particles (e,s) emitted from the source
}
}
# The measurement functions of Alice and Bob are very easy to understand:
# A(a; e, s) = +sign(a.e) x { 1 if |a.e| > f(s), 0 otherwise} and
# B(b; e, s) = -sign(b.e) x { 1 if |b.e| > f(s), 0 otherwise},
# where X is the x-axis vector and the pair (e, s) is the "initial state" of the spin system. It is important to
# recognize that the "initial state" or the "particle" in the simulation is represented by the pair (e, s), not
# just by the vector e; and there is one-to-one correspondence in the model between the initial states (e, s) and
# the measurement results (A, B). In other words, not a single "particle" (e, s) goes undetected by Alice and Bob.
# The above feature is explicitly demonstrated in the full version of the simulation: http://rpubs.com/jjc/84238.
# The following first plot exhibits the one-to-one correspondence (e, s) <--> (A, B) between (e, s) and (A, B).
par(mar = c(0, 0, 2, 0))
persp(x = Angles, y = Angles, main = "Ratio N / L in S^3 = Number N of simultaneous events / Number L of initial states (e, s); from 0 to 1", z = Ns/Ls, zlim = c(0, 1), col = "bisque", theta = 135, phi = 30, scale = FALSE, xlab = "alpha", ylab = "beta", zlab = "N / L")
par(mar = c(0, 0, 2, 0))
persp(x = Angles, y = Angles, main = "The correlations predicted by the 3-sphere model match exactly with those predicted by quantum mechanics", z = corrs, zlim = c(-1, 1), col = "darkseagreen1", theta = 135, phi = 30, scale = FALSE, xlab = "alpha", ylab = "beta")
# For completeness we can calculate the correlations for the special case
f = 0 # i.e., by switching back the geometry and topology from S^3 to R^3.
for (i in 1:K) {
alpha = Angles[i]
a = c(cos(alpha), sin(alpha), 0) # Measurement direction 'a'
for (j in 1:K) {
beta = Angles[j]
b = c(cos(beta), sin(beta), 0) # Measurement direction 'b'
A = +sign(g(a,e,s)) # Alice's measurement results A(a, e, s) = +/-1
B = -sign(g(b,e,s)) # Bob's measurement results B(b, e, s) = -/+1
N = length((A*B)[A & B]) # Number of simultaneous events observed
corrs[i,j] = sum(A*B)/N
}
}
par(mar = c(0, 0, 2, 0))
persp(x = Angles, y = Angles, main = "The linear correlations of Bell's local model are recovered by setting f = 0", z = corrs, zlim = c(-1, 1), col = "lightblue1", theta = 135, phi = 30, scale = FALSE, xlab = "alpha", ylab = "beta")
# I am grateful to Fred Diether for separating the polarizer h(p,q) from g(u,v,s) in http://rpubs.com/jjc/84238