Preprint
Article

This version is not peer-reviewed.

A Functional Computational Framework for ExploringInformational Entanglement via CHSH Inequality Simulations

Submitted:

01 July 2025

Posted:

02 July 2025

You are already at the latest version

Abstract
We present a novel computational framework to investigate the informational structureof entanglement through the CHSH inequality. By treating CHSH experiments as composedof deterministic or probabilistic functions, we simulate a range of models that either sat-isfy or violate the classical CHSH bound. Our approach focuses on retro-analyzing thesefunction pairs to characterize the minimal informational coupling necessary to reproducequantum-like correlations. This functional perspective opens a new line of inquiry into thecomputational anatomy of entanglement, offering both pedagogical and theoretical value.
Keywords: 
;  ;  ;  ;  

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 A 0 and A 1 , while Bob chooses between B 0 and B 1 . Each measurement yields outcomes a , b { 1 , + 1 } .
The CHSH expression is defined as:
S = | E ( A 0 B 0 ) + E ( A 0 B 1 ) + E ( A 1 B 0 ) E ( A 1 B 1 ) |
where E ( A i B j ) represents the expectation value of the product of outcomes when Alice uses setting A i and Bob uses setting B j .
Local hidden variable theories, based on the assumptions of locality and realism, constrain this expression to:
S 2
However, quantum mechanics allows violations up to the Tsirelson bound:
S 2 2 2.828

2.2. Functional Reinterpretation

We reinterpret the measurement outcomes as functions of the measurement settings and potentially shared information:
a = f A ( setting A , λ )
b = f B ( setting B , λ )
where λ represents a shared hidden variable or information channel, and f A , f B 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 ( f A , f B ) , we:
  • Generate N instances of the hidden variable λ
  • For each measurement setting combination ( A i , B j ) , compute outcomes
  • Calculate expectation values E ( A i B j )
  • 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 S 0 , reflecting the absence of correlations
  • Shared randomness with local determinism: Produce S 2 , consistent with classical bounds

4.2. Quantum-Like Violations

We observe violations of the classical bound ( S > 2 ) 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 S > 2 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

  1. J.S. Bell, “On the Einstein-Podolsky-Rosen Paradox,” Physics 1, 195-200 (1964).
  2. 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).
  3. G. Brassard, A. Broadbent, and A. Tapp, “Quantum pseudo-telepathy,” Found. Phys. 35, 1877-1907 (2005).
  4. 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.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated