New EPRB simulation using GAViewer

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

New EPRB simulation using GAViewer

Postby FrediFizzx » Mon Sep 07, 2015 12:08 pm

I think Albert Jan Wonnink's new simulation using GAViewer deserves a topic of its own. I have expanded it to the full 360 degrees plus increased the resolution of the output. Here is the code for that.
Code: Select all
function getRandomLambda()
{
     if( rand()>0.5)
{
     return 1;
}
     else
{
     return -1;
}
}

function getVector(idx)
{
     step=0.05*2*pi; //step size is taken 1/10 of pi
     angle=idx*step;
     v=sin(angle)*e1+cos(angle)*e2+0.01*e3;
     return v;
}
     batch test()
{
     set_window_title("Test Joy Christian");
     N=100;
     I=e1^e2^e3;
     s[0]=0;
     s[1]=0;
     s[2]=0;
     s[3]=0;
     s[4]=0;
     s[5]=0;
     s[6]=0;
     s[7]=0;
     s[8]=0;
     s[9]=0;
     s[10]=0;
     s[11]=0;
     s[12]=0;
     s[13]=0;
     s[14]=0;
     s[15]=0;
     s[16]=0;
     s[17]=0;
     s[18]=0;
     s[19]=0;
     s[20]=0;
     a[0]=0;
     a[1]=0;
     a[2]=0;
     a[3]=0;
     a[4]=0;
     a[5]=0;
     a[6]=0;
     a[7]=0;
     a[8]=0;
     a[9]=0;
     a[10]=0;
     a[11]=0;
     a[12]=0;
     a[13]=0;
     a[14]=0;
     a[15]=0;
     a[16]=0;
     a[17]=0;
     a[18]=0;
     a[19]=0;
     a[20]=0;

     //Ax[0]=
     angleIx=0;
     for(oo=0;oo<21;oo=oo+1) //iteration over aa
     {
         aa=getVector(oo);
         for(pp=0;pp<21;pp=pp+1) //iteration over bb
         {
             bb=getVector(pp);
             angleIx=oo-pp;
             if(oo<pp)
         {
         angleIx=pp-oo;
}
     minus_cos_a_b=-1*(aa.bb);

     for(nn=0;nn<N;nn=nn+1) //perform the experiment N times
     {
         lambda=getRandomLambda(); //lambda is a fair coin, resulting in +1 or -1

         v=I.aa ;
         w=I.bb;
         q=0;
         if(lambda==1)
     {
         q=v w;
     }
         else
     {
         q=w v;
     }

     s[angleIx]=s[angleIx]+q; //

     a[angleIx]=a[angleIx]+1;

}
}
}
     for(oo=0;oo<21;oo=oo+1) //iteration over angle differences
     {
         st=s[oo];
         at=a[oo];
         an=oo*10;
         mean_mu_a_mu_b=st/at;
         print(mean_mu_a_mu_b, "f"); //print the result
}

     prompt();

}

And the typical results are,

Code: Select all
mean_mu_a_mu_b = -1.000100
mean_mu_a_mu_b = -0.951156 + -0.000000*e2^e3 + 0.000033*e3^e1 + -0.001545*e1^e2
mean_mu_a_mu_b = -0.809117 + 0.000122*e2^e3 + -0.000017*e3^e1 + -0.006497*e1^e2
mean_mu_a_mu_b = -0.587885 + -0.000117*e2^e3 + -0.000030*e3^e1 + -0.000899*e1^e2
mean_mu_a_mu_b = -0.309117 + -0.000069*e2^e3 + -0.000061*e3^e1 + -0.010629*e1^e2
mean_mu_a_mu_b = -0.000100 + -0.000142*e2^e3 + -0.000047*e3^e1 + 0.004375*e1^e2
mean_mu_a_mu_b = 0.308917 + -0.000001*e2^e3 + -0.000022*e3^e1 + -0.024093*e1^e2
mean_mu_a_mu_b = 0.587685 + 0.000120*e2^e3 + 0.000035*e3^e1 + 0.023693*e1^e2
mean_mu_a_mu_b = 0.808917 + 0.000229*e2^e3 + -0.000086*e3^e1 + -0.004521*e1^e2
mean_mu_a_mu_b = 0.950957 + 0.000336*e2^e3 + 0.000095*e3^e1 + 0.002833*e1^e2
mean_mu_a_mu_b = 0.999900 + -0.000208*e2^e3 + 0.000145*e3^e1
mean_mu_a_mu_b = 0.950957 + 0.000022*e2^e3 + 0.000119*e3^e1 + -0.001236*e1^e2
mean_mu_a_mu_b = 0.808917 + 0.000221*e2^e3 + 0.000159*e3^e1 + -0.009796*e1^e2
mean_mu_a_mu_b = 0.587685 + 0.000267*e2^e3 + -0.000048*e3^e1 + -0.002023*e1^e2
mean_mu_a_mu_b = 0.308917 + 0.000447*e2^e3 + 0.000445*e3^e1 + -0.032608*e1^e2
mean_mu_a_mu_b = -0.000100 + -0.000034*e2^e3 + 0.000183*e3^e1 + -0.025000*e1^e2
mean_mu_a_mu_b = -0.309117 + 0.000211*e2^e3 + 0.000046*e3^e1 + -0.005706*e1^e2
mean_mu_a_mu_b = -0.587885 + 0.000083*e2^e3 + 0.000857*e3^e1 + -0.080902*e1^e2
mean_mu_a_mu_b = -0.809117 + 0.000045*e2^e3 + -0.000061*e3^e1 + 0.005878*e1^e2
mean_mu_a_mu_b = -0.951156 + -0.000034*e2^e3 + -0.000155*e3^e1 + 0.015451*e1^e2
mean_mu_a_mu_b = -1.000100

And here is a Excel chart with the data and I added a column for the negative cosine values.

Image
Negative cosine curve is in red and the simulation data points blue. This simulation can be easily expanded to greater resolution.

This definitively proves that Joy's local realistic model is a counter example to Bell's theory.

Is everyone ready for a revolution in physics? !!! :D
FrediFizzx
Independent Physics Researcher
 
Posts: 1119
Joined: Tue Mar 19, 2013 6:12 pm
Location: California, USA

Re: New EPRB simulation using GAViewer

Postby Joy Christian » Mon Sep 07, 2015 12:52 pm

Here is a link to the original simulations by Albert Jan and Fred, for those who are unaware of the history: http://challengingbell.blogspot.co.uk/2 ... f-joy.html.

Sadly, the revolution actually happened way back in 2007, but the physics community has yet to catch up: http://arxiv.org/find/all/1/au:+Christi ... /0/all/0/1.
Joy Christian
Research Physicist
 
Posts: 1561
Joined: Wed Feb 05, 2014 3:49 am
Location: Oxford, United Kingdom

Re: New EPRB simulation using GAViewer

Postby FrediFizzx » Mon Sep 07, 2015 1:11 pm

Joy Christian wrote:Here is a link to the original simulations by Albert Jan and Fred, for those who are unaware of the history: http://challengingbell.blogspot.co.uk/2 ... f-joy.html.

Sadly, the revolution actually happened way back in 2007, but the physics community has yet to catch up: http://arxiv.org/find/all/1/au:+Christi ... /0/all/0/1.

Well... better late than never. For those that might be wondering why the data doesn't match the negative cosine values exactly, it is because the vectors a and b are only nearly 2D because of the code line v=sin(angle)*e1+cos(angle)*e2+0.01*e3. And this is like it would be in a typical experiment; they can never get those vectors to be perfectly in the same 2D plane. If we make the last term 0.0001*e3, then we get the following results;
Code: Select all
mean_mu_a_mu_b = -1.000000
mean_mu_a_mu_b = -0.951057 + 0.000000*e2^e3 + 0.000000*e3^e1 + -0.012361*e1^e2
mean_mu_a_mu_b = -0.809017 + 0.000000*e2^e3 + 0.000001*e3^e1 + -0.021037*e1^e2
mean_mu_a_mu_b = -0.587785 + 0.000002*e2^e3 + 0.000001*e3^e1 + 0.005393*e1^e2
mean_mu_a_mu_b = -0.309017 + 0.000001*e2^e3 + -0.000001*e3^e1 + 0.008392*e1^e2
mean_mu_a_mu_b = -0.000000 + 0.000002*e2^e3 + 0.000004*e3^e1 + 0.023125*e1^e2
mean_mu_a_mu_b = 0.309017 + -0.000001*e2^e3 + 0.000002*e3^e1 + 0.003804*e1^e2
mean_mu_a_mu_b = 0.587785 + 0.000002*e2^e3 + -0.000003*e3^e1 + -0.013291*e1^e2
mean_mu_a_mu_b = 0.809017 + -0.000006*e2^e3 + -0.000002*e3^e1 + -0.006782*e1^e2
mean_mu_a_mu_b = 0.951056 + -0.000004*e2^e3 + 0.000001*e3^e1 + -0.002060*e1^e2
mean_mu_a_mu_b = 1.000000 + 0.000001*e2^e3 + 0.000001*e3^e1
mean_mu_a_mu_b = 0.951056 + -0.000000*e2^e3 + 0.000002*e3^e1 + -0.003399*e1^e2
mean_mu_a_mu_b = 0.809017 + 0.000001*e2^e3 + 0.000002*e3^e1 + -0.012409*e1^e2
mean_mu_a_mu_b = 0.587785 + -0.000004*e2^e3 + -0.000000*e3^e1 + 0.003034*e1^e2
mean_mu_a_mu_b = 0.309017 + -0.000003*e2^e3 + 0.000002*e3^e1 + -0.012228*e1^e2
mean_mu_a_mu_b = -0.000000 + 0.000002*e2^e3 + -0.000003*e3^e1 + 0.018333*e1^e2
mean_mu_a_mu_b = -0.309017 + 0.000001*e2^e3 + -0.000003*e3^e1 + 0.024727*e1^e2
mean_mu_a_mu_b = -0.587785 + -0.000001*e2^e3 + -0.000004*e3^e1 + 0.034383*e1^e2
mean_mu_a_mu_b = -0.809017 + -0.000001*e2^e3 + -0.000000*e3^e1 + 0.003919*e1^e2
mean_mu_a_mu_b = -0.951057 + -0.000000*e2^e3 + -0.000002*e3^e1 + 0.023176*e1^e2
mean_mu_a_mu_b = -1.000000

And now you can see we get a more perfect match to the negative cosine values in the Excel chart above for the scalar values.
FrediFizzx
Independent Physics Researcher
 
Posts: 1119
Joined: Tue Mar 19, 2013 6:12 pm
Location: California, USA

Re: New EPRB simulation using GAViewer

Postby Gordon Watson » Mon Sep 07, 2015 2:42 pm

Fred, this sentence has me confused: "And this is like it would be in a typical experiment; they can never get those vectors to be perfectly in the same 2D plane."

Could you elaborate please: What is the niggle that arises, in the model and in practice, with respect to the two detector settings; a (set by Alice) and b (set by Bob)?

Thanks.
Gordon Watson
 
Posts: 152
Joined: Wed Apr 30, 2014 3:39 am

Re: New EPRB simulation using GAViewer

Postby FrediFizzx » Mon Sep 07, 2015 3:31 pm

Gordon Watson wrote:Fred, this sentence has me confused: "And this is like it would be in a typical experiment; they can never get those vectors to be perfectly in the same 2D plane."

Could you elaborate please: What is the niggle that arises, in the model and in practice, with respect to the two detector settings; a (set by Alice) and b (set by Bob)?

Hi Gordon,

In a typical EPRB experiment with photons, I doubt very much that they could get the polarizers for A and B detection aligned perfectly perpendicular to the axis of propagation. Sorry, they aren't actually in the same plane so my terminology there wasn't good but hopefully most people would understand what I mean.

We have found via doing these simulations with GAViewer that the perfect correlation happens if the a and b vectors are perfectly aligned perpendicular to the propagation axis. Which is a good thing because it is definitely easier to work with them being 2D instead of 3D.
FrediFizzx
Independent Physics Researcher
 
Posts: 1119
Joined: Tue Mar 19, 2013 6:12 pm
Location: California, USA

Re: New EPRB simulation using GAViewer

Postby Gordon Watson » Mon Sep 07, 2015 6:11 pm

FrediFizzx wrote:
Gordon Watson wrote:Fred, this sentence has me confused: "And this is like it would be in a typical experiment; they can never get those vectors to be perfectly in the same 2D plane."

Could you elaborate please: What is the niggle that arises, in the model and in practice, with respect to the two detector settings; a (set by Alice) and b (set by Bob)?

Hi Gordon,

In a typical EPRB experiment with photons, I doubt very much that they could get the polarizers for A and B detection aligned perfectly perpendicular to the axis of propagation. Sorry, they aren't actually in the same plane so my terminology there wasn't good but hopefully most people would understand what I mean.

We have found via doing these simulations with GAViewer that the perfect correlation happens if the a and b vectors are perfectly aligned perpendicular to the propagation axis. Which is a good thing because it is definitely easier to work with them being 2D instead of 3D.


Thanks Fred,

That was not what I expected, me certainly hoping that the model would be more robust: and me now wondering why it is (apparently) not. That is:

Given EPRB as per the topic heading (and with its spin-half particles or with the photonic variant), the state is spherically-symmetric.

So the detector settings a and b can be widely varied over 3-space and certainly neither need be anywhere near orthogonal to the line of flight: yet (under all variants) the Expectation remains as E(a, b) = cos 2s (π ± (a,b)) where s denotes the relevant intrinsic spin and (a,b) denotes the angle between the detector settings.

I'd welcome your comment; me now wondering about the strength of the model being used and/or the versatility of the GA Viewer?

Specifically, I'm presuming that Joy's model does not require that orthogonality?

With my thanks again; Gordon
...
Gordon Watson
 
Posts: 152
Joined: Wed Apr 30, 2014 3:39 am

Re: New EPRB simulation using GAViewer

Postby FrediFizzx » Mon Sep 07, 2015 7:21 pm

Gordon Watson wrote:
FrediFizzx wrote:Hi Gordon,

In a typical EPRB experiment with photons, I doubt very much that they could get the polarizers for A and B detection aligned perfectly perpendicular to the axis of propagation. Sorry, they aren't actually in the same plane so my terminology there wasn't good but hopefully most people would understand what I mean.

We have found via doing these simulations with GAViewer that the perfect correlation happens if the a and b vectors are perfectly aligned perpendicular to the propagation axis. Which is a good thing because it is definitely easier to work with them being 2D instead of 3D.


Given EPRB as per the topic heading (and with its spin-half particles or with the photonic variant), the state is spherically-symmetric.

So the detector settings a and b can be widely varied over 3-space and certainly neither need be anywhere near orthogonal to the line of flight: yet (under all variants) the Expectation remains as E(a, b) = cos 2s (π ± (a,b)) where s denotes the relevant intrinsic spin and (a,b) denotes the angle between the detector settings.

I'd welcome your comment; me now wondering about the strength of the model being used and/or the versatility of the GA Viewer?

Specifically, I'm presuming that Joy's model does not require that orthogonality?

With my thanks again; Gordon
...

Not really what I was saying. Joy's model is very robust and uses fully 3D a and b vectors to establish the main result of E(a, b) = -a.b. However you will find out with any model that you will get the best correlation for an experiment or simulation with those vectors 2D and othogonal to propagation. And... most experiments and the QM prediction use a and b that way. And for typical experiments, it is the polarizers not the detectors that are varied.

For any model that is using geometric algebra for its description, GAViewer so far is the best game in town. It works perfectly so far. Ya just have to know what you are doing. Especially taking into consideration that it operates in a fixed right handed basis only so any left handed system part has to be translated to the right handed basis before more operations are performed. Basically it is pretty simple; a x b in a left handed system becomes b x a when translated to the right hand perspective.
FrediFizzx
Independent Physics Researcher
 
Posts: 1119
Joined: Tue Mar 19, 2013 6:12 pm
Location: California, USA

Re: New EPRB simulation using GAViewer

Postby FrediFizzx » Tue Sep 08, 2015 10:54 am

I have extended Albert Jan's simulation to 9 degree increment resolution. Probably not much point in going further with it since we know the result of Joy's model is -a.b.
Image
FrediFizzx
Independent Physics Researcher
 
Posts: 1119
Joined: Tue Mar 19, 2013 6:12 pm
Location: California, USA

Re: New EPRB simulation using GAViewer

Postby Joy Christian » Tue Sep 08, 2015 11:19 pm

Hi Fred, Thanks for the new plot. It may be worthwhile to post the revised (or extended) code here (and also at Albert Jan's blog) ?
Joy Christian
Research Physicist
 
Posts: 1561
Joined: Wed Feb 05, 2014 3:49 am
Location: Oxford, United Kingdom

Re: New EPRB simulation using GAViewer

Postby FrediFizzx » Wed Sep 09, 2015 12:10 am

Joy Christian wrote:Hi Fred, Thanks for the new plot. It may be worthwhile to post the revised (or extended) code here (and also at Albert Jan's blog) ?

You're welcome. There is not much difference from the last code I posted but here it is.
Code: Select all
function getRandomLambda()
{
     if( rand()>0.5)
{
     return 1;
}
     else
{
     return -1;
}
}

function getVector(idx)
{
     step=0.025*2*pi; //step size is taken 1/20 of pi
     angle=idx*step;
     v=sin(angle)*e1+cos(angle)*e2+0.0001*e3;
     return v;
}
     batch test()
{
     set_window_title("Test Joy Christian");
     N=40;
     I=e1^e2^e3;
     s[0]=0;
     s[1]=0;
     s[2]=0;
     s[3]=0;
     s[4]=0;
     s[5]=0;
     s[6]=0;
     s[7]=0;
     s[8]=0;
     s[9]=0;
     s[10]=0;
     s[11]=0;
     s[12]=0;
     s[13]=0;
     s[14]=0;
     s[15]=0;
     s[16]=0;
     s[17]=0;
     s[18]=0;
     s[19]=0;
     s[20]=0;
     s[21]=0;
     s[22]=0;
     s[23]=0;
     s[24]=0;
     s[25]=0;
     s[26]=0;
     s[27]=0;
     s[28]=0;
     s[29]=0;
     s[30]=0;
     s[31]=0;
     s[32]=0;
     s[33]=0;
     s[34]=0;
     s[35]=0;
     s[36]=0;
     s[37]=0;
     s[38]=0;
     s[39]=0;
     s[40]=0;

     a[0]=0;
     a[1]=0;
     a[2]=0;
     a[3]=0;
     a[4]=0;
     a[5]=0;
     a[6]=0;
     a[7]=0;
     a[8]=0;
     a[9]=0;
     a[10]=0;
     a[11]=0;
     a[12]=0;
     a[13]=0;
     a[14]=0;
     a[15]=0;
     a[16]=0;
     a[17]=0;
     a[18]=0;
     a[19]=0;
     a[20]=0;
     a[21]=0;
     a[22]=0;
     a[23]=0;
     a[24]=0;
     a[25]=0;
     a[26]=0;
     a[27]=0;
     a[28]=0;
     a[29]=0;
     a[30]=0;
     a[31]=0;
     a[32]=0;
     a[33]=0;
     a[34]=0;
     a[35]=0;
     a[36]=0;
     a[37]=0;
     a[38]=0;
     a[39]=0;
     a[40]=0;

     //Ax[0]=
     angleIx=0;
     for(oo=0;oo<41;oo=oo+1) //iteration over aa
     {
         aa=getVector(oo);
         for(pp=0;pp<41;pp=pp+1) //iteration over bb
         {
             bb=getVector(pp);
             angleIx=oo-pp;
             if(oo<pp)
{
     angleIx=pp-oo;
}
     //minus_cos_a_b=-1*(aa.bb);

     for(nn=0;nn<N;nn=nn+1) //perform the experiment N times
     {
         lambda=getRandomLambda(); //lambda is a fair coin, resulting in +1 or -1

         v=I.aa ;
         w=I.bb;
         q=0;
         if(lambda==1)
     {
         q=v w;
     }
         else
     {
         q=w v;
     }

     s[angleIx]=s[angleIx]+q; //

     a[angleIx]=a[angleIx]+1;

}
}
}
     for(oo=0;oo<41;oo=oo+1) //iteration over angle differences
     {
         st=s[oo];
         at=a[oo];
         //an=oo*10;
         mean_mu_a_mu_b=st/at;
         print(mean_mu_a_mu_b, "f"); //print the result
}

     prompt();

}

And the typical results.

Code: Select all
mean_mu_a_mu_b = -1.000000
mean_mu_a_mu_b = -0.987688 + 0.000000*e2^e3 + -0.000001*e3^e1 + -0.001858*e1^e2
mean_mu_a_mu_b = -0.951057 + -0.000000*e2^e3 + -0.000000*e3^e1 + -0.001387*e1^e2
mean_mu_a_mu_b = -0.891007 + -0.000001*e2^e3 + 0.000000*e3^e1 + 0.000299*e1^e2
mean_mu_a_mu_b = -0.809017 + 0.000001*e2^e3 + 0.000000*e3^e1 + -0.016680*e1^e2
mean_mu_a_mu_b = -0.707107 + 0.000000*e2^e3 + -0.000001*e3^e1 + 0.011294*e1^e2
mean_mu_a_mu_b = -0.587785 + -0.000003*e2^e3 + -0.000000*e3^e1 + 0.016180*e1^e2
mean_mu_a_mu_b = -0.453991 + -0.000001*e2^e3 + -0.000000*e3^e1 + -0.021620*e1^e2
mean_mu_a_mu_b = -0.309017 + -0.000000*e2^e3 + -0.000000*e3^e1 + -0.011528*e1^e2
mean_mu_a_mu_b = -0.156434 + -0.000000*e2^e3 + -0.000003*e3^e1 + -0.000772*e1^e2
mean_mu_a_mu_b = -0.000000 + 0.000002*e2^e3 + -0.000001*e3^e1 + -0.019355*e1^e2
mean_mu_a_mu_b = 0.156434 + 0.000005*e2^e3 + -0.000002*e3^e1 + -0.005762*e1^e2
mean_mu_a_mu_b = 0.309017 + -0.000002*e2^e3 + -0.000000*e3^e1 + -0.003280*e1^e2
mean_mu_a_mu_b = 0.453990 + -0.000002*e2^e3 + 0.000003*e3^e1 + 0.027048*e1^e2
mean_mu_a_mu_b = 0.587785 + -0.000002*e2^e3 + 0.000002*e3^e1 + 0.001498*e1^e2
mean_mu_a_mu_b = 0.707107 + 0.000001*e2^e3 + 0.000006*e3^e1 + 0.023797*e1^e2
mean_mu_a_mu_b = 0.809017 + 0.000000*e2^e3 + 0.000001*e3^e1 + 0.015282*e1^e2
mean_mu_a_mu_b = 0.891007 + -0.000002*e2^e3 + -0.000003*e3^e1 + -0.009931*e1^e2
mean_mu_a_mu_b = 0.951056 + 0.000002*e2^e3 + 0.000006*e3^e1 + 0.014443*e1^e2
mean_mu_a_mu_b = 0.987688 + 0.000003*e2^e3 + 0.000002*e3^e1 + 0.003555*e1^e2
mean_mu_a_mu_b = 1.000000 + -0.000004*e2^e3 + -0.000002*e3^e1
mean_mu_a_mu_b = 0.987688 + 0.000002*e2^e3 + -0.000002*e3^e1 + 0.001760*e1^e2
mean_mu_a_mu_b = 0.951056 + -0.000004*e2^e3 + 0.000002*e3^e1 + -0.001220*e1^e2
mean_mu_a_mu_b = 0.891007 + -0.000005*e2^e3 + 0.000004*e3^e1 + -0.009458*e1^e2
mean_mu_a_mu_b = 0.809017 + -0.000005*e2^e3 + 0.000001*e3^e1 + -0.001729*e1^e2
mean_mu_a_mu_b = 0.707107 + 0.000000*e2^e3 + -0.000003*e3^e1 + 0.012153*e1^e2
mean_mu_a_mu_b = 0.587785 + 0.000003*e2^e3 + -0.000003*e3^e1 + 0.018877*e1^e2
mean_mu_a_mu_b = 0.453990 + 0.000003*e2^e3 + -0.000004*e3^e1 + 0.028639*e1^e2
mean_mu_a_mu_b = 0.309017 + -0.000006*e2^e3 + -0.000004*e3^e1 + 0.031092*e1^e2
mean_mu_a_mu_b = 0.156434 + -0.000000*e2^e3 + 0.000009*e3^e1 + -0.059673*e1^e2
mean_mu_a_mu_b = -0.000000 + 0.000003*e2^e3 + -0.000001*e3^e1 + 0.004545*e1^e2
mean_mu_a_mu_b = -0.156434 + 0.000001*e2^e3 + 0.000002*e3^e1 + -0.014815*e1^e2
mean_mu_a_mu_b = -0.309017 + 0.000001*e2^e3 + 0.000003*e3^e1 + -0.029060*e1^e2
mean_mu_a_mu_b = -0.453991 + 0.000001*e2^e3 + 0.000006*e3^e1 + -0.055688*e1^e2
mean_mu_a_mu_b = -0.587785 + -0.000000*e2^e3 + 0.000003*e3^e1 + -0.031783*e1^e2
mean_mu_a_mu_b = -0.707107 + -0.000002*e2^e3 + 0.000001*e3^e1 + -0.011785*e1^e2
mean_mu_a_mu_b = -0.809017 + -0.000000*e2^e3 + -0.000000*e3^e1
mean_mu_a_mu_b = -0.891007 + -0.000001*e2^e3 + 0.000002*e3^e1 + -0.017025*e1^e2
mean_mu_a_mu_b = -0.951057 + -0.000000*e2^e3 + 0.000000*e3^e1
mean_mu_a_mu_b = -0.987688 + 0.000000*e2^e3 + -0.000000*e3^e1 + 0.001955*e1^e2
mean_mu_a_mu_b = -1.000000
FrediFizzx
Independent Physics Researcher
 
Posts: 1119
Joined: Tue Mar 19, 2013 6:12 pm
Location: California, USA

Re: New EPRB simulation using GAViewer

Postby Mikko » Sat Sep 12, 2015 2:49 am

FrediFizzx wrote:
Code: Select all
...
     N=40;
...
     s[0]=0;
...
     s[40]=0;

     a[0]=0;
...
     a[40]=0;
...
     for(oo=0;oo<41;oo=oo+1) //iteration over aa
...


Why is N given the value 40 but s and a are given 41 values and the loop is repeated 41 times?
Mikko
 
Posts: 111
Joined: Mon Feb 17, 2014 1:53 am

Re: New EPRB simulation using GAViewer

Postby Joy Christian » Sat Sep 12, 2015 3:46 am

Mikko wrote:
FrediFizzx wrote:
Code: Select all
...
     N=40;
...
     s[0]=0;
...
     s[40]=0;

     a[0]=0;
...
     a[40]=0;
...
     for(oo=0;oo<41;oo=oo+1) //iteration over aa
...


Why is N given the value 40 but s and a are given 41 values and the loop is repeated 41 times?

You may find the explanation here: http://challengingbell.blogspot.co.uk/2 ... ng-of.html. See the formula for the "res." It sums from 0 to N-1. In probability theory one usually sums N+1 terms, from 0 to N, for a sample mean. But in simulations, according to Albert Jan, it is more convenient to sum over N terms, from 0 to N-1.
Last edited by Joy Christian on Sat Sep 12, 2015 5:18 am, edited 1 time in total.
Joy Christian
Research Physicist
 
Posts: 1561
Joined: Wed Feb 05, 2014 3:49 am
Location: Oxford, United Kingdom

Re: New EPRB simulation using GAViewer

Postby ajw » Sat Sep 12, 2015 5:05 am

Well, in many programming languages arrays are zero based. So when an array has N elements, and you want to iterate over the elements, you use
Code: Select all
for(nn=0;nn<N;nn=nn+1)
{
     Arr[nn]=....
}

and the index nn goes from 0 to N-1 to handle al the individual elements of an array.

But in the GAviewer code above the N is only the number of iterations in the most inner loop, and can be chosen any convenient value.
It has nothing to do with the iterations over the different angles for A and B in the 2 outer loops (360 degrees is divided in 40 parts in this code, so you get 41 angles if you want to include both 0 and 360 degrees in the events).
ajw
 
Posts: 20
Joined: Sat Sep 05, 2015 1:04 pm

Re: New EPRB simulation using GAViewer

Postby FrediFizzx » Sat Sep 12, 2015 9:30 am

ajw wrote:But in the GAviewer code above the N is only the number of iterations in the most inner loop, and can be chosen any convenient value.

Yes, and I tried N = 100 and N = 1000. It really didn't make much difference for the scalar results; the bivector "residue" just goes to more vanishing with higher N. But this simulation is a great demonstration that Joy's model does indeed predict that E(a, b) = -a.b.
FrediFizzx
Independent Physics Researcher
 
Posts: 1119
Joined: Tue Mar 19, 2013 6:12 pm
Location: California, USA

Re: New EPRB simulation using GAViewer

Postby FrediFizzx » Sun Sep 20, 2015 10:49 am

Here is the code using Joy's full formulation.
Code: Select all
function getRandomLambda()
{
     if( rand()>0.5)
{
     return 1;
}
     else
{
     return -1;
}
}

function getVector1(idx)
{
     step1=0.025*2*pi; //step size is taken 1/20 of pi
     angle1=idx*step1;
     v1=sin(angle1)*e1+cos(angle1)*e2+0.00001*e3;
     return v1;
}
function getVector2(idx)
{
     step2=0.025*2*pi; //step size is taken 1/20 of pi
     angle2=idx*step2;
     v2=sin(angle2)*e1+cos(angle2)*e2+0.00001*e3;
     return v2;
}

     batch test()
{
     set_window_title("Test Joy Christian");
     N=20;
     I=e1^e2^e3;
     s[0]=0;
     s[1]=0;
     s[2]=0;
     s[3]=0;
     s[4]=0;
     s[5]=0;
     s[6]=0;
     s[7]=0;
     s[8]=0;
     s[9]=0;
     s[10]=0;
     s[11]=0;
     s[12]=0;
     s[13]=0;
     s[14]=0;
     s[15]=0;
     s[16]=0;
     s[17]=0;
     s[18]=0;
     s[19]=0;
     s[20]=0;
     s[21]=0;
     s[22]=0;
     s[23]=0;
     s[24]=0;
     s[25]=0;
     s[26]=0;
     s[27]=0;
     s[28]=0;
     s[29]=0;
     s[30]=0;
     s[31]=0;
     s[32]=0;
     s[33]=0;
     s[34]=0;
     s[35]=0;
     s[36]=0;
     s[37]=0;
     s[38]=0;
     s[39]=0;
     s[40]=0;
     
     a[0]=0;
     a[1]=0;
     a[2]=0;
     a[3]=0;
     a[4]=0;
     a[5]=0;
     a[6]=0;
     a[7]=0;
     a[8]=0;
     a[9]=0;
     a[10]=0;
     a[11]=0;
     a[12]=0;
     a[13]=0;
     a[14]=0;
     a[15]=0;
     a[16]=0;
     a[17]=0;
     a[18]=0;
     a[19]=0;
     a[20]=0;
     a[21]=0;
     a[22]=0;
     a[23]=0;
     a[24]=0;
     a[25]=0;
     a[26]=0;
     a[27]=0;
     a[28]=0;
     a[29]=0;
     a[30]=0;
     a[31]=0;
     a[32]=0;
     a[33]=0;
     a[34]=0;
     a[35]=0;
     a[36]=0;
     a[37]=0;
     a[38]=0;
     a[39]=0;
     a[40]=0;

     //Ax[0]=
     angleIx=0;
     for(oo=0;oo<41;oo=oo+1) //iteration over aa
     {
         aa=getVector1(oo);
         for(pp=0;pp<41;pp=pp+1) //iteration over bb
         {
             bb=getVector2(pp);
             angleIx=oo-pp;
             if(oo<pp)
{
     angleIx=pp-oo;
}
     //minus_cos_a_b=-1*(aa.bb);

     for(nn=0;nn<N;nn=nn+1) //perform the experiment N times
     {
         lambda=getRandomLambda(); //lambda is a fair coin, resulting in +1 or -1
         mu=lambda * I;
         C=-I.aa;  //C = {-a_j B_j}
         D=I.bb;   //D = {b_k B_k}
         E=mu.aa;  //E = {a_k B_k(L)}
         F=mu.bb;  //F = {b_j B_j(L)}
         A=C E;  //eq. (1) of arXiv:1103.1879, A(a, L) = {-a_j B_j}{a_k B_k(L)}
         B=F D;  //eq. (2) of arXiv:1103.1879, B(b, L) = {b_j B_j(L)}{b_k B_k}
         q=0;
         if(lambda==1) {q=((-C) A B (-D));} else {q=((-D) B A (-C));} //eq. (6)

         s[angleIx]=s[angleIx]+q; //

         a[angleIx]=a[angleIx]+1;

}
}
}
     for(oo=0;oo<41;oo=oo+1) //iteration over angle differences
     {
         st=s[oo];
         at=a[oo];
         //an=oo*10;
         mean_A_B=st/at;
         print(mean_A_B, "f"); //print the result
}

     prompt();

}


And the results;

Code: Select all
mean_A_B = -1.000000
mean_A_B = -0.987688 + -0.000000*e2^e3 + 0.000000*e3^e1
mean_A_B = -0.951057 + 0.000000*e2^e3 + -0.000000*e3^e1 + -0.006735*e1^e2
mean_A_B = -0.891007 + -0.000000*e2^e3 + -0.000000*e3^e1 + 0.011350*e1^e2
mean_A_B = -0.809017 + 0.000000*e2^e3 + -0.000000*e3^e1 + 0.023035*e1^e2
mean_A_B = -0.707107 + 0.000000*e2^e3 + -0.000000*e3^e1 + -0.018660*e1^e2
mean_A_B = -0.587785 + 0.000000*e2^e3 + 0.000000*e3^e1 + -0.001156*e1^e2
mean_A_B = -0.453990 + -0.000000*e2^e3 + 0.000000*e3^e1 + -0.013103*e1^e2
mean_A_B = -0.309017 + 0.000000*e2^e3 + 0.000000*e3^e1 + 0.044671*e1^e2
mean_A_B = -0.156434 + 0.000000*e2^e3 + 0.000000*e3^e1 + 0.016976*e1^e2
mean_A_B = -0.000000 + -0.000000*e2^e3 + -0.000000*e3^e1 + 0.003226*e1^e2
mean_A_B = 0.156434 + 0.000000*e2^e3 + -0.000000*e3^e1 + -0.032923*e1^e2
mean_A_B = 0.309017 + 0.000000*e2^e3 + 0.000000*e3^e1
mean_A_B = 0.453990 + -0.000000*e2^e3 + -0.000000*e3^e1 + -0.004773*e1^e2
mean_A_B = 0.587785 + 0.000000*e2^e3 + -0.000000*e3^e1 + 0.017978*e1^e2
mean_A_B = 0.707107 + 0.000000*e2^e3 + 0.000001*e3^e1 + 0.027196*e1^e2
mean_A_B = 0.809017 + -0.000000*e2^e3 + 0.000000*e3^e1 + 0.010580*e1^e2
mean_A_B = 0.891007 + -0.000000*e2^e3 + -0.000000*e3^e1 + -0.008512*e1^e2
mean_A_B = 0.951057 + 0.000001*e2^e3 + 0.000000*e3^e1 + 0.008061*e1^e2
mean_A_B = 0.987688 + 0.000001*e2^e3 + -0.000000*e3^e1 + -0.003911*e1^e2
mean_A_B = 1.000000 + -0.000000*e2^e3 + -0.000000*e3^e1
mean_A_B = 0.987688 + -0.000000*e2^e3 + -0.000000*e3^e1 + -0.000391*e1^e2
mean_A_B = 0.951057 + -0.000000*e2^e3 + -0.000000*e3^e1 + 0.007319*e1^e2
mean_A_B = 0.891007 + -0.000000*e2^e3 + -0.000001*e3^e1 + 0.044138*e1^e2
mean_A_B = 0.809017 + -0.000001*e2^e3 + -0.000001*e3^e1 + 0.041491*e1^e2
mean_A_B = 0.707107 + -0.000000*e2^e3 + 0.000000*e3^e1 + -0.013258*e1^e2
mean_A_B = 0.587785 + 0.000000*e2^e3 + -0.000000*e3^e1 + 0.002697*e1^e2
mean_A_B = 0.453990 + -0.000000*e2^e3 + -0.000000*e3^e1 + 0.009546*e1^e2
mean_A_B = 0.309017 + -0.000000*e2^e3 + -0.000000*e3^e1 + 0.010974*e1^e2
mean_A_B = 0.156434 + 0.000000*e2^e3 + -0.000000*e3^e1 + 0.024692*e1^e2
mean_A_B = -0.000000 + 0.000000*e2^e3 + 0.000001*e3^e1 + -0.050000*e1^e2
mean_A_B = -0.156434 + -0.000001*e2^e3 + -0.000001*e3^e1 + 0.113584*e1^e2
mean_A_B = -0.309017 + -0.000000*e2^e3 + 0.000001*e3^e1 + -0.047553*e1^e2
mean_A_B = -0.453990 + -0.000000*e2^e3 + 0.000000*e3^e1 + -0.011138*e1^e2
mean_A_B = -0.587785 + 0.000000*e2^e3 + -0.000000*e3^e1 + 0.046230*e1^e2
mean_A_B = -0.707107 + -0.000000*e2^e3 + -0.000000*e3^e1 + 0.011785*e1^e2
mean_A_B = -0.809017 + 0.000000*e2^e3 + 0.000000*e3^e1 + -0.011756*e1^e2
mean_A_B = -0.891007 + -0.000000*e2^e3 + -0.000001*e3^e1 + 0.090798*e1^e2
mean_A_B = -0.951057 + 0.000000*e2^e3 + 0.000000*e3^e1 + -0.030902*e1^e2
mean_A_B = -0.987688 + -0.000000*e2^e3 + 0.000000*e3^e1 + -0.023465*e1^e2
mean_A_B = -1.000000
FrediFizzx
Independent Physics Researcher
 
Posts: 1119
Joined: Tue Mar 19, 2013 6:12 pm
Location: California, USA

Re: New EPRB simulation using GAViewer

Postby Joy Christian » Sun Sep 20, 2015 11:06 am

***
Excellent, Fred. Thank you very much. Below I add your "CHSH" code to bring both codes in one place, for any future reference.

FrediFizzx wrote:
FrediFizzx wrote:
Joy Christian wrote:Well, I have said all this before. The bottom line is that what the above procedure does is calculate the correlation among the usual scalar (+/-1) points within S^3.

Yes, and since the detector bivectors "drop out" of the calculation, the way I did Joy_CHSH with GAViewer was essentially a short cut. I guess I could try it with the full A_i(a, u) = d(a) h_i(a, u) type expressions.

Ok, here it is.
Code: Select all
//Adaptation of Albert Jan Wonnink's original code
//http://challengingbell.blogspot.com/2015/03/numerical-validation-of-vanishing-of.html
function getRandomLambda()
{
     if( rand()>0.5) {return 1;} else {return -1;}
}

batch test()
{
     set_window_title("Test of Joy Christian's CHSH derivation");
     N=20000; //number of iterations (trials)
     I=e1^e2^e3;
     s=0;
     a1=sin(0)*e1 + cos(0)*e2 + 0.000*e3;
     b1=sin(pi/4)*e1 + cos(pi/4)*e2 + 0.000*e3;
     a2=sin(pi/2)*e1 + cos(pi/2)*e2 + 0.000*e3;
     b2=sin(3*pi/4)*e1 + cos(3*pi/4)*e2 + 0.000*e3;

     for(nn=0;nn<N;nn=nn+1) //perform the experiment N times
     {
          lambda=getRandomLambda(); //lambda is a fair coin
                                                 //resulting in +1 or -1
          mu=lambda * I;  //calculate the lambda dependent mu
          C1=-I.a1;  //C = {-a_j B_j}
          D1=I.b1;   //D = {b_k B_k}
          C2=-I.a2;  //C = {-a_j B_j}
          D2=I.b2;   //D = {b_k B_k}
          E1=mu.a1;  //E = {a_k B_k(L)}
          F1=mu.b1;  //F = {b_j B_j(L)}
          A1=C1 E1;  //eq. (1) of arXiv:1103.1879, A(a, L) = {-a_j B_j}{a_k B_k(L)}
          B1=F1 D1;  //eq. (2) of arXiv:1103.1879, B(b, L) = {b_j B_j(L)}{b_k B_k}
          E2=mu.a2;  //E = {a_k B_k(L)}
          F2=mu.b2;  //F = {b_j B_j(L)}
          A2=C2 E2;  //eq. (1) of arXiv:1103.1879, A(a, L) = {-a_j B_j}{a_k B_k(L)}
          B2=F2 D2;  //eq. (2) of arXiv:1103.1879, B(b, L) = {b_j B_j(L)}{b_k B_k}
          q=0;
          if(lambda==1) {q=((-C1) (A1 B1) (-D1))-((-C1) (A1 B2) (-D2))+((-C2) (A2 B1) (-D1))+((-C2) (A2 B2) (-D2));}
          else {q=((-D1) (B1 A1) (-C1))-((-D2) (B2 A1) (-C1))+((-D1) (B1 A2) (-C2))+((-D2) (B2 A2) (-C2));}
          s=s+q;
     }
     Joy_CHSH=abs(s/N);
     print(Joy_CHSH, "f");
     prompt();
}


And the result is,

Joy_CHSH = 2.828427

So it comes out the same as taking the shortcut.
Joy Christian
Research Physicist
 
Posts: 1561
Joined: Wed Feb 05, 2014 3:49 am
Location: Oxford, United Kingdom


Return to Sci.Physics.Foundations

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest

CodeCogs - An Open Source Scientific Library