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.
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.
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.
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.
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.
A follow-up point: it sounds like you're also wondering whether it's possible to simulate quantum mechnics exactly with a deterministic non-local hidden variable model?
From what I understand, historically nothing ever came of these different interpretations of QM. I subscribe to the Feynman motto of "shut up and calculate", with the modern modification of ".. or simulate".
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