Computer Simulation of EPR Scenarios

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

Re: Computer Simulation of EPR Scenarios

Postby Ben6993 » Sun Feb 09, 2014 2:52 pm

Hi Richard

Quoting you:
"So how does Michel violate the CHSH inequality? Answer: through massive use of the detection loophole. The outcomes are not +/-1, but +/-1 or 0. From all the data generated he post-selects those pairs for which neither outcome is 0. "

Does Michel agree that he has rejected pairs of the form:(1,0),(-1,0),(0,0),(0,1) or (0,-1) from the counts?

If one needs to reject more than 12% of pairs (I saw that somewhere in this forum) to turn a sawtooth graph into a sinusoidal one, shouldn't that be noticeable in the probabilities not reaching high enough in places with the result that the area under the curve will be diminished, and clearly deviant from sinusoidal at some place?

Best wishes
Ben
Ben6993
 
Posts: 287
Joined: Sun Feb 09, 2014 12:53 pm

Re: Computer Simulation of EPR Scenarios

Postby FrediFizzx » Sun Feb 09, 2014 10:31 pm

Hi Ben,

Read back through these messages. In Joy's model the zero counts are for states that never exist in the first place. Check out this proof.

Ask any questions you might have about it. Yes, there is a difference right now between the simulation and Joy's model. I expect that to disappear in the near future. ;)

I guess I will explain that some more; if you say have the simulation setup for 1 million pair runs, out of that, because of the random selection, will be pair states that don't / can't exist in the first place. So what you have to do in the simulation is not send those thru to the detectors. Only states that can exist should be sent thru to detection and be counted in the results. Joy's proof of it is quite marvelous.
FrediFizzx
Independent Physics Researcher
 
Posts: 2905
Joined: Tue Mar 19, 2013 7:12 pm
Location: N. California, USA

Re: Computer Simulation of EPR Scenarios

Postby gill1109 » Mon Feb 10, 2014 3:15 am

Hi everyone

Because I can program rapidly in R and because R programs are short, I have programmed Minkwe's simulation - following the description he gives at https://github.com/minkwe/epr-simple/ - in R.

I remind you that R is open-source and free; you can get it from http://www.r-project.org

Here is the code of the main part - generate hidden variables, generate settings, generate outcomes, plot correlation. I believe that the only real difference between my program and Minkwe's is that he chooses hidden variables from a discrete uniform distribution, I choose them from a continuous uniform distribution.

I took a sample size of 1 million since that already gives excellent results and probably will not exceed memory on most of your machines.

Code: Select all
set.seed(1234)  ## For reproducibility
s <- 1       ## spin 1 for photons, spin 1/2 for electrons
N <- 10^6
e <- runif(N, 0, 2*pi)    ## Hidden variable "e"
p <- (sin(runif(N, 0, pi/2))^2)/2   ## Hidden variable "p"
n <- 2*s
a <- runif(N, 0, 2*pi)    ## Alice's settings
b <- runif(N, 0, 2*pi)    ## Bob's settings
ep <- e + 2*pi*s          ## Hidden variable "e-prime"
c <- ((-1)*n)*cos(n*(a-e))
cp <- ((-1)*n)*cos(n*(b-ep))
A <- ifelse(abs(c)>p, sign(c), 0)          ## Alice outcome
B <- ifelse(abs(cp)>p, sign(cp), 0)        ## Bob outcome
theta <- ifelse( a-b > 0, a-b, a-b+2*pi )  ## Differences between settings
bin <- floor(theta*360/(7.5*2*pi))*7.5     ## Binned, bin-width 7.5 degrees
sample <- A!=0 & B!= 0                     ## Which runs both particles detected

corrs <- tapply(A[sample]*B[sample], bin[sample], mean)
bins <- sort(unique(bin[sample]))
pdf("minkwe.pdf")
plot(bins, corrs, xlab = "Theta", ylab = "Correlation",
    main = "Minkwe's Simulation, R version by R.D. Gill")
    graphics.off()


Can I upload an attachment to this forum? Or include a jpeg image in a posting?

For the time being, you can make do with this link to the output graph:

http://www.math.leidenuniv.nl/~gill/minkwe.pdf

You can download the script from

http://www.math.leidenuniv.nl/~gill/minkwe.R
gill1109
Mathematical Statistician
 
Posts: 2812
Joined: Tue Feb 04, 2014 10:39 pm
Location: Leiden

Re: Computer Simulation of EPR Scenarios

Postby gill1109 » Mon Feb 10, 2014 3:42 am

Sequel to last post: a simple modificaiton of the EPR experiment gives us a CHSH experiment. It is just a question of Alice and Bob choosing their settings in a different way.

I am a little puzzled by the result, I get CHSH = 2.4, not 2 sqrt 2, and also in the EPR plot of the last script, we see two whole periods of the singlet correlation, not one. Need to figure out the good angles for this kind of particles!

Code: Select all
## Minkwe's simple EPR simulation, now in the form of a CHSH type experiment
##
## Minkwe's algorithm as described at https://github.com/minkwe/epr-simple/
## programmed in R by R.D. Gill, 10 February 2014, Leiden.

set.seed(2345)  ## For reproducibility
s <- 1       ## spin 1 for photons, spin 1/2 for electrons
N <- 10^6
e <- runif(N, 0, 2*pi)    ## Hidden variable "e"
p <- (sin(runif(N, 0, pi/2))^2)/2   ## Hidden variable "p"
n <- 2*s

aLab <- sample(c(1, 2), N, replace = TRUE) ## Alice setting label
bLab <- sample(c(1, 2), N, replace = TRUE) ## Bob setting label
aDeg <- (aLab-1)*45
bDeg <- 22.5 + (bLab-1)*45
a <- aDeg*2*pi/360
b <- bDeg*2*pi/360

ep <- e + 2*pi*s          ## Hidden variable "e-prime"
c <- ((-1)*n)*cos(n*(a-e))
cp <- ((-1)*n)*cos(n*(b-ep))
A <- ifelse(abs(c)>p, sign(c), 0)          ## Alice outcome
B <- ifelse(abs(cp)>p, sign(cp), 0)        ## Bob outcome

combo <- 2*(aLab-1) + (bLab-1)
 ## (1,1) becomes 0
 ## (1,2) becomes 1
 ## (2,1) becomes 2
 ## (2,2) becomes 3

sample <- A!=0 & B!= 0                     ## Which runs both particles detected

corrs <- tapply(A[sample]*B[sample], combo[sample], mean)
names(corrs) <- c("(1,1)","(1,2)","(2,1)", "(2,2)")
corrs


This code can be downloaded from

http://www.math.leidenuniv.nl/~gill/minkwe-chsh.R

And this was the output:

Code: Select all
> corrs <- tapply(A[sample]*B[sample], combo[sample], mean)
> names(corrs) <- c("(1,1)","(1,2)","(2,1)", "(2,2)")
> corrs
     (1,1)      (1,2)      (2,1)      (2,2)
 0.5966620 -0.5941712  0.5929386  0.5949753
gill1109
Mathematical Statistician
 
Posts: 2812
Joined: Tue Feb 04, 2014 10:39 pm
Location: Leiden

Re: Computer Simulation of EPR Scenarios

Postby gill1109 » Mon Feb 10, 2014 3:54 am

OK, sorry guys, got the EPR and CHSH sorted out for spin 1/2 particles:

http://www.math.leidenuniv.nl/~gill/min ... h-spin12.R

http://www.math.leidenuniv.nl/~gill/minkwe-epr-spin12.R

http://www.math.leidenuniv.nl/~gill/minkwe-spin12.pdf

and the results of the CHSH experiment are of course resounding:

Code: Select all
corrs <- tapply(A[sample]*B[sample], combo[sample], mean)
> names(corrs) <- c("(1,1)","(1,2)","(2,1)", "(2,2)")
> corrs
     (1,1)      (1,2)      (2,1)      (2,2)
 0.7002947  0.6973906 -0.6982893  0.6984241
gill1109
Mathematical Statistician
 
Posts: 2812
Joined: Tue Feb 04, 2014 10:39 pm
Location: Leiden

Re: Computer Simulation of EPR Scenarios

Postby Joy Christian » Mon Feb 10, 2014 4:18 am

Ben6993 wrote:Does Michel agree that he has rejected pairs of the form:(1,0),(-1,0),(0,0),(0,1) or (0,-1) from the counts?


Ben,

I am not sure what Michel's answer would be, but let me just reiterate what Fred has already said. The pairs of the form (1,0), (-1,0), (0,0), (0,1), or (0,-1) do not correspond to any initial state (e, t) in my model. A detector cannot detect what is not there even as an initial state. We have to implement that fact in the code one way or another. I know very little about programming, but I think Michel has accomplished this successfully in his simulation. In any case, the analytical model speaks for itself. It does not require a simulation to be valid. However, it is nice to see Michel's simulation to see that the model does in fact produce the correct results.
As you know, the model is summarized in eight elementary equations, which can be verified easily by anyone: http://libertesphilosophica.info/blog/w ... 1/EPRB.pdf

Joy
Last edited by Joy Christian on Mon Feb 10, 2014 4:30 am, edited 1 time in total.
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: Computer Simulation of EPR Scenarios

Postby gill1109 » Mon Feb 10, 2014 4:21 am

So now I am looking at Joy's model which according to Fred is described fully in
http://libertesphilosophica.info/blog/wp-content/uploads/2014/02/complete.pdf

Joy writes: "without loss of generality we can now identify e0 in R^3 as a random vector and eta(x, g0) = theta0 in [0, 2pi]
as a random scalar". But we read that theta0 is the angle between x and another direction g0, and we have to reject the hidden variables if any x exists such that |cos(eta(x,e0)| < sin^2(eta(x, g0)).

This suggests that we are supposed to proceed as follows: we pick two unit vectors e0 and g0 in R^3 (independently, uniformly distributed?).
We compare |cos(eta(x,e0)| and sin^2(eta(x, g_0)), as x varies throughout the same set of unit vectors.
We reject the pair e0, g0 if any x exists such that |cos(eta(x,e0)| < sin^2(eta(x, g0))

But Joy picks some x and reduces (e0, g0) to (e0, theta0) where theta0 = eta(x, g0). In formula (11) there is a quantifier "for all x...". But theta0 depends on x too. So even though theta0 might be, for any particular x, and randomly chosen g0, a random angle in [0, 2pi], it still depends on x. We can't simulate this model by picking e0 and theta0 independently of one another and rejecting according to (11). theta0 depends on x and we have to check that a certain condition holds, involving e0, g0 and x, for all x.

So: are there one or two objects called x in this description? What is the intended recipe for computer simulation?
gill1109
Mathematical Statistician
 
Posts: 2812
Joined: Tue Feb 04, 2014 10:39 pm
Location: Leiden

Re: Computer Simulation of EPR Scenarios

Postby Joy Christian » Mon Feb 10, 2014 4:53 am

gill1109 wrote:...we have to reject the hidden variables if any x exists such that |cos(eta(x,e0)| < sin^2(eta(x, g0)).


Nothing has to be "rejected." As I clearly state, "...there exist no states for which |cos(eta(x,e0)| < sin^2(eta(x, g0)) for any x..."

We are completely free to choose any x whatever. The above condition---which is a geometrical property of the 3-sphere---will be respected automatically for any x.

gill1109 wrote:But theta0 depends on x too. So even though theta0 might be, for any particular x, and randomly chosen g0, a random angle in [0, 2pi], it still depends on x.


Indeed it does. So what? We can certainly simulate the model by picking e0 and theta0 independently, as well as respecting eq. (11) at the same time. It has already been done by Michel. Although eta(x,e0) and eta(x,g0) are both functions of any x, we can certainly choose them independently by picking e0 and g0 independently.
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: Computer Simulation of EPR Scenarios

Postby gill1109 » Mon Feb 10, 2014 6:45 am

Joy Christian wrote:It has already been done by Michel.
I'm afraid Michel certainly did something completely different.

And by the way, Michel certainly does reject any particle pair for which either of the two particles gives an outcome "0". Sometimes it is Alice's, sometimes it is Bob's, sometimes it is both. This is easy for anyone to check. I have shown you how I inserted a couple of lines in Michel's code in order to save the intermediate results as a text file: Alice and Bob's setting, Alice and Bob's outcome. And I gave you a few lines of R code which read in that data and compile a few tables.

In Joy's formulas, there is a requirement that involves "for all x". However, Michel checks the condition with x=a on Alice's particle and with x=b on Bob's particle. He does not check the state in its entirety against "for all x".

So according to Joy's intended reading, Michel is allowing lots of pairs of particles to be successfully detected and contribute to the correlation, which should not have been there in the first place.

Looks to me like the same kind of notational mix-up as I believe I identified in "Christian 1.0" (the one page paper of some years back). Is a particular variable locally or globally defined? Scope! The kind of things which computer scientists have to be very careful with. The distinction between "for all" and "there exists", and the *scope* of such qualifiers.
gill1109
Mathematical Statistician
 
Posts: 2812
Joined: Tue Feb 04, 2014 10:39 pm
Location: Leiden

Re: Computer Simulation of EPR Scenarios

Postby Joy Christian » Mon Feb 10, 2014 7:18 am

gill1109 wrote:In Joy's formulas, there is a requirement that involves "for all x".


As I have already noted several times, the requirement is "for any x", not "for all x" simultaneously. Thus x can be equal to a, or b, or c, or d, or whatever.
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: Computer Simulation of EPR Scenarios

Postby Joy Christian » Mon Feb 10, 2014 7:29 am

gill1109 wrote:Looks to me like the same kind of notational mix-up as I believe I identified in "Christian 1.0" (the one page paper of some years back).


All you ever identified was a notational mix-up in your misguided straw-man: http://arxiv.org/abs/1203.2529. Your errors were also identified long time ago by Bill Schnieder, and later in much more detail by Lucien Hardy. Here is what Bill Schnieder wrote on the Physics Forums long time ago:

"Richard Gill's refutation is not a new critique. It is essentially the same as one of the critiques advanced by a certain Florin Moldoveanu in the fall last year to which Joy Christian has already replied. It originates from a misunderstanding of Joy's framework which admittedly is not very easy to understand, especially for those who have blinders of one kind or another.

Gill thinks Joy is using a convoluted more difficult method to do a calculation and prefers a different method which ultimately leads him to a different result, not realizing/understanding that the calculation method Joy used is demanded by his framework. This is hardly a serious critique, not unlike his failed critique of Hess and Phillip. He should at least have read Joy's response to Moldoveanu which he apparently did not, since he does not cite or mention it. It's been available since October 2011, one-month after Moldoveanu posted his critique.

I remember [Moldoveanu] came here to boast about his critique and I pointed out his misunderstanding at the time in this thread:

"... you are missing the point because Joy Christian is not using handedness as a convention but as the hidden variable itself."

This is the same error Gill has made. See section II of Joy's response to Moldoveanu."
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: Computer Simulation of EPR Scenarios

Postby gill1109 » Mon Feb 10, 2014 7:45 am

Joy Christian wrote:
gill1109 wrote:In Joy's formulas, there is a requirement that involves "for all x".


As I have already noted several times, the requirement is "for any x", not "for all x" simultaneously. Thus x can be equal to a, or b, or c, or d, or whatever.


The symbol "upside down capital A" means for all, or indeed for any x, ... for whatever x you substitute, it has to be true. You can check it for a, and you can check it for b, but that is not enough: it has to be true for all x. Logic 101?

https://en.wikipedia.org/wiki/Universal_quantification
gill1109
Mathematical Statistician
 
Posts: 2812
Joined: Tue Feb 04, 2014 10:39 pm
Location: Leiden

Re: Computer Simulation of EPR Scenarios

Postby gill1109 » Mon Feb 10, 2014 8:05 am

Dear Joy

Perhaps you can help us distill a simulation algorithm from your model description.

On Minkwe's site https://github.com/minkwe/epr-simple/, Michel Fodje writes:

The simulation consists of a Source object, generating particle pairs, to be analyzed at 2 Detection stations. The maths of the model can be summarized as:

λ = {e, p, s}, e ∈ [0..2π), s = {1/2, 1}
p = ½ sin²t, t ∈ [0..π/2)
e' = e + 2πs
A(a,λ) = sign(-1ⁿ cos n(a − e)) if |cos n(a − e)| > p, 0 otherwise
B(b,λ) = sign(-1ⁿ cos n(b − e')) if |cos n(b − e')| > p, 0 otherwise
where n = 2s

Alternatively, p = tᵏ, t ∈ [0..π/4), k=π/2 also works well.

1) The Source, and Particles:

Simply generates two tuples each with 3 parameters corresponding to the "hidden variables". The source has a single parameter spin (s) which determines the type of particles produced. For spin 1/2 particles such as electrons, s=1/2 for photons s=1.

A particle pair is generated as follows:

`e` - an angle common to both particles selected randomly each time from the range [0, 2π)
`p` - a property common to both particles selected randomly from
the distribution `½ sin²t, t ∈ [0..π/2)`
The left particle is the tuple (e, p, n) The right particle is the tuple (e + 2πs, p, n)

2) The Detection Stations:

Two stations exist named Alice and Bob. Alice will measure the left particle, while Bob will measure the right particle.

The detection at each station proceeds as follows:

- A random angle `x` is selected in the range [0, 2π). This is the detector setting.
- A transformed value `C` is calculated using the particle properties and
the detector setting `x` as `C = -1ⁿ cos n(x − e)`. The sign of this value, will
ultimately determine which channel the particle will be detected at; `+1` or `-1`
- The absolute value of `C` together with the particle property `p` will determine
if the particle goes through the filter.
If `|C| > p` the particle goes through. Every particle which goes through the
filter is detected by one of the two channels.

- The setting `x` and the output (`+1`, `-1`, or `0`) are registered locally at each station
and saved in separate files at the end of the simulation. Each station is not aware of and
uses no information from or about the other station.


This description is very clear, quite unambiguous, and obviously not going to result in a simulation of your model.

Perhaps you can help us by writing your idea of a genuine simulation of your model?

Richard
gill1109
Mathematical Statistician
 
Posts: 2812
Joined: Tue Feb 04, 2014 10:39 pm
Location: Leiden

Re: Computer Simulation of EPR Scenarios

Postby Joy Christian » Mon Feb 10, 2014 8:37 am

gill1109 wrote:The symbol "upside down capital A" means for all, or indeed for any x, ... for whatever x you substitute, it has to be true. You can check it for a, and you can check it for b, but that is not enough: it has to be true for all x. Logic 101?


It *is* true for any x, where x can be equal to a, or b, or c, or d, or e, or f, or g, or whatever. Maths-101: http://libertesphilosophica.info/blog/w ... 1/EPRB.pdf
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: Computer Simulation of EPR Scenarios

Postby Joy Christian » Mon Feb 10, 2014 8:43 am

gill1109 wrote:Perhaps you can help us by writing your idea of a genuine simulation of your model?


You can find the links to all "genuine simulations" of my model on my blog: http://libertesphilosophica.info/blog/

Better still, instead of a flight-simulator, you can find the actual Jumbo Jet here: http://libertesphilosophica.info/blog/w ... 1/EPRB.pdf
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: Computer Simulation of EPR Scenarios

Postby Heinera » Mon Feb 10, 2014 8:49 am

Joy Christian wrote:
gill1109 wrote:The symbol "upside down capital A" means for all, or indeed for any x, ... for whatever x you substitute, it has to be true. You can check it for a, and you can check it for b, but that is not enough: it has to be true for all x. Logic 101?


It *is* true for any x, where x can be equal to a, or b, or c, or d, or e, or f, or g, or whatever. Maths-101: http://libertesphilosophica.info/blog/w ... 1/EPRB.pdf


Then why is Michel's simulation crucially dependent on x being a (at Alice) and b (at Bob)? Replace with any other values in the code, and you get the wrong results.
Heinera
 
Posts: 917
Joined: Thu Feb 06, 2014 1:50 am

Re: Computer Simulation of EPR Scenarios

Postby Joy Christian » Mon Feb 10, 2014 9:06 am

Heinera wrote:Then why is Michel's simulation crucially dependent on x being a (at Alice) and b (at Bob)? Replace with any other values in the code, and you get the wrong results.


What?

Alice can choose any "a" she wants. She can choose a, or a', or a'', or a''', or a'''', or whatever. And likewise Bob can choose any "b" he wants. There is no restriction of any kind on the freedom of choice of Alice and Bob. You are obviously doing something wrong to get the wrong result.
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: Computer Simulation of EPR Scenarios

Postby Heinera » Mon Feb 10, 2014 9:17 am

Joy Christian wrote:
Heinera wrote:Then why is Michel's simulation crucially dependent on x being a (at Alice) and b (at Bob)? Replace with any other values in the code, and you get the wrong results.


What?

Alice can choose any "a" she wants. She can choose a, or a', or a'', or a''', or a'''', or whatever. And likewise Bob can choose any "b" he wants. There is no restriction of any kind on the freedom of choice of Alice and Bob. You are obviously doing something wrong to get the wrong result.

Of course they can choose any a and b they want. My point was that x must be equal to Alice's (resp. Bob's) choice, and no other value. But these choices can not be known to the initial state in a local model.
Heinera
 
Posts: 917
Joined: Thu Feb 06, 2014 1:50 am

Re: Computer Simulation of EPR Scenarios

Postby Joy Christian » Mon Feb 10, 2014 9:59 am

Heinera wrote:Of course they can choose any a and b they want. My point was that x must be equal to Alice's (resp. Bob's) choice, and no other value. But these choices can not be known to the initial state in a local model.


Alice and Bob are completely free to choose any directions a and b they want. Their choices do not affect the initial state (e, t) in any way. In particular, the choices made by Alice and Bob can be changed at any time during the flights of the "photons" from the initial state to the respective choices of detectors by Alice and Bob.
Joy Christian
Research Physicist
 
Posts: 2793
Joined: Wed Feb 05, 2014 4:49 am
Location: Oxford, United Kingdom

Re: Computer Simulation of EPR Scenarios

Postby gill1109 » Mon Feb 10, 2014 10:07 am

We are talking about Michel's simulation here, not your intended model, Joy.

Joy Christian wrote:
Heinera wrote:Of course they can choose any a and b they want. My point was that x must be equal to Alice's (resp. Bob's) choice, and no other value. But these choices can not be known to the initial state in a local model.


Alice and Bob are completely free to choose any directions a and b they want. Their choices do not affect the initial state (e, t) in any way. In particular, the choices made by Alice and Bob can be changed at any time during the flights of the "photons" from the initial state to the respective choices of detectors by Alice and Bob.


In Michel's simulation, Alice and Bob's choices do determine whether or not there is a state. Put it a different way, if we insist on having a genuine pair of measurement outcomes for a given setting pair a and b, we have to go on sampling pairs of particles till we do have a state which satisfies the two conditions which Michel tests. The state (e,t) we finally get has effectively been drawn from a probability distribution which depends on the pair of settings a, b.

Bell's theorem says that QM is incompatible with the conjuction of locality, realism, and freedom. Michel's simulation is local and realistic but violates "freedom", in other words, he violates "no-conspiracy". *He* needs to know the measurement settings in advance in order to provide a state to be measured.

The jumbo-jet has difficulties getting off the ground. I have not seen a genuine simulation of Joy's model yet, and I suspect that the reason no one could do it yet, is because no one could decode the mathematics.
gill1109
Mathematical Statistician
 
Posts: 2812
Joined: Tue Feb 04, 2014 10:39 pm
Location: Leiden

PreviousNext

Return to Sci.Physics.Foundations

Who is online

Users browsing this forum: ahrefs [Bot] and 100 guests

cron
CodeCogs - An Open Source Scientific Library