by gill1109 » Sat Jun 08, 2019 8:12 pm
FrediFizzx wrote:I took another look at this paper and I am still having trouble figuring out what it is that you are actually presenting. What are the math formulas for all those graphs you present? Can one of them be presented in a complete equation string?
The whole thing is drawn by this little R script:
- Code: Select all
oneplot <- function() {
if (nswitch%%2 == 0) times <- c(times,1)
timesplus <- c(times,times+1,times+2,times+3)
count <- function(t,d) {
sum(timesplus > t & timesplus <= t+d)
}
points <- seq(from=0,to=1,by=0.01)
numbers <- outer(data,points,Vectorize(count))
corr <- 2*(apply(numbers%%2,2,sum)/1000)-1
correlation <- c(corr,corr[100:1])
difference <- pi*(c(points,1+points[2:101]))
plot(difference,correlation,
type="l",bty="n",ann=FALSE,xaxt="n",yaxt="n")
lines(c(0,2*pi,2*pi,0,0),c(+1,+1,-1,-1,+1))
abline(h=0)
lines(difference,-cos(difference),col="blue")
lines(c(0,pi,2*pi),c(-1,+1,-1),col="red")
}
nswitch <- 4
set.seed(11091951)
par(mfrow=c(3,4),oma=c(0,0,0,0),mar=c(0,0,0,0))
for( i in (1:12) ) {
times <- sort(runif(nswitch))
data <- 2*runif(1000)
oneplot()
}
I'm firing up Rstudio right now to play with it again. But it's just a completely ordinary LHV model with functions A(a, lambda) and B(b, lambda) where lambda is an angle between 0 and 2 pi, a and b are angles between 0 and 2 pi, B = - A, and A is a step function taking the values +1 and -1 only. Its values on pi to 2 pi are just the values on 0 to pi, reversed. So for instance you pick four angles strictly between 0 and pi. That forms five intervals partitioning [0, pi]. "Colour" those intervals alternatingly black and white. So you get: black, white, black, white, black. Now repeat from pi to 2 pi: white, black, white, black, white. So the whole unit circle has been coloured alternatingly black and white in exactly 10 segments. And two opposite points always have opposite colours.
Now the model is: given two settings a, b (points on the unit circle), and given a point lambda uniformly at random on the unit circle, the outcomes of the two spin mesurements are the colour at point a + lambda, and the reverse of the colour at point b + lambda
[quote="FrediFizzx"]I took another look at this paper and I am still having trouble figuring out what it is that you are actually presenting. What are the math formulas for all those graphs you present? Can one of them be presented in a complete equation string?[/quote]
The whole thing is drawn by this little R script:
[code]oneplot <- function() {
if (nswitch%%2 == 0) times <- c(times,1)
timesplus <- c(times,times+1,times+2,times+3)
count <- function(t,d) {
sum(timesplus > t & timesplus <= t+d)
}
points <- seq(from=0,to=1,by=0.01)
numbers <- outer(data,points,Vectorize(count))
corr <- 2*(apply(numbers%%2,2,sum)/1000)-1
correlation <- c(corr,corr[100:1])
difference <- pi*(c(points,1+points[2:101]))
plot(difference,correlation,
type="l",bty="n",ann=FALSE,xaxt="n",yaxt="n")
lines(c(0,2*pi,2*pi,0,0),c(+1,+1,-1,-1,+1))
abline(h=0)
lines(difference,-cos(difference),col="blue")
lines(c(0,pi,2*pi),c(-1,+1,-1),col="red")
}
nswitch <- 4
set.seed(11091951)
par(mfrow=c(3,4),oma=c(0,0,0,0),mar=c(0,0,0,0))
for( i in (1:12) ) {
times <- sort(runif(nswitch))
data <- 2*runif(1000)
oneplot()
}[/code]
I'm firing up Rstudio right now to play with it again. But it's just a completely ordinary LHV model with functions A(a, lambda) and B(b, lambda) where lambda is an angle between 0 and 2 pi, a and b are angles between 0 and 2 pi, B = - A, and A is a step function taking the values +1 and -1 only. Its values on pi to 2 pi are just the values on 0 to pi, reversed. So for instance you pick four angles strictly between 0 and pi. That forms five intervals partitioning [0, pi]. "Colour" those intervals alternatingly black and white. So you get: black, white, black, white, black. Now repeat from pi to 2 pi: white, black, white, black, white. So the whole unit circle has been coloured alternatingly black and white in exactly 10 segments. And two opposite points always have opposite colours.
Now the model is: given two settings a, b (points on the unit circle), and given a point lambda uniformly at random on the unit circle, the outcomes of the two spin mesurements are the colour at point a + lambda, and the reverse of the colour at point b + lambda