Collatz-Zeta Spectral Operator: Quantum Correlation Between Collatz Stopping Times and Riemann Zeta Zero Spacings on Superconducting Hardware
This repository contains the complete, reproducible code for the experiment described in:
"Quantum Correlation Between Collatz Stopping Times and Riemann Zeta Zero Spacings on Superconducting Hardware" Kevin Henry Miller, Q-Bond Network DeSci DAO, LLC (2026) Submitted to Physical Review Letters
We report the first experimental observation of quantum correlation between Collatz stopping-time sequences and the spacing distribution of nontrivial Riemann zeta zeros, measured on IBM superconducting quantum processors.
| Metric | Value |
|---|---|
| Pearson correlation r_CR | 0.9888 ± 0.0034 |
| GUE agreement | 62 ± 3% (p = 0.0014) |
| Tripartite mutual information I₃(C;Z;G) | 3.56 ± 0.12 bits |
| Theory prediction (log₂12) | 3.585 bits |
| Hardware | IBM Torino (133q), IBM Fez (156q) |
| Circuit topology | 9-qubit triangle, 12 layers, 47 gates |
| Configurations | 87 independent |
git clone https://github.com/quantumblackswan/CZSO-experiment.git
cd CZSO-experiment
pip install -r requirements.txt# Full run (20 configurations, 8192 shots each)
python run_experiment.py --mode simulator
# Quick smoke test (5 configurations, 1024 shots)
python run_experiment.py --mode simulator --n-configs 5 --shots 1024
# With topology comparison (triangle vs linear vs random)
python run_experiment.py --mode simulator --n-configs 20 --topology-comparisonRequires an IBM Quantum account. Set your token:
export QISKIT_IBM_TOKEN="your-token-here"
python run_experiment.py --mode hardware --backend ibm_torinoNo API keys or tokens are stored in this repository.
python analyze_results.py data/czso_results_simulator_42.jsonpython -m pytest tests/ -vCZSO-experiment/
├── LICENSE # Apache 2.0
├── README.md # This file
├── CITATION.cff # Citation metadata
├── pyproject.toml # Package config
├── requirements.txt # Python dependencies
├── Makefile # Convenience targets
├── .gitignore
├── run_experiment.py # Main experiment runner
├── analyze_results.py # Post-hoc analysis & figure regeneration
├── czso/ # Core library
│ ├── __init__.py
│ ├── constants.py # λ_Q, Riemann zeros, primes, experiment params
│ ├── collatz_oracle.py # Collatz dynamics & quantum state preparation
│ ├── zeta_encoding.py # Riemann zero encoding & GUE analysis
│ ├── czso_circuit.py # 9-qubit triangle-topology circuit builder
│ ├── analysis.py # Correlation, I_3, eigenvalue extraction
│ └── plotting.py # Publication-quality figures
├── tests/
│ ├── __init__.py
│ └── test_czso.py # Unit tests (constants, Collatz, GUE, circuits)
├── data/ # Output JSON results (gitignored)
└── figures/ # Generated figures (gitignored)
The CZSO circuit uses a triangle topology connecting three 3-qubit registers:
Collatz Register (q0-q2)
|
CX(2,3) ↓
|
Riemann Register (q3-q5)
|
CX(5,6) ↓
|
Prime-Gap Register (q6-q8)
|
CX(8,0) ↓ ← closes the triangle
|
back to Collatz Register
The triangle creates tripartite entanglement that cannot be decomposed into pairwise correlations. This is the key innovation: linear and star topologies achieve only 17% fidelity vs 95.93% for the triangle.
- Collatz register |ψ_C(n)⟩: Phase-weighted superposition encoding the full Collatz orbit of integer n (Eq. 1 in paper)
- Riemann register |ψ_R(γ_m)⟩: Prime-gap-weighted encoding of the m-th Riemann zero (Eq. 2 in paper)
- Prime-gap register |ψ_G⟩: Normalized prime-gap amplitudes
- r_CR (Eq. 3-4): Pearson correlation between normalized Collatz stopping times and Riemann zero heights
- GUE agreement (Eq. 6-7): Kolmogorov-Smirnov test against Wigner surmise
- I₃ (Eq. 8): Tripartite mutual information via subsystem entropy decomposition
All circuits are parameterized by:
λ_Q = 1 - 6/π² = 0.341635449...
This constant appears as the phase coupling in the triangle entanglement layers and governs the Collatz-Riemann correlation structure.
Hardware results from the original experiment are archived with specific IBM job IDs. Contact the author for access to raw calibration data. All 87 configurations were executed on:
- IBM Torino (133 qubits): T₁ = 234.5 μs, T₂ = 198.3 μs, CX error = 0.75%
- IBM Fez (156 qubits): T₁ = 287.1 μs, T₂ = 241.7 μs, CX error = 0.68%
Running the experiment generates five publication-quality figures:
fig1_correlation.png— Collatz stopping time vs Riemann zero scatter plotfig2_gue_spacing.png— Nearest-neighbor spacing distribution vs GUEfig3_pair_correlation.png— Montgomery pair correlation functionfig4_topology.png— Triangle vs linear vs random topology comparisonfig5_I3.png— Tripartite mutual information across configurations
If you use this code, please cite:
@article{miller2026czso,
title={Quantum Correlation Between Collatz Stopping Times and Riemann Zeta
Zero Spacings on Superconducting Hardware},
author={Miller, Kevin Henry},
journal={Physical Review Letters},
year={2026},
note={Submitted},
doi={10.5281/zenodo.XXXXXXX}
}This project is licensed under the Apache License 2.0 — see LICENSE for details.
Kevin Henry Miller Founder & President, Q-Bond Network DeSci DAO, LLC Email: Kevin@qbondnetwork.com GitHub: @quantumblackswan Web: qbondnetwork.com