Adding expectation values to a CHSH animation

The referee's choice is correlated between the two players, but not the entangled qubit. If you were to trace out the referee's choice (say it was a quantum system too and you measured it) then you'd be left with the shared qubit in a maximally mixed state, which is as unentangled as you can get.
  • #1
edguy99
Gold Member
450
28
An animation of the CHSH experiment to generate correlated photons is at: http://www.animatedphysics.com/games/photon_longdistance_chsh.htm

@georgir has a program to show the calculations using the formula for photon detection
return Math.random() < (Math.cos(r(p-a)*2)+1)/2;
yields the following for the coincident (same as the animation):

classic:
{
"0-22.5": {
"coincident": 1675,
"total": 2501,
"rate": 0.6697321071571372
},
"45-67.5": {
"coincident": 1671,
"total": 2468,
"rate": 0.6770664505672609
},
"45-22.5": {
"coincident": 1709,
"total": 2579,
"rate": 0.6626599457153936
},
"0-67.5": {
"coincident": 820,
"total": 2452,
"rate": 0.33442088091353994
}
}

I am looking for help in calculating the expectation values for the above data. I am interested in adding the expectation values into my animation. A brief explanation on how to do it I found at http://www.gutenberg.us/articles/CHSH_Bell_test:

Any help or checking would be appreciated.

The usual form of the CHSH inequality is:
(1) − 2 ≤ S ≤ 2,
where
(2) S = E(a, b) − E(a, b′) + E(a′, b) + E(ab′).

a and a′ are detector settings on side A, b and b′ on side B, the four combinations being tested in separate subexperiments. The terms E(a, b) etc. are the quantum correlations of the particle pairs, where the quantum correlation is defined to be the expectation value of the product of the "outcomes" of the experiment, i.e. the statistical average of A(aB(b), where A and B are the separate outcomes, using the coding +1 for the '+' channel and −1 for the '−' channel.
 
Physics news on Phys.org
  • #2
edguy99 said:
@georgir has a program to show the calculations using the formula for photon detection
return Math.random() < (Math.cos(r(p-a)*2)+1)/2;

Math.random returns a chosen uniformly random value between 0 and 1. The expression Math.random() < p will evaluate to true with probability p. So the coincidence rate for that particular expression is exactly (Math.cos(r(p-a)*2)+1)/2.

You may be interested in viewing an interactive widget I made to simulate the CHSH test as part of a blog post, to get ideas. You can view it directly on jsfiddle, or in the blog post (with explanation of how to use it). Also you can edit it on jsfiddle. Here's a screenshot:

README_screenshot.png
 
  • #3
Strilanc said:
Math.random returns a chosen uniformly random value between 0 and 1. The expression Math.random() < p will evaluate to true with probability p. So the coincidence rate for that particular expression is exactly (Math.cos(r(p-a)*2)+1)/2.

You may be interested in viewing an interactive widget I made to simulate the CHSH test as part of a blog post, to get ideas. You can view it directly on jsfiddle, or in the blog post (with explanation of how to use it). Also you can edit it on jsfiddle. Here's a screenshot:

Nice animation, nice to be able to insert javascript. Never used fiddle, but was able to copy to what I am used to using and am able to work with it. Two quick questions:
1/ Your "photons" are shot with 2 independent random polarizations, rather then being split from a common photon and both photons having the same Jones vector?
2/ I could not find the turn(x,90) or the measure() functions, maybe I am looking in the wrong file?

Thanks, I hope to have fun and let you know.
 
  • #4
edguy99 said:
Nice animation, nice to be able to insert javascript. Never used fiddle, but was able to copy to what I am used to using and am able to work with it. Two quick questions:
1/ Your "photons" are shot with 2 independent random polarizations, rather then being split from a common photon and both photons having the same Jones vector?
2/ I could not find the turn(x,90) or the measure() functions, maybe I am looking in the wrong file?

Thanks, I hope to have fun and let you know.

It would be more accurate to say that my simulation has two polarizations than to say it has whole photons. Polarization is a 2-level quantum system, a qubit, and the post is framed in terms of qubits. The qubits are entangled to have agreeing value and phase, which corresponds roughly to saying two polarizations will agree both horizontally and diagonally (whichever one you check first).

The measure function is defined at line 217 of src/Engine/ChSh.js; it's just a simple wrapper around code in src/Engine/Superposition.js.

They're written inside strings instead of directly in the code because the widget uses web workers to avoid blocking the browser while running simulations. There's also some string interpolation happening to make escaping the sandbox a bit harder. Also it's not using any math libraries or anything, just direct twiddling of numbers inside a buffer. And the code on jsfiddle has been transpiled by traceur into ES5. So I'm not too surprised you had trouble finding the measure function.
 
  • #5
Strilanc said:
It would be more accurate to say that my simulation has two polarizations than to say it has whole photons. Polarization is a 2-level quantum system, a qubit, and the post is framed in terms of qubits. The qubits are entangled to have agreeing value and phase, which corresponds roughly to saying two polarizations will agree both horizontally and diagonally (whichever one you check first).

The measure function is defined at line 217 of src/Engine/ChSh.js; it's just a simple wrapper around code in src/Engine/Superposition.js...

Thanks, I will have a look.

WRT to polarizations, perhaps I am miss-reading, but you assign var refChoice = Math.random() < 0.5; to Alice, then a second var refChoice = Math.random() < 0.5; to Bob, I don't see how these are entangled? Here's where I would assign the same Jones vector to both.
 
  • #6
The entanglement is in the fake `sharedQubits` variable, which is only worked with indirectly via `measure` and `turn`. In the code the entangled state is stored as a list of 8 floats representing 4 complex amplitudes, and Alice and Bob's operations fiddle with the list in the way described by the postulates of QM.

The 'refChoice' variable is the referee's choice, not the entangled qubit. Each player gets an independent random referee bit. The CHSH game is for two isolated players to pick bits satisfying ##a \oplus b = x \land y##, where ##a, b## are the players' respective chosen bits and ##x, y## are random bits (chosen by referee to prevent cheating) fed respectively to each player once they're isolated (and ideally at the last possible moment, to close the signalling loophole).
 
  • #7
Strilanc said:
It would be more accurate to say that my simulation has two polarizations than to say it has whole photons ...

I like the wiki quote at https://en.wikipedia.org/wiki/Qubit:

A qubit is a two-state quantum-mechanical system, such as the polarization of a single photon: here the two states are vertical polarization and horizontal polarization.
 
  • #8
Strilanc said:
The expression Math.random() < p will evaluate to true with probability p. So the coincidence rate for that particular expression is exactly (Math.cos(r(p-a)*2)+1)/2.
A bit confusing, but this formula is only used for deciding if a single photon passes a certain polarizer. So it does not reflect coincidence rates between two polarizers in any way in general.
Certainly not in the 'classical' simulation. But it does match coincidence rates in the special case of the "qm" simulation where the photon gets changed by the first measurement.
 

FAQ: Adding expectation values to a CHSH animation

1. What is the CHSH inequality?

The CHSH inequality is a mathematical inequality introduced by John Clauser, Michael Horne, Abner Shimony, and Richard Holt in 1969. It is used to test the limits of local hidden variable theories in quantum mechanics.

2. What does the CHSH animation show?

The CHSH animation visually demonstrates the concept of Bell's inequality and how it is violated by quantum mechanical systems. It shows a scenario where two particles are entangled and how their measurements violate the CHSH inequality.

3. How do you add expectation values to a CHSH animation?

To add expectation values to a CHSH animation, you need to calculate the expectation values for the specific measurements being made on the entangled particles. This can be done using the mathematical formula for expectation values and plugging in the appropriate values for the measurements.

4. Why is adding expectation values important in a CHSH animation?

Adding expectation values to a CHSH animation helps to provide a more complete understanding of the concept being demonstrated. It allows viewers to see the specific values being measured and how they contribute to the violation of the CHSH inequality.

5. How does the addition of expectation values affect the interpretation of the CHSH animation?

The addition of expectation values can provide a more concrete understanding of the concept being demonstrated in the CHSH animation. It allows viewers to see the specific values being measured and how they contribute to the violation of the CHSH inequality, making the concept more tangible and easier to interpret.

Similar threads

Replies
11
Views
2K
Replies
1
Views
1K
Replies
52
Views
9K
Replies
9
Views
28K
Back
Top