Live data from Hacker News

Breaking Bell's Inequality with Monte Carlo Simulations in Python

bytepawn.com

31–40 of 64 posts

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#31
post #6

This is closely related to my PhD. It was many years ago but if I remember rightly there is no need for the assumption of determinism - Bell Inequalities hold just as well for random local hidden variables. Simulating the correlations with computer programs is an interesting idea, partly because it challenges to those who still believe in a "local" reality to demonstrate Bell Inequality violations in distributed clas…

Hi, author of the article here.

Regarding determinism, I think the reason the assertion is "no deterministic local hidden.." is that, you need to break both the deterministic and locality assumption. However there is a nuance, which is, do you need to break both properties to..

(a) break the Bell inequalities, or, to

(b) reproduce quantum mechanics..

which is not exactly the same thing.

For example, in my toy simulation framework, this [1] simple setup --- where Alice's two measurement devices always return +1, and Bob's two measurement devices are conditioned on Alice's returned value, without any randomness --- breaks the Bell-inequalities at S=4, but:

(1) it's not physical, because it also breaks the Tsirelson bound (4 > 2.82), ie. you can't actually achieve this with any known real-world physical system

(2) it's deterministic in the sense that the code does not call `random()`

(3) but from the perspective of Bob, who "calls" the measurement function, it would still appear random, since it depends on whether Alice measures H or T, which was the outcome of a random coin flip; so whether we consider this random is quite nuanced..

So the above is an interesting thought/Python experiment for what it takes to break the Bell inequalities. Then, if we modify the code to reproduce quantum mechanics (for which the 2 qubits stand in), which is the code shown in the original post, in that case we cannot even avoid calling `random()`, because the "first" to measure their qubit must also get +1 and -1 with equal probabilility, so the theory cannot be deterministic.

[1] https://gist.github.com/mtrencseni/de13f766911aaaf5bfd5d4636...

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#32

Earlier quoted context omitted.

> and therefore you conclude that the world is non-local. No, Bell's inequality has a few sensible assumtions, like locality. The conclusion is that at least one of them is wrong and real world is a sensible one :(. By the way, there is this crazy thing call QM that nobody likes but gives accurate results.

Just because there is a way, doesn't make it the only way. >but gives accurate results. Giving accurate results is missing the point. Hint: The point is understanding how nature's does it. Here is the Chesterton's fence implied by Bell's Inequality : Lemma: There exist a local classical simulator that allows to simulate a universe that behaves according to the probabilities of QM. Corollary : we can simulate "fast" a…

> Giving accurate results is missing the point.

No, that's the central point of modern (starting with Newton) physical science. In fact, I'd argue that's the main reason for the astonishing advances of the physics in mere 300 years: people stopped bothering too much about philosophical underpinning of reality and started to fucking measure the reality instead, as precisely and accurately as they could and then some. Fresnel's optics won over Newton's not because of its superior philosophical merits (it needs luminiferous aether to be a perfectly rigid incompressible solid, after all), but simply because it very accurately described light's interference, diffraction, all kinds of refraction and the accompanying polarization, and also dispersion, all in one nice, self-contained package. That's what mattered, not the ridiculousness or reasonableness of proposition that light corpuscles have poles and can experience fits of easy transmission/reflection.

> Hint: The point is understanding how nature's does it.

By being itself, how else? /s

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#33
post #21

Earlier quoted context omitted.

On the other hand, academics slap fights are magnificently petty to behold. In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake. That is why academic politics are so bitter.

The conclusion reads like someone who can't admit they're wrong on Reddit: > The common defect in the critiques [2], [6], and [14] is that, instead of engaging with the original quaternionic 3-sphere model presented in my papers [1], [7]– [11] using Geometric Algebra, they insist on criticizing entirely unrelated flat space models based on matrices and vector “algebra.” This logical fallacy by itself renders the crit…

I thought that was satire. I can't believe someone actually wrote that.

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#34

Earlier quoted context omitted.

Bell's theorem is a theorem. If hypothesis applies conclusion must follow. That's math. Everything is fine with it (They are a reformulation of "Bonferroni inequalities" or "Boole's_inequality" by the way). You've got to reframe the problem so that Bell's theorem doesn't apply. When you build your theory, if you manage to define what a measurement is, so that you don't satisfy the hypothesis of the Bell's theorem, yo…

> You've got to reframe the problem so that Bell's theorem doesn't apply. When you build your theory, if you manage to define what a measurement is, so that you don't satisfy the hypothesis of the Bell's theorem, you get to avoid having to have its conclusions. This (in my opinion) a bad way of explaining how the standard reasoning goes. We start with a list of assumptions, we prove this inequality which it turns out…

>what are we conditioning on?

The local hidden state, but you don't get to set it from inside the universe when you do an experiment (this local hidden state is unobservable).

From inside the universe based on this hidden state, everything behave classically, pseudo-randomly based on the local hidden state.

But because you don't get to set the local hidden state during your experiment if you want to calculate the probabilities, you have to integrate over the possible values of the unknown hidden state, and this allows you to recover the strange looking quantum correlations.

Doing repeated experiment inside a universe mean picking a different initial local hidden state (because it's unobservable).

[Spoiler ahead] The original idea is not from me, if you want the nitty gritty details, look at the work of Marian Kupczynski (Closing the Door on Quantum Nonlocality https://philarchive.org/archive/KUPCTDv1 ). Or his more recent works.

I have made a straight forward implementation (3 years ago) of it to convince myself with a Monte Carlo simulation : https://gist.github.com/unrealwill/2a48ea0926deac4011d268426... [End Spoiler]

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#35
If you want to try your hand at violating Bell inequalities, there are widgets in [1] that allow you to input strategies (as javascript) for Alice and Bob. It continuously performs Monte Carlo sampling of the strategies and presents their success rate.

There's a classical-only widget, that goes through quite some contortions behind the scenes to prevent cheating via writing to global variables, and a quantum-allowed widget where that kind of cheating is possible due to the underlying implementation cheating in precisely that using-globals way in order to correctly simulate the quantum mechanics.

Anyways, I've had a few people tell me playing around with the widgets helped them understand the inequality.

[1]: https://algassert.com/quantum/2015/10/11/Bell-Tests-vs-No-Co...

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#36
> This is known as a Bell inequality. It captures the essential limitation imposed by any theory based on local hidden variables — theories that adhere to classical notions of determinism (no random chance in the measurement apparatus), locality (no faster-than-light influences) and realism (pre-existing properties).

Obligatory reminder that there is an extra assumption here: the assumption that the result of the coin flip is not correlated to the hidden state of the particle. If when receiving a particle in stage a_H your coin flip always leads to, say, HH, then you will break Bell's inequality even if all the other assumptions hold. Theories that have this property are called "superdeterministic".

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#37
post #31
post #6

This is closely related to my PhD. It was many years ago but if I remember rightly there is no need for the assumption of determinism - Bell Inequalities hold just as well for random local hidden variables. Simulating the correlations with computer programs is an interesting idea, partly because it challenges to those who still believe in a "local" reality to demonstrate Bell Inequality violations in distributed clas…

Hi, author of the article here. Regarding determinism, I think the reason the assertion is "no deterministic local hidden.." is that, you need to break both the deterministic and locality assumption. However there is a nuance, which is, do you need to break both properties to.. (a) break the Bell inequalities, or, to (b) reproduce quantum mechanics.. which is not exactly the same thing. For example, in my toy simulat…

Yes I could have worded that better!

So... what you have here is a deterministic non-local hidden variable model which violates Bell Inequalities. The reduced probabilities at Bob's end might look random to him, but fundamentally the measurement outcomes are determined by Alice and Bob's measurement choices. All good.

You also know that any deterministic local hidden variable model must obey Bell Inequalities.

What I'm saying is that any local hidden variable model must obey Bell Inequalities. You cannot increase the value of S by relaxing determinism.

So actually it's kind of a distraction to bring in determinism. Either you have local hidden variables - which obey Bell Inequalities - or you allow non-local hidden variables - in which case Bell Inequalities can be violated. Locality is the key assumption.

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#38
post #21

Earlier quoted context omitted.

On the other hand, academics slap fights are magnificently petty to behold. In any dispute the intensity of feeling is inversely proportional to the value of the issues at stake. That is why academic politics are so bitter.

The conclusion reads like someone who can't admit they're wrong on Reddit: > The common defect in the critiques [2], [6], and [14] is that, instead of engaging with the original quaternionic 3-sphere model presented in my papers [1], [7]– [11] using Geometric Algebra, they insist on criticizing entirely unrelated flat space models based on matrices and vector “algebra.” This logical fallacy by itself renders the crit…

That looks like a person attacked by a troll in a position of power.

But then, I don't want to read the actual claims.

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#39
This was really excellent - for many of us, code helps to make mechanisms concrete, and it forces every single thing to be pinned down, and not hand-waved away.

(Like another commenter, I was also hoping for a direct/standalone explanation for why the red matrix is transposed.)

Re: Breaking Bell's Inequality with Monte Carlo Simulations in Python

#40

Earlier quoted context omitted.

> You've got to reframe the problem so that Bell's theorem doesn't apply. When you build your theory, if you manage to define what a measurement is, so that you don't satisfy the hypothesis of the Bell's theorem, you get to avoid having to have its conclusions. This (in my opinion) a bad way of explaining how the standard reasoning goes. We start with a list of assumptions, we prove this inequality which it turns out…

>what are we conditioning on? The local hidden state, but you don't get to set it from inside the universe when you do an experiment (this local hidden state is unobservable). From inside the universe based on this hidden state, everything behave classically, pseudo-randomly based on the local hidden state. But because you don't get to set the local hidden state during your experiment if you want to calculate the pro…

Everything up to the [spoiler ahead] in this comment is (as far as I can tell) exactly how things work in standard formulations of Bell's inequality. There's nothing weird or crackpot there.

Your numerical code is impossible for me to read without some basic idea of what you're trying to show, but I'd like to point out that numpy has functions like np.radians, and np.deg2rad to convert from degrees to radians, you don't have to make your own.

Post reply on HN