Sunday 4 May 2014

10.000 euro bet on – off – on …


At this moment, the 4th may at 8:47h the bet seems to be still ‘on’: Joy Christan and Richard Gill are betting whether or not a computer simulation of the exploding balls experiment can be created that can or cannot produce Bell type statistics. This bet is not the 5000 euros one for which the exploding balls experiment should actually be performed (see the earlier post on this subject).
The current bet focusses on the angle settings from Alice and Bob where the difference between classical and QM predictions are most significant: 0, 45, 90 and 135 degrees.
The exact text of the bet as stated by Richard can be found here:
Joy has responded and claimed victory by supplying this model in R: http://rpubs.com/jjc/16415
In his own words:
“Richard Gill has offered 10,000 Euros to anyone who can simulate the N directions of angular momentum vectors appearing in equation (16) of this experimental proposal of mine: http://arxiv.org/abs/0806.3078. Here I am attempting to provide such N directions. They are given by the vectors 'e' in this simulation. He has also offered further 5,000 Euros to me if my proposed experiment is realized successfully. I am hopeful that that will happen someday. The details of these challenges by Richard Gill can be found here: http://www.sciphysicsforums.com/spfbb1/viewtopic.php?f=6&t=46. While this is by no means a perfect simulation of my model, it does meet all the stringent conditions set out by Richard Gill for his challenge.

Since after the explosion the angular momentum vectors 'e' moving along the z direction will be confined to the x-y plane, a 2D simulation is good enough for my proposed experiment. ”
Gill disputes whether Joy's simulation meets the conditions of the challenge.
The agreement now is to have a jury give a verdict (see http://www.sciphysicsforums.com/spfbb1/viewtopic.php?f=6&t=52&start=10#p1935).

For the non-programmers, and for myself to get acquainted with in the R syntax, I explain this code line  by line below.
Joy’s R code explained

set.seed(9875)
Computers cannot really generate random numbers, so they have a mechanism to pick numbers from a list of previously stored ‘random’ numbers. The seed indicates where to start picking.
angles <- seq(from = 0, to = 360, by = 1) * 2 * pi/360
seq(): generates a sequence of numbers. In seq(from = 0, to = 360, by = 1), an array containing the numbers 0 to 360 is created (the ‘by’ indicates the difference between succeeding numbers). After this all numbers in the array are multiplied by 2 * pi / 360 and stored in angles.  

K <- length(angles)
length(): gives the number of elements in the array, and stores it in a single value K.

corrs <- numeric(K)  ## Container for correlations

declares an array structure named ‘corrs’ which can contain K numbers (?)

M <- 10^5  ## Sample size. Next try 10^6, or even 10^7

The number 10 to the power of 5 = 1000000 is stored in M.
s <- runif(M, 0, pi)
t <- runif(M, 0, pi)
runif(n, min, max) generates an array of random numbers between the min and the max value. Here a list of M numbers between 0 and pi is generated and stored in s, and again in t. 

x <- cos(s)
 
y <- 1.2 * (-1 + (2/(sqrt(1 + (3 * t/pi)))))
So ‘x’ will contain M random cos() numbers, ‘y’ will contain M numbers with values from the formula above (sqrt() is square root)

 e <- rbind(x, y)  ## 2 x M matrix; M columns of e represent the
## x and y coordinates of points on a circle; y -> -y => e -> -e.
rbind(x,y) simply puts the two lists with numbers in x and y in one 2xM array called ‘e’

for (i in 1:(K - 1)) {
}
This is a loop structure: The program iterates over the code between the brackets, having i=1, 2, 3 …, until i =K-1 (K was the number of angles, so 361). Notice that within this loop another loop is used, having ‘j’ going from 1 to K-1.

    alpha <- angles[i]
The i-th angle in the array of angles is stored in ‘alpha’. The angles are expressed in radians, so when i=0 the alpha=0, when i = 1 then alpha=1 *pi /360 etc.

 
a <- c(cos(alpha), sin(alpha))  ## Measurement vector 'a'
c(): an assignment: So Joy stores the 2 numbers cos(alpha) and sin(alpha) in a 2d array.

for (j in 1:(K - 1)) {
the second loop within the firs loop starts

        beta <- angles[j]
        b <- c(cos(beta), sin(beta))  ## Measurement vector 'b'
‘beta’ will also contain each time a different angle, and b the two numbers cos(beta) and sin(beta)

        ca <- colSums(e * a)  ## Inner products of cols of 'e' with 'a'
        cb <- colSums(e * b)  ## Inner products of cols of 'e' with 'b'
so ‘e’ contains:

x1  x2 x3 …xM  y1  y2 y3 …yM

which is multiplies with a (a1, a2)

giving

x1a1  x2a1 x3a1 … xMa1  y1a2  y2a2 y3a2 … yMa2

colSums() then sums the numbers per column, giving

x1a1+y1a2    x2a1+y2a2  x3a1+y3a2 …xMa1 +yMa2

which is stored in ca. The same calculation is done with ‘b’ giving cb.

        N <- length(ca)
The number of elements in ca is put in N (which will always be M)

        corrs[i] <- sum(sign(-ca) * sign(cb))/N
sign() returns 1 for positive numbers, -1 for negative numbers.

So each number in ca is first multiplied by -1 because of the ‘–ca’, and the sign function results in a list with 1’s and -1’s. These are multiplied by the elements in sign(cb).The resulting list of 1’s and -1’s is summed up and divided by N. The calculated number is stored in the i-th position of corrs.
 
        Ns[i] <- N
N is stored in the i-th position of Ns

When the code in the loops is completed it continues with the statements below
corrs[K] <- corrs[1]
Ns[K] <- Ns[1]
Here the obtained values for angle=360 is taken the be the same as for angle=0

The rest of the code is for printing the results.
An extended description of R can be found here: http://cran.r-project.org/doc/manuals/R-intro.html

Some concluding remarks

  • Joy's model iterates over Alice’s and Bobs angles. This is an efficient mechanism to get results for all the settings. The same results should be obtained using random (integer) angles between 0 and 360 degrees, but one might need a slightly larger 'M' to get nice results for all the angles.
  • The conditions for the Bell type simulation seems to be met: All the particles are used in the result set (which excludes the detection loophole) and the measurement for Alice does not use Bob's measurement and vice versa.





6 comments:

  1. Thank you, Albert Jan. This is very useful. As you know, I am not a programmer myself, so your explanations are very useful for me.

    ReplyDelete
  2. Unfortunately, this code only shows what happens when one particular choice of beta is made. Only alpha varies. Now run the code with a different beta. That would be very illuminating.

    ReplyDelete
  3. By the way, the verdict of the jury was that the submitted data set did not win the challenge. Which is also easy for anyone else to check for themselves.

    ReplyDelete
  4. Sorry: there are two plots: first with beta fixed, them with alpha fixed. But what we don't see are the results for the four combinations of alpha, beta needed for CHSH. The point is, there is a whole correlation surface. Christian shows you what the surface looks like, above two perpendicular straight lines. Here it looks good. He doesn't show you what it looks like anywhere else...

    ReplyDelete
  5. I have modified Christian's script so that it now prints out the four correlations for the four combinations of angles in a CHSH experiment. Two of the correlations are just what we want, but the other two are badly off target.

    http://rpubs.com/gill1109/joy

    ReplyDelete
  6. Albert Jan wrote above "Joy has responded and claimed victory by supplying this model in R: http://rpubs.com/jjc/16415". What he doesn't mention is that this was only the first of a whole sequence of attempts. They all failed. You can see half a dozen other attempts at http://rpubs.com/jjc

    Several of them use the detection loophole trick. Different subsets of pairs of particles are selected for the correlations at different pairs of angles. One of them uses a most extraordinary and novel trick, namely to supply two sets of data, one for one pair of angles, the other for another pair of angles.

    Of course the jury had to judge on the basis of the "final submission", I forget which one that was, but it doesn't matter, since it is hard to come up with a counter-example to a true theorem. A true theorem of arithmetic. The arithmetic of an N x 4 spreadsheet of numbers +/-1.

    Actually Fred Diether got angry with his Master's failures and made his own, different, submission at one point. Unfortunately, it failed too.

    I am really greatful to Joy and Fred and others for their obstinate denial of simple mathematical truth, because otherwise I would never have come up with the new (finitary) "spreadsheet" proof of Bell's theorem. I acknowledge Joy in my paper in Statistical Science http://arxiv.org/abs/1207.5103

    It should be coming out any day now.

    ReplyDelete