- #1,051
billschnieder
- 808
- 10
Continuing from my last post, I am posting a simple simulation to illustrate my point. Python code is included.
Note we are trying to calculate the LHS of the following inequality which we will then compare with the RHS:
[tex]|ab + ac| - bc \leq 1 [/tex]
At each angle we record the channel (+1 or -1)
Scenario 1: Like in the derivation of Bell's inequality, each data point contains data for three angles a,b,c. Note that here we only only need one data point to calculate the LHS as each point contains all our combinations: In the following code, we iterate through all the possibilities and calculate the maximum value we can attain for the LHS
OUTPUT:
As you can see, the inequality is obeyed here.
Scenario 2: Like in Bell-test experiments, each data point consists of only two angles. We therefore need three different data points to be able to calculate the LHS of our inequality, one point in which we collected for (a,b), say (a1, b1), a different one in which we collected for (a, c) say (a2, c2) and yet a different point for which we collected for (b, c), say (b3, c3). We now iterate through all the possibilities and calculate the maximum value we can get for the LHS of our inequalities.
OUTPUT:
Clearly, the second scenario, violates the inequalities!
Note we are trying to calculate the LHS of the following inequality which we will then compare with the RHS:
[tex]|ab + ac| - bc \leq 1 [/tex]
At each angle we record the channel (+1 or -1)
Scenario 1: Like in the derivation of Bell's inequality, each data point contains data for three angles a,b,c. Note that here we only only need one data point to calculate the LHS as each point contains all our combinations: In the following code, we iterate through all the possibilities and calculate the maximum value we can attain for the LHS
Code:
max_val = -999
for a in (-1,1):
for b in (-1,1):
for c in (-1,1):
v = abs(a*b + a*c) - b*c
if v > max_val: max_val = v
print 'LHS <=', max_val
Code:
LHS <= 1
Scenario 2: Like in Bell-test experiments, each data point consists of only two angles. We therefore need three different data points to be able to calculate the LHS of our inequality, one point in which we collected for (a,b), say (a1, b1), a different one in which we collected for (a, c) say (a2, c2) and yet a different point for which we collected for (b, c), say (b3, c3). We now iterate through all the possibilities and calculate the maximum value we can get for the LHS of our inequalities.
Code:
max_val = -999
for a1 in (-1,1):
for b1 in (-1,1):
for a2 in (-1,1):
for c2 in (-1,1):
for b3 in (-1,1):
for c3 in (-1,1):
v = abs(a1*b1 + a2*c2) -b3*c3
if v > max_val: max_val = v
print 'LHS <=', max_val
Code:
LHS <= 3