1. Introduction
The CHSH inequality [
2] is a cornerstone of quantum mechanics, revealing a critical divide between classical local realism and quantum predictions. Traditional treatments examine this divide through probabilistic and analytical methods [
1]. However, from a computational perspective, little attention has been given to how different functional constructions of observers (e.g., Alice and Bob) influence the correlation outcomes.
The violation of Bell inequalities has profound implications for our understanding of quantum mechanics and information theory [
3]. While extensive theoretical and experimental work has established the quantum mechanical predictions, the computational underpinnings of these correlations remain less explored from a functional programming perspective.
In this work, we construct an experimental simulator using simple functions to model the behavior of Alice and Bob, each receiving inputs (measurement settings) and potentially sharing hidden variables. By simulating these functions and measuring the resulting CHSH value, we explore how different informational structures lead to classical or quantum-like behavior. This approach provides new insights into the minimal computational requirements for reproducing non-local correlations.
2. Theoretical Background
2.1. The CHSH Inequality
Consider two spatially separated observers, Alice and Bob, who perform measurements on a shared quantum system. Alice chooses between two measurement settings and , while Bob chooses between and . Each measurement yields outcomes .
The CHSH expression is defined as:
where
represents the expectation value of the product of outcomes when Alice uses setting
and Bob uses setting
.
Local hidden variable theories, based on the assumptions of locality and realism, constrain this expression to:
However, quantum mechanics allows violations up to the Tsirelson bound:
2.2. Functional Reinterpretation
We reinterpret the measurement outcomes as functions of the measurement settings and potentially shared information:
where
represents a shared hidden variable or information channel, and
,
are the functional implementations of Alice’s and Bob’s measurement strategies.
This functional perspective allows us to systematically explore the space of possible correlations by varying the structure and information content of these functions.
3. Methodology
3.1. Simulation Framework
We developed a Python-based simulator that models CHSH experiments through the following components:
Hidden variable generator: Produces random values according to specified distributions
Alice’s and Bob’s functions: Deterministic or probabilistic functions that map measurement settings and hidden variables to outcomes
Correlation evaluator: Calculates expectation values and the CHSH expression over multiple trials
3.2. Function Classes
We systematically analyze different classes of functions based on their informational dependencies:
Independent functions: No shared information ( unused)
Shared randomness: Common access to but no other coupling
Non-local influence: Functions that depend on both local and remote measurement settings
Hybrid models: Combinations of the above with varying degrees of information sharing
3.3. Experimental Protocol
For each function pair , we:
Generate N instances of the hidden variable
For each measurement setting combination , compute outcomes
Calculate expectation values
Evaluate the CHSH expression S
The number of trials N is chosen to ensure statistical significance while maintaining computational efficiency.
4. Results
4.1. Classical Correlations
Our simulations confirm that functions satisfying local realism constraints produce CHSH values bounded by 2:
Independent functions: Yield , reflecting the absence of correlations
Shared randomness with local determinism: Produce , consistent with classical bounds
4.2. Quantum-Like Violations
We observe violations of the classical bound () in scenarios involving:
Information leakage: When Bob’s function has access to Alice’s measurement setting
Non-local coupling: Functions that explicitly depend on both measurement settings
Adaptive strategies: Functions that modify their behavior based on shared state
Remarkably, even minimal informational coupling can produce significant violations, demonstrating that the computational requirements for simulating quantum-like correlations are surprisingly modest.
4.3. Retro-Analysis of Function Structure
By analyzing the functional forms that produce different CHSH values, we identify the minimal informational couplings necessary for classical bound violations. This reverse-engineering approach reveals the computational anatomy of non-local correlations.
5. Discussion
5.1. Computational Insights
Our functional approach provides several novel insights:
The boundary between classical and quantum-like behavior can be precisely characterized in terms of information flow between functions
Minimal violations of locality can be achieved with surprisingly simple computational structures
The functional perspective naturally connects to communication complexity theory [
4]
5.2. Pedagogical Applications
This framework offers significant educational value by:
Providing an intuitive computational model for understanding Bell inequalities
Allowing students to experiment with different correlation structures
Bridging the gap between abstract quantum mechanics and concrete programming concepts
5.3. Theoretical Implications
The functional perspective opens new research directions in:
Understanding the computational resources required for quantum advantage
Exploring the relationship between information theory and quantum mechanics
Developing new protocols for quantum communication and cryptography
6. Future Work
Several promising research directions emerge from this work:
6.1. Formal Classification
We plan to develop a formal taxonomy of function types based on their CHSH behavior, potentially leading to new theorems about the computational structure of quantum correlations.
6.2. Minimal Information Protocols
Investigating the minimal information transmission requirements for achieving could provide insights into the fundamental limits of classical simulation of quantum systems.
6.3. Extended Bell Scenarios
The framework can be extended to more complex Bell scenarios involving multiple parties, higher-dimensional systems, and temporal correlations.
6.4. Connection to Pseudotelepathy
Exploring the relationship between our functional models and pseudotelepathy games [
3] may reveal new quantum advantages in distributed computing.
7. Conclusions
This work introduces a novel computational perspective on quantum correlations through the lens of functional programming. By simulating and reverse-engineering CHSH-type systems, we provide new insights into the informational structure of entanglement.
Our results demonstrate that the divide between classical and quantum behavior can be understood in terms of the computational architecture of measurement functions. This perspective complements traditional probabilistic treatments and opens new avenues for both theoretical investigation and practical application.
The functional framework presented here offers a powerful tool for exploring the computational foundations of quantum mechanics, with implications for quantum information processing, education, and our fundamental understanding of non-local correlations.
Acknowledgments
The author thanks the quantum information community for inspiring discussions on the computational aspects of quantum mechanics.
Appendix H Sample Implementation
import random
def hidden_variable():
return random.random()
def alice(setting, hidden):
if setting == 0:
return 1 if hidden > 0.5 else -1
else:
return 1 if hidden > 0.3 else -1
def bob(setting, hidden):
if setting == 0:
return 1 if hidden < 0.7 else -1
else:
return 1 if hidden < 0.2 else -1
def run_chsh(n_trials=10000):
settings = [(0,0), (0,1), (1,0), (1,1)]
results = {s: [] for s in settings}
for _ in range(n_trials):
hidden = hidden_variable()
for a_set, b_set in settings:
a = alice(a_set, hidden)
b = bob(b_set, hidden)
results[(a_set, b_set)].append(a * b)
E = {k: sum(v)/len(v) for k,v in results.items()}
S = abs(E[(0,0)] + E[(0,1)] + E[(1,0)] - E[(1,1)])
return S, E
print(run_chsh())
References
- J.S. Bell, “On the Einstein-Podolsky-Rosen Paradox,” Physics 1, 195-200 (1964).
- J.F. Clauser, M.A. Horne, A. Shimony, and R.A. Holt, “Proposed experiment to test local hidden-variable theories,” Phys. Rev. Lett. 23, 880-884 (1969).
- G. Brassard, A. Broadbent, and A. Tapp, “Quantum pseudo-telepathy,” Found. Phys. 35, 1877-1907 (2005).
- B.F. Toner and D. Bacon, “Communication cost of simulating Bell correlations,” Phys. Rev. Lett. 91, 187904 (2003).
|
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).