[HN Gopher] Breaking Bell's Inequality with Monte Carlo Simulati...
       ___________________________________________________________________
        
       Breaking Bell's Inequality with Monte Carlo Simulations in Python
        
       Author : Maro
       Score  : 99 points
       Date   : 2024-09-08 15:28 UTC (3 days ago)
        
 (HTM) web link (bytepawn.com)
 (TXT) w3m dump (bytepawn.com)
        
       | danwills wrote:
       | "a talented college physics student can do it"
       | 
       | I'm afraid I don't qualify for being able to do that, but I feel
       | like I'm tantalizingly close to understanding this overall - but
       | I'm finding it hard to understand why the lower-right "TT"
       | quadrant is transposed in the S=2.828 example (the red box in the
       | diagram). Maybe it's obvious if one understands it better?
        
         | n4r9 wrote:
         | It requires a chunk of linear algebra to understand, but the
         | Wikipedia page has a slightly more detailed explanation:
         | https://en.wikipedia.org/wiki/Bell%27s_theorem#Theorem
         | 
         | It's related to the fact that the expected value of A_1 tensor
         | B_1 is negative 1/sqrt(2), whilst the expected value of all
         | other tensor products are positive 1/sqrt(2).
        
           | jahnu wrote:
           | The explanation and table in the Simple English page for this
           | helped me grasp it better. (Although the diagram using green
           | dots only confuses :) )
           | 
           | Greene's book is a fantastic read too!
           | 
           | https://simple.wikipedia.org/wiki/Bell%27s_theorem
        
             | gus_massa wrote:
             | > _Although the diagram using green dots only confuses :)_
             | 
             | It's very confusing. In particular it does not say that the
             | box have 3 doors until the middle of the explanations.
             | Also, I don't find the example very similar to the Bell's
             | Inequality.
             | 
             | Moreover, I expect in a quantum system that when both open
             | the same door they get the same result (or the oposite) so
             | in a quantum system I expect that when both open the same
             | door they get 100% (or 0%) agreement, so insted of 50% I
             | expect 1/3 * 100% + 2/3 * 50 % = 66% (or 1/3 * 0% + 2/3 *
             | 50 % = 33%).
             | 
             | Anyway, in some versions of the Bell's Inequality the doors
             | of the boxes are "misalignment" so on box has white-gray-
             | black doors and the other has another ser of colors. let's
             | say creme-pink-brown doors. You never have a 100% or 0% of
             | coincidences of the results.
        
             | n4r9 wrote:
             | This looks like some kind of variant of Bell's Theorem.
             | I've not seen it before, but it reminds me of the GHZ
             | inequality [0]
             | 
             | [[EDIT - actually I take that back. The GHZ inequality
             | refers to three systems whereas your link refers to three
             | measurement choices]].
             | 
             | I don't think your link gives a derivation of the quantum
             | correlations beyond "Quantum physics says that half the
             | time they should get a match".
             | 
             | [0] https://en.wikipedia.org/wiki/Bell%27s_theorem#GHZ%E2%8
             | 0%93M...
        
         | Maro wrote:
         | Hi, I'm the guy who wrote the article.
         | 
         | In the article, I first show how to "break" the Bell inequality
         | without making a reference to any complicated math or Physics,
         | this is the section "Breaking the Bell inequality with non-
         | local information", which uses the dice roll example. This is
         | on purpose, for pedagogical reasons, and this is why the Python
         | approach imo is so useful to demonstrate this whole thing: the
         | key idea is, to break the inequality, you need to "peek" at the
         | other side.
         | 
         | Then, the next mental step is simply the statement that, in
         | "real life", you can prepare a composite system (eg. 2 photons
         | modeled as 2 qubits) that you can seperate (modeled as the
         | split() function in Python), you can send the 2 parts to two
         | different observers, they use a certain measurement setup, and
         | the whole game is played, statistic computed, etc. and then you
         | get this value 2.82 (which breaks the Bell inequality)! So
         | somehow, the 2 qubits are doing that we can only model [in
         | Python] as peeking!
         | 
         | The actual derivation of how to get that 2.82 is, in some
         | sense, almost like a a detail. I think with this approach, even
         | a non-physicist can understand what this whole argument is
         | (=Bell's genius).
         | 
         | "a talented college physics student can do it" - I'm a
         | Physicist, but I'm not working as a Physicist, and I was able
         | to derive all the numbers in that table by hand with pen &
         | paper directly. I figured if I can do it 15 years out of
         | school, so can a talented college physics student!
         | 
         | The next article will be that derivation [of the raw
         | probabilities], I just need to transcribe it from my notebook
         | to Latex and clean it up. If you want to see the original
         | notes:
         | 
         | https://photos.app.goo.gl/sqxLnEhyeZTDD7oA6
        
       | n4r9 wrote:
       | 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 classical computer systems. Back in the
       | day there was a crackpot researcher named Joy Christian who kept
       | publishing repetitive papers in the belief that geometric
       | algebras provided a counterexample (it looks like he's still
       | going strong! [0]). Of course, there's nothing about geometric
       | algebras that cannot be modelled in a computer program, so in
       | principle Christian should have been able to demonstrate Bell
       | violations in a distributed scenario. Needless to say, this
       | hasn't happened even though it would be a momentous breakthrough
       | in the foundations of physics.
       | 
       | [0] https://ieeexplore.ieee.org/document/9693502
        
         | eigenket wrote:
         | You know something has gone horrifically badly when a paper
         | begins with
         | 
         | > This reply paper should be read as a continuation of my
         | previous reply paper [1], which is a reply published in this
         | journal to a previous critique of one of my papers
         | 
         | We're way too deep in replies now, and anyone who values their
         | time should get out now.
        
           | 0cf8612b2e1e wrote:
           | 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.
        
             | n4r9 wrote:
             | 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
             | critiques invalid. Nevertheless, in this paper I have
             | addressed every claim made in the critique [6] and the
             | critiques it relies on, and demonstrated, point by point,
             | that none of the claims made in the critiques are correct.
             | I have demonstrated that the claims made in the critique
             | [6] are neither proven nor justified. In particular, I have
             | demonstrated that, contrary to its claims, critique [6] has
             | not found any mistakes in my paper [7], or in my other
             | related papers, either in the analytical model for the
             | singlet correlations or in its event-by-event numerical
             | simulations. Moreover, I have brought out a large number of
             | mistakes and incorrect statements from the critique [6] and
             | the critiques it relies on. Some of these mistakes are
             | surprisingly elementary.
        
               | c3534l wrote:
               | I thought that was satire. I can't believe someone
               | actually wrote that.
        
               | marcosdumay wrote:
               | 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.
        
         | Maro wrote:
         | 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...
        
           | n4r9 wrote:
           | 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.
        
       | GistNoesis wrote:
       | The Bell's Inequalities are a test for the capacity for inductive
       | reasoning of the pupil. If the pupil succeed he is not to be
       | admitted to join the ranks of quantum physicist.
       | 
       | You usually show a pupil the problem with classical
       | probabilities, and show that you can't violate Bell's
       | Inequalities, then you show that Quantum Mechanics managed to
       | replicated the observed probabilities using a non-local way, and
       | therefore you conclude that the world is non-local.
       | 
       | But this logic doesn't stand. You need to use inductive reasoning
       | to see it through. Ask yourself the question, what change would
       | it take to your theory to make it local and still replicate the
       | observed probabilities (and still look reasonable).
       | 
       | Solve the riddle (it's quite beautiful once you see it :) ) and
       | you will be rewarded with the awesome title of crackpot
       | physicist, pitted against other dubious crackpot physicist each
       | convinced their loopholes are the ones and only.
        
         | gus_massa wrote:
         | > _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.
        
           | GistNoesis wrote:
           | 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 universe which behaves
           | (in law) exactly like our universe.
           | 
           | Nota Bene : This doesn't mean we can compute QM probabilities
           | fast, (we can't), although one way of computing them would be
           | to use Montecarlo estimation on various instances of universe
           | simulations.
           | 
           | The question is not whether to lift the fence, or how to lift
           | the fence, the question is how are numerical biological
           | instabilities handled.
        
             | Joker_vD wrote:
             | > 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
        
         | eigenket wrote:
         | > You usually show a pupil the problem with classical
         | probabilities, and show that you can't violate Bell's
         | Inequalities, then you show that Quantum Mechanics managed to
         | replicated the observed probabilities using a non-local way,
         | and therefore you conclude that the world is non-local.
         | 
         | If you do this you're doing a bad job at being a teacher.
         | 
         | The way the argument should go is you start with a list of
         | assumptions (of which locality is one), derive Bell's
         | inequality from them, and determine that as Bell's inequality
         | seems to be false in real experiments at least one of your
         | assumptions was wrong. Then you can talk about quantum
         | mechanics and explain which of these assumption are broken in
         | quantum mechanics. If you have time you can have fun talking
         | about different interpretations of quantum mechanics because
         | (e.g.) Everettian Many Worlds is completely local, but still
         | produces predictions matching quantum mechanics (and therefore
         | breaks Bell's inequality).
        
           | GistNoesis wrote:
           | >If you do this you're doing a bad job at being a teacher.
           | 
           | If this wasn't sufficiently clear, I am not a teacher, I am a
           | crackpot physicist.
           | 
           | Hint : Listing the assumptions doesn't work. This is what I
           | call the three-card monte argument. The ball is not under one
           | of the three goblets, the ball is in the sleeve of the
           | magician.
        
             | eigenket wrote:
             | > Hint : Listing the assumptions doesn't work
             | 
             | Why not?
             | 
             | I could see that it might not if you are not clear about
             | your assumptions
        
               | GistNoesis wrote:
               | It's circular reasoning, hidden in the definition of your
               | assumptions. By defining not clearly what a measurement
               | is and observations are.
               | 
               | You must let the cat step out of the box your definitions
               | put you in.
               | 
               | You have infinite freedom in your choices of definitions,
               | listing assumptions is creating a false dichotomy.
               | Especially when doing so conclude to exclude the most
               | probable assumption : Locality.
               | 
               | Preserve locality, and find another self consistent
               | theory which define properly what according to it a
               | measurement is, an not take measurement and observations
               | as axioms.
        
               | eigenket wrote:
               | Will you grant me that it is at least possible to derive
               | Bell's inequality by listing out a complete set of
               | assumptions (including assumptions that define what a
               | measurement is and what observations are)?
               | 
               | Of course you personally may disagree with some of these
               | axioms (indeed, if you take Bell's theorem seriously you
               | must), but certainly it is possible to list them, and
               | thereby derive Bell's inequality?
        
               | GistNoesis wrote:
               | 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, you get to
               | avoid having to have its conclusions.
               | 
               | One of Bell's theorem implied hypothesis is that
               | measurements/observations are probabilities, so by
               | defining measurement instead as a conditional
               | probability, you get to avoid being subjected to Bell's
               | inequalities.
               | 
               | It's inductive reasoning, you don't get truth you only
               | get self consistency, and a model that looks much nicer
               | than QM.
        
               | eigenket wrote:
               | > 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
               | is not satisfied, we reject (at least) one of our
               | assumptions. These is no crackpottery here, this is the
               | norm.
               | 
               | > by defining measurement instead as a conditional
               | probability
               | 
               | This sounds like it probably doesn't get you anywhere,
               | but I'll bite - what are we conditioning on? In the
               | standard formulation of Bell's theorem they are
               | conditional on the "hidden variable" we are assuming
               | exists, as well as any relevant measurement settings but
               | it sounds like you're imagining something wilder than
               | that.
        
               | GistNoesis wrote:
               | >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/2a48ea092
               | 6deac4011d268426... [End Spoiler]
        
               | eigenket wrote:
               | 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.
        
               | DebtDeflation wrote:
               | I commented awhile back on another thread that:
               | 
               | I think, ultimately, there are only 3 possible
               | explanations for the paradoxes of the quantum world. 1)
               | superdeterminism (everything including our choices in
               | quantum experiments today were fully determined at the
               | instant of the Big Bang), 2) something "outside" our
               | observable reality acting as a global hidden variable
               | (whether something like the bulk in brane cosmology or
               | whatever is running the simulation in simulation theory)
               | or 3) emergent spacetime (if space and time are emergent
               | phenomena then locality and causation are not
               | fundamental).
               | 
               | You seem to be suggesting something similar to option 2.
               | Or am I misunderstanding?
        
           | meroes wrote:
           | MWI is not local according to all the big names I read; Lev
           | Vaidman, Tim Maudlin, and Im pretty sure David Wallace too.
        
             | eigenket wrote:
             | You can probably define locality in a way that MWI is
             | nonlocal, but you can also definitely define it in a way
             | such that MWI is local.
             | 
             | For me the most important thing about nonlocality is the
             | lack of any "action at a distance", MWI satisfies this, but
             | if you make more stringent demands it might not satisfy
             | those.
        
         | hnax wrote:
         | This 'crackpot physicist' is still alive and kicking and,
         | indeed, as per the (analytical) induction requirement to make
         | the case, his work deserves a careful reading to assume the
         | geometric algebraic understanding of QM (for the 'crackpot's
         | latest, see: https://www.linkedin.com/posts/joy-christian-
         | oxford_comment-...)
        
       | Strilanc wrote:
       | 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...
        
       | tsimionescu wrote:
       | > 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".
        
       | jmmcd wrote:
       | 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.)
        
       | westurner wrote:
       | Hidden variable theory: https://en.wikipedia.org/wiki/Hidden-
       | variable_theory
       | 
       | Bell test: https://en.wikipedia.org/wiki/Bell_test :
       | 
       | > _To do away with this assumption it is necessary to detect a
       | sufficiently large fraction of the photons. This is usually
       | characterized in terms of the detection efficiency e [\eta],
       | defined as the probability that a photodetector detects a photon
       | that arrives at it. Anupam Garg and N. David Mermin showed that
       | when using a maximally entangled state and the CHSH inequality an
       | efficiency of e > 2*sqrt(2)/2~= 0.83 is required for a loophole-
       | free violation.[51] Later Philippe H. Eberhard showed that when
       | using a partially entangled state a loophole-free violation is
       | possible for e>2/3~=0.67 which is the optimal bound for the CHSH
       | inequality.[53] Other Bell inequalities allow for even lower
       | bounds. For example, there exists a four-setting inequality which
       | is violated for e>(sqrt(5)-1)/2~=0.62 [54]_
       | 
       | CHSH inequality: https://en.wikipedia.org/wiki/CHSH_inequality
       | 
       | /sbin/chsh
       | 
       | Isn't it possible to measure the wake of a photon instead of
       | measuring the photon itself; to measure the wake without
       | affecting the boat that has already passed? And shouldn't a
       | simple beam splitter be enough to demonstrate entanglement if
       | there is an instrument with sufficient sensitivity to infer the
       | phase of a passed photon?
       | 
       | This says that _intensity_ is sufficient to read phase:
       | https://news.ycombinator.com/item?id=40492160 :
       | 
       | > _" Bridging coherence optics and classical mechanics: A generic
       | light polarization-entanglement complementary relation" (2023)
       | https://journals.aps.org/prresearch/abstract/10.1103/PhysRev...
       | :_
       | 
       | >> _This means that hard-to-measure optical properties such as
       | amplitudes, phases and correlations--perhaps even these of
       | quantum wave systems--can be deduced from something a lot easier
       | to measure: light intensity_
       | 
       | And all it takes to win the game is to transmit _classical_ bits
       | with digital error correction using hidden variables?
        
       ___________________________________________________________________
       (page generated 2024-09-11 23:01 UTC)