gitwtfhub

wtf is bell-experiment-two-computers?

gmardari-owr/bell-experiment-two-computers — explained in plain English

Analysis updated 2026-05-18

0PythonAudience · researcherComplexity · 2/5LicenseSetup · easy

TL;DR

A Python simulation of a quantum-style Bell test physics experiment, run as two separate scripts standing in for two measurement stations, with no real quantum hardware.

Mindmap

mindmap
  root((bell experiment))
    What it does
      Simulates Bell test
      Two station scripts
      CHSH calculation
    Tech stack
      Python
      Standard library only
    Use cases
      Physics education
      Data analysis practice
    Audience
      Researchers
      Curious learners

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Run a simulated Bell test experiment locally to see a CHSH inequality calculation.

REASON 2

Study how missing data points are handled in a physics style measurement pipeline.

REASON 3

Use the included spreadsheet-friendly sample data to inspect results without running code.

REASON 4

Adapt the alice.py and bob.py scripts to experiment with different trial counts.

What's in the stack?

Python

How it stacks up

gmardari-owr/bell-experiment-two-computers0xallam/my-recipe0xhassaan/nn-from-scratch
Stars00
LanguagePythonPythonPython
Last pushed2022-11-22
MaintenanceDormant
Setup difficultyeasymoderatemoderate
Complexity2/52/54/5
Audienceresearchergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min
MIT license allows free use and sharing of the code for any purpose, with credit given to the original authors.

Wtf does this do

bell-experiment-two-computers is a small Python project that simulates a physics experiment related to quantum entanglement, called a Bell test, using two separate computer programs instead of real quantum hardware. The project lets two independent scripts, named alice.py and bob.py, stand in for two separated measurement stations. They can run on different computers or on the same computer at different times, and their results are combined by a third script called combine.py, described as a moderator, which checks the data and fills in any missing results with random values, then calculates a statistical measure called the CHSH inequality. The authors explain that a proper test like this needs strict rules: the two stations must not communicate, the measurement choices must be random, every attempt must be counted even if a result is missing, and no data can be thrown away. The project claims to satisfy these rules and reports a strong violation of the CHSH inequality, meaning the results look more connected than ordinary classical physics would predict, even though the simulation uses no real quantum bits at all, only deterministic code. To use it, you need Python 3.14 or newer with no extra libraries. For a single computer test you run the three scripts one after another in the same folder. For the more faithful two computer version, you run alice.py and bob.py separately, ideally on different machines, then copy both output files into one folder before running combine.py. A sample dataset is included in a Data folder if you just want to look at numbers in a spreadsheet. The README also includes a lengthy theoretical explanation arguing that this kind of result does not require new physics, framing it instead as a known effect of how missing data gets replaced with random values. The code is released under the MIT license, and the authors ask that both original creators be credited if you reuse or build on it.

Yoink these prompts

Prompt 1
Explain what the CHSH inequality test in this repo is measuring in plain English.
Prompt 2
Run alice.py, bob.py, and combine.py from this repo and explain the printed results.
Prompt 3
Modify this repo's scripts to run one million trials instead of ten thousand.
Prompt 4
Summarize the theory section of this repo's README for someone with no physics background.

Frequently asked questions

wtf is bell-experiment-two-computers?

A Python simulation of a quantum-style Bell test physics experiment, run as two separate scripts standing in for two measurement stations, with no real quantum hardware.

What language is bell-experiment-two-computers written in?

Mainly Python. The stack also includes Python.

What license does bell-experiment-two-computers use?

MIT license allows free use and sharing of the code for any purpose, with credit given to the original authors.

How hard is bell-experiment-two-computers to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is bell-experiment-two-computers for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.