A real EPR-Bohm scenario

Foundations of physics and/or philosophy of physics, and in particular, posts on unresolved or controversial issues

Re: A real EPR-Bohm scenario

Postby Joy Christian » Fri Dec 30, 2016 10:22 am

FrediFizzx wrote:
minkwe wrote:Yes, There are M entries in X and 51 entries in Y, so it loops around Y. Try returning cos (random angle) instead of cos (Angles) and see if that still works.Because the corresponding angle whose cosine is being returned has nothing to do with Alpha, or Beta, that is why cos(alpha) did not work.

Well, I have to figure out how to setup random angles in R but I don't expect it to work. But Mathematica does work with random angles with a slightly different process. Somehow the iteration loops in R are lining up properly using cos(Angles) in the q-function. And it still works if I set the fixed angles to 5 degree resolution instead of 7.2.

It might be more worthwhile to try to get alpha and beta working because it seems to me that they should work also now that I see the proper way to do them in the q-function. Thanks for that.

I just tried g-old and g-new = p x q in the same simulation (alternatively) in R, and both g-functions are producing exactly the same plots, as well as exactly the same numbers for various quantities like A, B, p, q, etc. I find that very curious.

***
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: A real EPR-Bohm scenario

Postby minkwe » Fri Dec 30, 2016 10:24 am

I mean random angles for just the q function, see my previous post again
minkwe
 
Posts: 1441
Joined: Sat Feb 08, 2014 10:22 am

Re: A real EPR-Bohm scenario

Postby FrediFizzx » Fri Dec 30, 2016 10:41 am

Joy Christian wrote:
FrediFizzx wrote:
minkwe wrote:Yes, There are M entries in X and 51 entries in Y, so it loops around Y. Try returning cos (random angle) instead of cos (Angles) and see if that still works.Because the corresponding angle whose cosine is being returned has nothing to do with Alpha, or Beta, that is why cos(alpha) did not work.

Well, I have to figure out how to setup random angles in R but I don't expect it to work. But Mathematica does work with random angles with a slightly different process. Somehow the iteration loops in R are lining up properly using cos(Angles) in the q-function. And it still works if I set the fixed angles to 5 degree resolution instead of 7.2.

It might be more worthwhile to try to get alpha and beta working because it seems to me that they should work also now that I see the proper way to do them in the q-function. Thanks for that.

I just tried g-old and g-new = p x q in the same simulation (alternatively) in R, and both g-functions are producing exactly the same plots, as well as exactly the same numbers for various quantities like A, B, p, q, etc. I find that very curious.

***

Joy, try this to see if you get any clues as to why alpha and beta are not working correctly from the resulting plot.
Code: Select all
   
A = +sign(h(a,e)*g(a,e,alpha))  # Alice's results A(a, e, s) = +/-1
   
B = -sign(h(b,e)*g(b,e,beta))   #  Bob's results B(b, e, s) = -/+1



with the h and g-functions being,

h = function(p,q){colSums(p*q)} # polarizer function

g = function(u,v,w){ifelse(abs(h(u,v)) > f, cos(w), 0)}

I believe that is the correct way of doing alpha and beta. Michel?
.
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: A real EPR-Bohm scenario

Postby Joy Christian » Fri Dec 30, 2016 10:49 am

Fred, your g-function is wrong. There has to be "s" in it.
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: A real EPR-Bohm scenario

Postby minkwe » Fri Dec 30, 2016 10:54 am

FrediFizzx wrote:
Joy Christian wrote:
FrediFizzx wrote:
minkwe wrote:Yes, There are M entries in X and 51 entries in Y, so it loops around Y. Try returning cos (random angle) instead of cos (Angles) and see if that still works.Because the corresponding angle whose cosine is being returned has nothing to do with Alpha, or Beta, that is why cos(alpha) did not work.

Well, I have to figure out how to setup random angles in R but I don't expect it to work. But Mathematica does work with random angles with a slightly different process. Somehow the iteration loops in R are lining up properly using cos(Angles) in the q-function. And it still works if I set the fixed angles to 5 degree resolution instead of 7.2.

It might be more worthwhile to try to get alpha and beta working because it seems to me that they should work also now that I see the proper way to do them in the q-function. Thanks for that.

I just tried g-old and g-new = p x q in the same simulation (alternatively) in R, and both g-functions are producing exactly the same plots, as well as exactly the same numbers for various quantities like A, B, p, q, etc. I find that very curious.

***

Joy, try this to see if you get any clues as to why alpha and beta are not working correctly from the resulting plot.
Code: Select all
   
A = +sign(h(a,e)*g(a,e,alpha))  # Alice's results A(a, e, s) = +/-1
   
B = -sign(h(b,e)*g(b,e,beta))   #  Bob's results B(b, e, s) = -/+1



with the h and g-functions being,

h = function(p,q){colSums(p*q)} # polarizer function

g = function(u,v,w){ifelse(abs(h(u,v)) > f, cos(w), 0)}

I believe that is the correct way of doing alpha and beta. Michel?
.

Yes, based on what both of you have told me, about the model, you should be doing

Code: Select all
h = function(p,q){colSums(p*q)}   # polarizer function
g = function(u,v,w){ifelse(abs(h(u,v)) > f, cos(w), 0)}
A = +sign(h(a,e)*g(a,e,alpha))  # Alice's results A(a, e, s) = +/-1
B = -sign(h(b,e)*g(b,e,beta))   #  Bob's results B(b, e, s) = -/+1


not what is currently being done in the R-code.

replace cos(Angles) with cos(runif(M, 0, 2*pi)) in the R-code and see what it does. Like so:
Code: Select all
ANG = runif(M, 0, 2*pi) # random angles
g = function(u,v,w){ifelse(abs(h(u,v)) > f, cos(ANG), 0)}


You'll see that it produces exactly the same results as cos(Angles). Then replace the g function with

Code: Select all
g = function(u,v,w){ifelse(abs(h(u,v)) > f, f, 0)}

You'll see that it makes no difference! Same results. In fact, the following also produces the exact same results:
Code: Select all
g = function(u,v,w){ifelse(abs(h(u,v)) > f, 1, 0)}

Code: Select all
g = function(u,v,w){max(sign(abs(h(u,v)) - f), 0)}

Do you recognize the last function?
minkwe
 
Posts: 1441
Joined: Sat Feb 08, 2014 10:22 am

Re: A real EPR-Bohm scenario

Postby FrediFizzx » Fri Dec 30, 2016 11:02 am

Joy Christian wrote:Fred, your g-function is wrong. There has to be "s" in it.

I don't think your "s" is doing anything in the g-function. If I take it out in the old R code, nothing changes. Michel?
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: A real EPR-Bohm scenario

Postby FrediFizzx » Fri Dec 30, 2016 11:07 am

minkwe wrote:replace cos(Angles) with cos(runif(M, 0, 2*pi)) in the R-code and see what it does. Like so:
Code: Select all
ANG = runif(M, 0, 2*pi) # random angles
g = function(u,v,w){ifelse(abs(h(u,v)) > f, cos(ANG), 0)}


You'll see that it produces exactly the same results as cos(Angles). Then replace the g function with

Code: Select all
g = function(u,v,w){ifelse(abs(h(u,v)) > f, f, 0)}

You'll see that it makes no difference! Same results

You're right; it works. Now what is up with that?
.
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: A real EPR-Bohm scenario

Postby Joy Christian » Fri Dec 30, 2016 11:07 am

***
Michel, It works!

Code: Select all
ANG = runif(M, 0, 2*pi) # random angles

p = function(u,v){colSums(u*v)} # polarizer function of Bell

q = function(u,v,s){ifelse(abs(p(u,v)) > f, cos(ANG), 0)}

g = function(u,v,s){p(u,v)*q(u,v,s)}   # cf. http://rpubs.com/jjc/84238


So what does this mean now?

***
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: A real EPR-Bohm scenario

Postby Joy Christian » Fri Dec 30, 2016 11:18 am

***
The following code also works:

Code: Select all
z = runif(M, -1, +1)  # M uniformly distributed numbers between -1 and +1

p = function(u,v){colSums(u*v)} # polarizer function of Bell

q = function(u,v,s){ifelse(abs(p(u,v)) > f, z, 0)}

g = function(u,v,s){p(u,v)*q(u,v,s)}   # cf. http://rpubs.com/jjc/84238

***
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: A real EPR-Bohm scenario

Postby minkwe » Fri Dec 30, 2016 11:22 am

And

Code: Select all
q = function(u,v,w){max(sign(abs(h(u,v)) - f), 0)}


I've mixed up g and h in a few posts just to clarify in case someone is confused but we are talking about the q function in the R simulation. Nothing changes though.
minkwe
 
Posts: 1441
Joined: Sat Feb 08, 2014 10:22 am

Re: A real EPR-Bohm scenario

Postby Joy Christian » Fri Dec 30, 2016 11:26 am

minkwe wrote:And

Code: Select all
q = function(u,v,w){max(sign(abs(h(u,v)) - f), 0)}

If I set z = 0.00000000000000000000000000000000000000000000000000001

in the above code, then it still works. So what q is doing is simply selecting the state. As long as z is non-zero, the q-function works.

***
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: A real EPR-Bohm scenario

Postby minkwe » Fri Dec 30, 2016 11:46 am

That is what this code is doing in my python version:

Code: Select all
def particle_detector(info):
    particle, setting = info
   
    z = particle[-1]    # represents which arm we are on, left or right
    f = particle[0]     
    particle[0] = 0; particle[-1] = 0 # zero out scalar and tri-vector parts leaving just vector
    a = ga.ang2Vec3d(theta=setting, phi=numpy.pi/2) # generate setting vector on a plane
    e = ga.MultiVector(ga.layout, value=particle) # e is a vector
    pol = (a*e).value[0] # dot product between setting vector
    q = z*max(abs(pol) - f, 0) 
    out = numpy.sign(pol)*numpy.sign(q)
    return [0, setting,out]


This is exactly equivalent to the original simulation
minkwe
 
Posts: 1441
Joined: Sat Feb 08, 2014 10:22 am

Re: A real EPR-Bohm scenario

Postby Joy Christian » Fri Dec 30, 2016 12:00 pm

***
OK, I have updated the simulation with the following slight change in the code: http://rpubs.com/jjc/233477

Code: Select all
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

Since q is simply selecting the states, I have chosen 1 instead of cos(Angles). Any non-zero number would do the job.

This is just the original simulation, but I still like that p is factored out from g-old, and q is imply selecting the states. So g = p x q, and sign(g) = sign(p) x sign(q).

***
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: A real EPR-Bohm scenario

Postby FrediFizzx » Fri Dec 30, 2016 2:50 pm

Joy Christian wrote:***
OK, I have updated the simulation with the following slight change in the code: http://rpubs.com/jjc/233477

Code: Select all
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

Since q is simply selecting the states, I have chosen 1 instead of cos(Angles). Any non-zero number would do the job.

This is just the original simulation, but I still like that p is factored out from g-old, and q is imply selecting the states. So g = p x q, and sign(g) = sign(p) x sign(q).

***

Hmm... so this is not a valid polarizer separated model like the Mathematica version. But it is interesting just the same. ;)
.
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: A real EPR-Bohm scenario

Postby FrediFizzx » Fri Dec 30, 2016 3:44 pm

FrediFizzx wrote:Hmm... so this is not a valid polarizer separated model like the Mathematica version. But it is interesting just the same. ;)
.

I'm momentarily taking that back until further investigation of the Mathematica version because the polarizer function I am using in Mathematica works in this new R version with the q-function returning 1 or 0. Something strange is going on.
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: A real EPR-Bohm scenario

Postby minkwe » Fri Dec 30, 2016 6:06 pm

Joy Christian wrote:***
OK, I have updated the simulation with the following slight change in the code: http://rpubs.com/jjc/233477

Code: Select all
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

Since q is simply selecting the states, I have chosen 1 instead of cos(Angles). Any non-zero number would do the job.

This is just the original simulation, but I still like that p is factored out from g-old, and q is imply selecting the states. So g = p x q, and sign(g) = sign(p) x sign(q).

***

Joy,
The sign in sign(q) is superfluous. Just multiplying by q is sufficient since q is always either 1 or 0.

Happy New Year!
minkwe
 
Posts: 1441
Joined: Sat Feb 08, 2014 10:22 am

Re: A real EPR-Bohm scenario

Postby FrediFizzx » Fri Dec 30, 2016 7:03 pm

minkwe wrote:
Joy Christian wrote:***
OK, I have updated the simulation with the following slight change in the code: http://rpubs.com/jjc/233477

Code: Select all
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

Since q is simply selecting the states, I have chosen 1 instead of cos(Angles). Any non-zero number would do the job.

This is just the original simulation, but I still like that p is factored out from g-old, and q is imply selecting the states. So g = p x q, and sign(g) = sign(p) x sign(q).

***

Joy,
The sign in sign(q) is superfluous. Just multiplying by q is sufficient since q is always either 1 or 0.

Happy New Year!


Oh yeah, I was going to mention that but forgot. The "s" in the q-function is also superfluous. "f" is already generated without calling the "s" via the function.

And it is exactly equivalent to http://rpubs.com/jjc/84238. There is nothing new here. Just some terms moved around is all it is.

Happy New Year!
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: A real EPR-Bohm scenario

Postby FrediFizzx » Fri Dec 30, 2016 7:15 pm

What was new was using this polarizer function,

d = function(o,t){ifelse(2*acos(colSums(o*t)) < pi, 1, -1)}

in this code.

Code: Select all
Angles = seq(from = 0, to = 360, by = 5)*pi/180

K = length(Angles) # The total number of angles between 0 and 2pi

corrs = matrix(nrow = K, ncol = K, data = 0) # Container for correlations

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)

e1 = rbind(x, y, z)
e2 = -e1

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

g = function(u,v){ifelse(abs(colSums(u*v)) > f, 1, 0)}

d = function(o,t){ifelse(2*acos(colSums(o*t)) < pi, 1, -1)}

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,e1)*d(a,e1))  # Alice's measurement results A(a, e, s) = +/-1
    B = sign(g(b,e2)*d(b,e2))  # Bob's measurement 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)
   
  }
}

par(mar = c(0, 0, 2, 0))
persp(x = Angles, y = Angles, main = "The strong correlations predicted by the 3-sphere model", z = corrs, zlim = c(-1, 1), col = "pink", theta = 135, phi = 30, scale = FALSE, xlab = "alpha", ylab = "beta")

This also works with random angles in Mathematica with a slight difference in the process.
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: A real EPR-Bohm scenario

Postby FrediFizzx » Sat Dec 31, 2016 12:49 am

FrediFizzx wrote:What was new was using this polarizer function,

d = function(o,t) {ifelse(2*acos(colSums(o*t)) < pi, 1, -1)}

Which is similar to,

d = function(o,t) {ifelse(2*(angle - e)) < pi, 1, -1)}

where angle is a or b. So we have the polarizer function doing +1 or -1 and the complete state function doing 1 or 0. Both depending on (angle - e) so perhaps not so new for the R simulation. It does seem to be new for the Mathematica simulation with random angles. Still analyzing that. The Mathematica scheme should work in Michel's Python simulation with random angles (vectors).
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: A real EPR-Bohm scenario

Postby Joy Christian » Sat Dec 31, 2016 1:40 am

minkwe wrote:
Joy Christian wrote:***
OK, I have updated the simulation with the following slight change in the code: http://rpubs.com/jjc/233477

Code: Select all
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

Since q is simply selecting the states, I have chosen 1 instead of cos(Angles). Any non-zero number would do the job.

This is just the original simulation, but I still like that p is factored out from g-old, and q is imply selecting the states. So g = p x q, and sign(g) = sign(p) x sign(q).

***

Joy,
The sign in sign(q) is superfluous. Just multiplying by q is sufficient since q is always either 1 or 0.

Happy New Year!

Thanks. I have cleaned up that bit: http://rpubs.com/jjc/233477.

Happy New Year!

***
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

PreviousNext

Return to Sci.Physics.Foundations

Who is online

Users browsing this forum: No registered users and 115 guests

CodeCogs - An Open Source Scientific Library