Quantum-inspired data interference simulator
DataDoubleSlit is a lightweight Python library that implements an analogy of the double-slit experiment for arbitrary data. It helps visualize and measure how two parallel interpretations of the same input can interfere before a decision is made.
- Simple interface - a single
DataDoubleSlitclass with arun()method. - Flexible input - accepts strings, Python lists, or NumPy arrays.
- Deterministic text mapping - string inputs are converted to waveforms through SHA-256-derived parameters, so the same text always produces the same pattern across interpreter sessions.
- Normalized score - returns an
interference_scorein the[0, 1]range. - Optional observation - can sample collapse positions and optionally save a plot.
- Lightweight - depends only on
numpyby default.
git clone https://github.com/Lutren/data-double-slit
cd data-double-slit
pip install .Optional plotting support:
pip install .[plot]from datadoubleslit import DataDoubleSlit
tool = DataDoubleSlit(screen_size=400)
result = tool.run(
data="I want to build an autonomous functional matrix",
slit_separation=2.0,
observe=True,
plot=True,
)
print(f"Interference score: {result.interference_score:.3f}")
print(result.collapse_positions[:5] if result.collapse_positions else None)
print(result.visualization_path)| File | Description |
|---|---|
datadoubleslit.py |
Core simulator implementation |
tests/ |
Regression tests |
README.md |
English guide |
README_ES.md |
Spanish guide |
MIT.