A computer violation of the CHSH

If a clear and valid no-go for Einsteinian hidden parameters is real, it must in no way be possible to violate the CHSH with a local hidden variables based computer simulation. In the paper we show that with the use of a modified Glauber-Sudarshan method it is possible to violate the CHSH.The criterion value comes close to the quantum value and is approximately 2.4. The proof (POC) is presented with the use of an R computer program. The important snippets of the code are discussed and the complete code is presented in an appendix.


Introduction
The starting-point of our analysis is the Bell formula [1] to explain spin-spin entanglement which, in retrospect, was for Einstein [2] a reason to claim that quantum mechanics is incomplete and/or inseparable [3].
This correlation function is the hidden parameters, λ ∈ Λ, expression for a pardigmatic entanglement experiment [5]: The λ from the set Λ are distributed with probability density ρ(λ).
In our computer program we will look at CHSH inequalities [6] such as the one below. For convenience we will provide the derivation of one such an inequality from Bell's formula (1). Let us look at four pairs of parameter vectors: (a, b), (a, c), (d, b) and (d, c).
Obviously there are other CHSH inequalities like e.g.
It is noted that similar CHSH contrasts can be derived in a similar manner as provided.

modified Glauber-Sudarshan method
In an excellent textbook of quantum optics the Glauber -Sudarshan method is described [4, page 264-266, section 14.2 ]. The method is related to the experiment of Aspect [5]. We can rewrite Bell's formula as [4] The (θ 1 , θ 2 ) [4, page 263, fig 14.1] are equivalent to the (a, b) etc setting parameters used in formula (1). In the previous formula, N = f (λ)dλ Hence, ρ(λ) = f (λ)N −1 . The Glauber-Sudarshan method tries to find an expression for the S 1 (λ, θ 1 ) and S 2 (λ, θ 2 ). Basic in our local hidden variables computer program is a modification of the Glauber-Sudarshan method [4, page 266]. The modification is Then we note that f cos φ and sin φ modify the definitions of γ ± [4, page 266]. In the computer program φ is treated as a characteristic of the measurement instrument. For more details the reader is referred to [4]. Both measurement instruments share the same φ. Furthermore let us consider α + ∈ {−1, 1} a hidden variable and take α − = −α + . In the computer program use is made of α The A or B indication is suppressed when necessary. In [4, page 266] we may read that, generally, we have for S Obviously |S| ≤ 1. Perhaps somewhat superfluous, we will present the complete algebra behind the algorithm. from (9) we can learn that |γ + | 2 = |α + | 2 cos 2 θ + |α − | 2 sin 2 θ + f 2 cos 2 φ + (12) From (12) and (13) it can be concluded that In order to have |γ + | 2 + |γ − | 2 = |α + | 2 + |α − | 2 = 2, with α + ∈ {−1, 1} and α − = −α + , it is necessary to have Therefore, if b 2 − c ≥ 0 the solution f is real and gives This latter equation is the nucleus of the computer program.
In the computer evaluation we will look at the formula ± arise in the repective intruments when the "waves" enter the instrument viz. (2).

The computer algorithm
In this section snippets of the R-code are presented and described. The snippets are the building blocks that represent the mathematics from the previous section. The complete code is for reference presented in an appendix. Let us begin with defining the characteristic parameter φ as This value is present in both separate functions in the code representing the measurements instruments A and B (2). The numerical values are given in degrees and converted to radians in the algorithm. Furthermore, we found out via trial and error that the following θ (A(B)) can be used to force a CHSH violation with local means.

Crucial response functions
With this information let us look at the snippets of code that reflect the in-instrument processes. Let us start with the A(lice) function. We look at the evaluation of s ± is a response to the input from the source. In the code this is sigmaA. − . When a "wave" (2) enters the instrument the equivalent of the response is such as provided above. The runif(1) randomization is the cause that there are a couple of runs necessary to find a Bell CHSH violation. As a weak attempt at theory we tried to have only at even trials with thet=97.39957*pi/180 a random ±1 selection. On the B(ob)-side we have for s The weak form of theory introduced here is on the B side for thet=-26.37997*pi/180 to have at even trials a random ±1 selection. In both cases runif(1) is the function responsible for random number 0 < r < 1 draws. The sign gives a −1 if that number is less than 0.5 and 1 when greater or equal than 0.5. Obviously, this cannot be the whole physics story. Hence, the number of runs. Nevertheless the claim is that with sufficient number of runs with, each, 100 pairs of "photons", the two snippets will warrant a substantial violation close to the quantum CHSH-criterium value (22). This must be completely impossible if the CHSH is really waterproof. The two snippets are computed without computational nonlocality.
The B side is similar. But the fine tuning differs. We have: .
The numbers xi and sumA are derived from trial and error experiments. It must be noted that they only are partially successful for approximation of the quantum correlation values on the B side.
We will deal with the function fGamAlf(alpha,thet,phi) later. It is based on (9)  − are computed according to (9) and (18), using (20), then the S1 = S (A) in the program has |S1| ≤ 1. We start with n equal 1. Only if the gamma array is unequal to zero in length, do we compute S1. If a zero length gamma array is produced given the particular θ (A) and s (A) ± the alpha [1] and alpha [2] are interchanged. Because n is then still 1, the call of fGamAlf(alpha,thet,phi) is repeated but with the interchanged alpha. This leads in all cases to a nonzero length gamma array and therefore n becomes 2 and the S1 computation is completed. We note that in both the A and B case the φ is equal to the value in (20).
According to the statements on [4, page 264-267] our claim at the end of the previous subsection 2.1 would be impossible. It is not. In this section it is crystal clear that |S1| ≤ 1.

The fGamAlf(alpha,thet,phi) function
Here we will show that in the computation the function fGamAlf(alpha,thet,phi) follows the requirements in the equations (9)  On the B side this is similar but independent & isolated from the parameters of the A side.
Let us walk through the code presented here. After the initialisation of the 2-dim gamma array the b and c from(16) are computed. The test (b * * 2) − c > 0 is to ascertain that the quadratic form in f from (15) has a real solution given in (18). The situation is such that if the condition (b * * 2) − c > 0 is not met, then, a zero length gamma array is send back via the return command. This is processed such as decribed in section 2.2. If the condition (b * * 2) − c > 0 is met, then, the f can be computed according to the famous abc formula. We have f 2 + 2b f + c = 0 which solution, f = − (2b) 2 ± 1 2 (2b) 2 − 4c, is represented in (18). We have decided to take the + branch and therewith compute gamma [1] and gamma [2]. In the program code presented in the appendix the fCHSHA can be implemented in the [A] of (2) and the fCHSHB can be implemented in [B] of (2). The main (start) routine is situated in the [S].

Random trials
Our computer program uses a one-step randomisation of the setting pairs (θ m ), with k, m ∈ {1, 2} but we make sure that the number of trial is a fourfold. The snippet of code to generate random pairs is given below.

Result, conclusion & discussion
The claim is here that, with a local model, it is possible to substantially violate the CHSH inequality and come pretty close to the B of (7) value of quantum theory. Below we report an example of a result of our computations with the algorithm. Its output is verbatim: is based on the computations from subsection 2.4 which refers back to the correlation in equation (19) using the modified Glauber-Sudarshan method. The number 2.369504 represents the B as defined in (7) applied to the E matrix from the modified Glauber-Sudarshan method (23). The loop is such that only index number 3, i.e. (7) is outputted. The number 3 denotes that B CHSH from (2) is violated. The output e.g. 1 instead of 3 is an indication of a violation of B in (4). In the final output the printing of the type, i.e. jout, is suppressed. It can be observed that the quantum B does not violate (6) under this conditions. So we may note that, with Einstein local hidden parameters, the CHSH can be violated size: B = 2.369504 in the output of the algorithm. The first number 100 in the output refers to nMax, the amount of "photon" pairs inspected in this particular run. Obviously this is a somewhat small number of photon pairs. However, it is the principle violation that counts. The seldection of nMax=100 is simply restricted by the limited computational power of the machine. The number 1469 refers to the number of runs (in a sequence from 1 to max 1 × 10 5 ) to compute a violating B . Each run holds 100 pairs. So there were 146900 − 1 trials before the violating result B = 2.369504 was found. The reader can experiment with the code to see that lower numbers of runs are also possible to produce a violation. Anyway, when CHSH is waterproof this type of violation must never occur in this size.
In the 1469-th run the A and B snippets, in particular the random parts in the ifs of section 2.1 are able to produce violating S values that generate the E in (23).
We note again that if the CHSH was really waterproof, the number of trials would be extremely large and the violation B would be close to 2.00. Therefore we believe that (23)represents a genuine violation and contest that it absolutely has to be larger than B min = 1 + √ 2. This size of B min is sometimes requested for other settings. We believe such a numerical value for B min is not warranted in this case. Below we will see that not even the quantum case violates this B min = 1 + √ 2. Moreover, please note that Bell's formula give rise to only B min = 2. The B derived from this matrix in (24) is B = 2.40219. Therefore we may note that the hidden parameter B and the quantum B are close. We also see from comparing (23) with (24) that the algorithm does not exactly reproduce the quantum values. This cannot be expected either. We note that because in that case the reader would require a complete theory whereas the reader hinself only has Bell's statistics in his hands. Further research into a proper theory might be a possibility to replace the runif(1) elements. Nevertheless the conclusion is that the CHSH can be violated with local parameter principles. This concurs with e.g. [7], [8] and [9]. It must be stressed that it does not matter how long it takes with randomization to substantially violate and it also is quite unimportant that there is a random table in a computer. If CHSH is waterproof this kind of violations are impossible from principle. Apparently they are possible after all. For convenience of the reader the complete R program is included in an appendix. It must be noted that this violationcan also be obtained in VBA for excel. This to avoid all kinds of needless debate about the nature of R and that the reviewer does not understand R. All these things and more already happened more than once. If the reader wants the VBA program it can be mailed asap.