Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Fuxi Hypercube Benchmark (FHB-n) — Mathematics & Paper

FHB-n is a constant-depth, connectivity-free, analytically exact benchmark for single-qubit fidelity on NISQ quantum processors, derived from the structural isomorphism between the Fuxi "Earlier Heaven" hexagram system (伏羲先天六十四卦) and the n-dimensional hypercube graph Q_n.

This repository contains the English manuscript, the complete mathematical model, and independent verification code for every quantitative claim in the paper.

The idea in one paragraph

The 64 hexagrams under single-line changes form exactly the hypercube graph Q₆. The continuous-time quantum walk on Q_n has Hamiltonian H = Σₖ Xₖ, whose commuting terms factorize the evolution into n parallel single-qubit R_X rotations. Consequences: the walk hits the exact uniform distribution at t = π/4, returns exactly to its initial state at t = π, and the whole benchmark circuit has depth 3 regardless of qubit count with zero two-qubit gates. Under standard noise channels the return fidelity has closed forms — F_dep = (1−p/2)^2n, F_AD = (1−γ)^2n, F_RO = (1−ε)^n — whose small-error expansion F ≈ 1 − n(p + 2γ + ε) turns the benchmark into a calibrated linear probe of per-qubit error rates.

Repository layout

paper/
  fhb.pdf         — the paper, typeset (A4, 8 pages)
  fhb.md          — the paper (readable on GitHub)
  fhb.tex         — LaTeX source of the same manuscript
code/
  fhb/            — pure-stdlib Python package: analytic model (walk, noise, Grover)
    core.py       —   all closed forms with proofs referenced to the paper
    fhb2.py       —   FHB-2 entangling extension: exact free-fermion reference (see docs/FHB2-NOTES.md)
    qiskit_impl.py—   optional Qiskit circuits (only file needing dependencies)
  verify_claims.py— reproduces every number in the paper's tables; exits non-zero on mismatch
  tests/          — unit tests (stdlib unittest)
verify/
  verify.mjs      — independent Node.js verification (zero dependencies, second implementation)
docs/
  ROADMAP.md      — research-direction assessment: what to build next, and rejected directions with reasons
  FHB2-NOTES.md   — FHB-2 derivation: Jordan-Wigner mapping, covariance evolution, validation protocol

FHB-2: entangling extension (new)

FHB-1 is blind to two-qubit-gate quality. FHB-2 adds a nearest-neighbor RZZ/RX brickwork on a line — a matchgate (free-fermion) circuit whose ⟨Xⱼ⟩ / ⟨XⱼXₖ⟩ references are exactly computable in O(n²·d) via Majorana covariance evolution, at any depth and any n (n = 40 evaluates instantly). The (FHB-1, FHB-2) pair separates the single-qubit + readout error budget from the entangling-gate budget, both against exact references. Derivation and design constraints: docs/FHB2-NOTES.md; validation: 9 cross-checks against dense statevector simulation in code/tests/test_fhb2.py.

Reproduce the verification

Two independent implementations (Python and JavaScript) check the same claims:

# Python (no dependencies)
cd code
python verify_claims.py
python -m unittest discover tests

# Node.js (no dependencies)
node verify/verify.mjs

Both scripts verify:

Claim Result
Exact uniform mixing at t = π/4 (Theorem 3) max deviation 1.4 × 10⁻¹⁷
Exact return at t = π (Theorem 4) P = 1.000000000
TVD to uniform = 63/64 at t ∈ {0, π/2, π} exact
Closed-form noise fidelities vs. paper's Qiskit tables agree within sampling error (13/15 settings; 2 documented outliers at extreme depolarizing rates)
Grover n=6 ideal success = 99.66% exact
Q₆ graph facts (64 vertices, 192 edges, 6-regular, diameter 6) exact

Running on hardware / simulators

The analytic model needs no simulator. To actually run the benchmark:

# pip install qiskit qiskit-aer
import math, sys
sys.path.insert(0, "code")
from fhb.qiskit_impl import fhb_core_circuit

qc = fhb_core_circuit(n=6, t=math.pi)   # return-fidelity experiment, depth 3

Score hardware output directly against the closed forms in code/fhb/core.py — no classical simulation required at any n.

First hardware results (July 2026)

FHB ran on three IBM Heron R2 processors (156 qubits each), 8192 shots per circuit, one batched job per backend; raw counts in code/results/, table regenerated by code/compare_results.py:

Backend F_ret (t=π) (1−F)/n Mixing TVD FHB-2 mean dev FHB-2 p fit
ibm_marrakesh 0.9495 0.84% 0.0392 0.0462 1.05%
ibm_fez 0.9177 1.37% 0.0337 0.0766 1.30%
ibm_kingston 0.8888 1.85% 0.0547 0.0229 0.47%

What the data shows:

  • The two error budgets decouple across devices. ibm_kingston has the worst single-qubit/readout budget (1.85%) but the best entangling-gate fit (0.47%); ibm_marrakesh is the reverse. A single holistic score would hide this — the (FHB-1, FHB-2) pair is designed precisely to separate it.
  • The mixing point is noise-robust on all three devices (TVD 0.034–0.055, at or near the 8192-shot sampling floor ≈ 0.035), confirming its role as an execution sanity check rather than an error probe.
  • Full π-periodicity is visible on hardware at all five time points on every backend.
  • FHB-2 localizes faults: on ibm_fez, qubit 0 shows a −0.32 deviation in ⟨X₀⟩ while its other five qubits sit within ±0.09 — a single bad qubit/bond immediately visible in the per-qubit profile, invisible in any aggregate metric.
  • Edge qubits (1 bond) deviate less than bulk qubits (2 bonds) on marrakesh and kingston, matching the bond-count prediction of the string-damping theorem.

Scope and honesty notes

  • The hexagram–hypercube isomorphism is a formal mathematical fact. No claim is made that the historical originators of the hexagram system anticipated quantum mechanics (paper §10.1).
  • FHB-n is a diagnostic, not an application benchmark: it certifies single-qubit health and readout, and is blind to two-qubit-gate quality (the Grover variant partially compensates).
  • The Qiskit-simulated noise tables come from the v6 study; the analytic closed forms here reproduce them within 10⁵-shot sampling error, except depolarizing at 5%/10% (deviations +0.0026 / +0.0085, discussed in paper §6.3).
  • Real-hardware validation is future work; the protocol is specified in paper §9.

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages