Skip to content

quantumblackswan/CZSO-experiment

Repository files navigation

CZSO-experiment

Collatz-Zeta Spectral Operator: Quantum Correlation Between Collatz Stopping Times and Riemann Zeta Zero Spacings on Superconducting Hardware

License Python 3.10+ DOI

Overview

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.

Key Results

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

Quick Start

1. Install

git clone https://github.com/quantumblackswan/CZSO-experiment.git
cd CZSO-experiment
pip install -r requirements.txt

2. Run (simulator — no IBM account needed)

# 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-comparison

3. Run on IBM Hardware

Requires an IBM Quantum account. Set your token:

export QISKIT_IBM_TOKEN="your-token-here"
python run_experiment.py --mode hardware --backend ibm_torino

No API keys or tokens are stored in this repository.

4. Analyze Saved Results

python analyze_results.py data/czso_results_simulator_42.json

5. Run Tests

python -m pytest tests/ -v

Repository Structure

CZSO-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)

Experimental Design

Circuit Architecture

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.

State Encoding

  1. Collatz register |ψ_C(n)⟩: Phase-weighted superposition encoding the full Collatz orbit of integer n (Eq. 1 in paper)
  2. Riemann register |ψ_R(γ_m)⟩: Prime-gap-weighted encoding of the m-th Riemann zero (Eq. 2 in paper)
  3. Prime-gap register |ψ_G⟩: Normalized prime-gap amplitudes

Metrics

  • 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

Universal Constant

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.

IBM Job IDs

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%

Figures

Running the experiment generates five publication-quality figures:

  1. fig1_correlation.png — Collatz stopping time vs Riemann zero scatter plot
  2. fig2_gue_spacing.png — Nearest-neighbor spacing distribution vs GUE
  3. fig3_pair_correlation.png — Montgomery pair correlation function
  4. fig4_topology.png — Triangle vs linear vs random topology comparison
  5. fig5_I3.png — Tripartite mutual information across configurations

Citation

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}
}

License

This project is licensed under the Apache License 2.0 — see LICENSE for details.

Author

Kevin Henry Miller Founder & President, Q-Bond Network DeSci DAO, LLC Email: Kevin@qbondnetwork.com GitHub: @quantumblackswan Web: qbondnetwork.com

About

Collatz-Zeta Spectral Operator: quantum correlation between Collatz stopping times and Riemann zeta zero spacings on IBM superconducting hardware

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors