# -*- coding: utf-8 -*-
# FINAL-Bench Quantum โ benchmark suite (5 events) + manual Submit. VIDRAFT entries flagged; submissions -> private dataset.
import os, json, time, gradio as gr
# --- Fix gradio 4.44 + new pydantic api-schema bug: "argument of type 'bool' is not iterable" ---
import gradio_client.utils as _gcu
_o_json = _gcu._json_schema_to_python_type
def _safe_json(schema, defs=None):
if isinstance(schema, bool):
return "Any"
return _o_json(schema, defs)
_gcu._json_schema_to_python_type = _safe_json
_o_type = _gcu.get_type
def _safe_type(schema):
if not isinstance(schema, dict):
return "Any"
return _o_type(schema)
_gcu.get_type = _safe_type
# -------------------------------------------------------------------------------------------------
from huggingface_hub import HfApi
TOKEN = os.environ.get("HF_TOKEN")
SUB_DS = "FINAL-Bench/quantum-bench-submissions"
api = HfApi(token=TOKEN)
STYLE = """"""
def table(headers, rows, center=(), ours_idx=()):
th = "".join(('
%s | ' if i in center else '%s | ') % h for i, h in enumerate(headers))
body = ""
for ri, r in enumerate(rows):
tr = ' class="ours"' if ri in ours_idx else ''
body += "" % tr + "".join(('| %s | ' if i in center else '%s | ') % c
for i, c in enumerate(r)) + "
"
return '' % (th, body)
def page(inner):
return STYLE + '' + inner + '
'
VER = '✓ VERIFIED'
# ---------------- Event 1: QEC Decoder ----------------
QEC_A = table(
["Rank", "Flag", "Decoder", "By", "LER @ p=0.005", "LER @ p=0.01", "Decode speed", "Status"],
[["1", "๐บ๐ธ", "Tesseract (A* MLE)", "Google Quantum AI", "0.00915 ±0.0013", "0.06245 ±0.0034", "~79 ms/shot", VER],
["2", "๐ฐ๐ท", "VIDRAFT QEC-AI Decoder", "VIDRAFT", "0.00983 ±0.0010", "0.06468 ±0.0024", "~4 ms* (incl. bases)", VER],
["3", "๐ฌ๐ง", "BeliefMatching (BP+MWPM)", "O. Higgott", "0.01010 ±0.0010", "0.06615 ±0.0024", "~1.3 ms/shot", VER],
["4", "๐ฌ๐ง", "BP+OSD (stimbposd)", "Roffe (ldpc) / Higgott", "0.01020 ±0.0010", "0.06453 ±0.0024", "~4 ms/shot", VER],
["5", "๐ฌ๐ง", "PyMatching (MWPM)", "O. Higgott", "0.01388 ±0.0012", "0.08393 ±0.0027", "~1.7 ยตs/shot", VER],
["6", "๐ฌ๐ง", "BP-only (no OSD)", "Roffe (ldpc)", "0.07385 ±0.0036", "0.22695 ±0.0058", "~ms/shot", VER]],
center=(0, 1, 4, 5, 6, 7), ours_idx=())
QEC_B = table(
["Flag", "Group / Method", "Reported claim", "Source"],
[["๐บ๐ธ", "Google Willow", "d7 surface, 0.143%/cycle, Λ=2.14", 'Nature 2024'],
["๐บ๐ธ", "Google AlphaQubit", "neural decoder, −30% vs matching", 'Nature 2024'],
["๐จ๐ณ", "USTC Zuchongzhi 3.2", "d7 surface Λ=1.40, below threshold", 'PRL 2025'],
["๐บ๐ธ", "Quantinuum (trapped ion)", "94 logical qubits, ~1e-4 logical gate", 'PRL 2024'],
["๐บ๐ธ", "IBM (BB qLDPC + Relay-BP)", "12 logical/144; Relay-BP −10x vs BP+OSD", 'arXiv 2506.01779'],
["๐ฌ๐ง", "Riverlane (LCD)", "real-time FPGA decoder, <1ยตs/round", 'Nat Commun 2025'],
["๐ณ๐ฑ", "QuTech / Delft", "neural-network decoder > MWPM", 'PRR 2025'],
["๐ฏ๐ต", "Fujitsu", "Ising-machine (Digital Annealer) decoder", 'PRR'],
["๐จ๐ฆ", "Xanadu (photonic GKP)", "12 logical GKP qubits, real-time QEC", '2025'],
["๐ซ๐ท", "Alice & Bob (cat qubits)", "bias-tailored bit-flip suppression", 'ref'],
["๐บ๐ธ", "AWS Ocelot (cat qubits)", "d5 logical error ~1.65% (2025)", '2025'],
["๐บ๐ธ", "QuEra / Atom Computing (neutral atom)", "logical qubits at scale; 100-logical target", '2025–26'],
["๐ฌ๐ง", "Riverlane — Ambiguity Clustering", "qLDPC decoder, −27× time vs BP+OSD (matched acc.)", 'arXiv 2406.14527'],
["๐บ๐ธ", "Fusion Blossom (Y. Wu)", "parallel MWPM, 1M rounds/s; 0.7 ms latency @d21", 'arXiv 2305.08307'],
["๐", "Union-Find (Delfosse-Nickerson)", "near-linear-time decoder; hardware-friendly", 'Quantum 2021'],
["๐ฎ๐ณ", "QpiAI", "real-time decoder, ~1.5 ยตs/cycle", '2026'],
["๐ฉ๐ช", "Munich MQT QECC", "color-code decoder toolkit", 'repo'],
["๐บ๐ธ", "Infleqtion", "open-source QEC research library", '2025'],
["๐บ๐ธ", "NVIDIA Ising AI predecoder + MWPM", "learned predecoder; cuts MWPM ~14–19% (measured here, d9) — stays in/below the BP-class (BeliefMatching/BP+OSD)", 'NVIDIA']],
center=(0,))
QEC_HW = table(
["Backend (IBM Heron r2)", "d=3 MV LER (2-err)", "d=5 MV LER (2-err)", "d3→d5 reduction", "Status"],
[["ibm_kingston", "0.972 (fails)", "0.0145 (corrects)", "67×", VER],
["ibm_fez", "0.973 (fails)", "0.0330 (corrects)", "29×", VER],
["ibm_marrakesh", "0.966 (fails)", "0.0055 (corrects)", "175×", VER]],
center=(1, 2, 3, 4))
QEC_SOFT = table(
["Readout noise σ", "Hard-decision LER", "VIDRAFT v2 (soft NN) LER", "Reduction"],
[["0.8", "0.01497", "0.00834", "44%"],
["1.0", "0.03874", "0.02105", "46%"],
["1.2", "0.06908", "0.04171", "40%"]],
center=(0, 1, 2, 3))
QEC_HTML = page(
'① QEC Decoder — Surface Code
'
'Rotated surface code (memory Z), d=5, 5 rounds, circuit-level depolarizing noise (Stim). '
'Logical Error Rate (LER) — lower is better. ✓ VERIFIED = measured on this benchmark.
'
'Protocol & methodology. The four practical decoders (rows 2–5) are co-measured on one shared '
'40,000-shot test set; intervals are 95% CIs (normal approx.). Tesseract and BP-only on 20,000 shots. '
'The VIDRAFT QEC-AI Decoder is a regularized neural stacking ensemble (MLP 256→128, dropout 0.3, weight-decay 1e-4, '
'early-stopping) over features [syndrome bits + MWPM + BeliefMatching + BP+OSD corrections], trained on 80,000 mixed-noise shots '
'(p∈{0.003,0.005,0.008,0.01}). All code paths reproducible.
'
'A. Head-to-head (verified)
' + QEC_A +
'Reading the numbers. At p=0.005 the lowest LER among practical (non-MLE) decoders is the neural-ensemble entry '
'(0.00983), within the overlapping 95% CIs of BeliefMatching and BP+OSD — a statistical three-way tie — while all three beat '
'PyMatching/MWPM with non-overlapping CIs. The maximum-likelihood Tesseract is lower still, but runs at ~79 ms/shot, impractical for '
'real-time decoding. At p=0.01 the leading practical decoders (BP+OSD and the neural ensemble) sit within each other's CIs. '
'Decode latency is a key axis for fault-tolerant operation.
'
'B. Real hardware — IBM Heron r2 (repetition code, distance-scaling) ๐ฐ๐ท VIDRAFT
' + QEC_HW +
'Real-hardware result (honest scope). On real IBM Heron r2 QPUs, a distance-d repetition code with a '
'2-error injection shows the error-correcting distance boundary: d=3 fails to correct two errors (~97% logical error) while d=5 '
'corrects them (0.5–3%) — a 29–175× reduction across 3 backends (z = 7–552σ). A 24k-shot holdout '
'confirms d5<d3 on 4/4 backend×injection pairs. Cumulative ~2.4M QPU shots over 4 IBM Cloud accounts. '
'Boundaries: repetition code (not surface), single round, offline majority-vote — not surface-code below-threshold, '
'not FT-QEC, not a real-time decoder, not quantum advantage. Synthetic threshold study (simulation): qLDPC BB(12,12) p_th≈0.057 vs '
'surface p_th≈0.021 (×2.7).
'
'C. Soft-readout decoding — where neural decoders win (VIDRAFT v2) ๐ฐ๐ท
' + QEC_SOFT +
'Where the neural decoder genuinely wins. On binary idealized syndromes a neural decoder (v2 transformer) '
'matches but does not beat BP+OSD — the classical decoders already sit at the information floor (section A, head-to-head). '
'But with soft (analog) readout — the regime where neural decoders help (cf. Google AlphaQubit) — VIDRAFT v2 exploits the analog '
'measurement to cut logical error ~40–46% vs hard-decision decoding (d=5 repetition memory, readout-noise dominated), matching the '
'soft-optimal decoder. The lesson: the gain is in the information (soft / real-hardware data), not the architecture alone.
'
'D. Published references REPORTED — setups differ, not verified here
' + QEC_B)
# ---------------- Event 2: Optimization (Max-Cut) ----------------
OPT_A = table(
["Rank", "Flag", "Method", "By", "Cut", "% of best", "Time (s)", "Status"],
[["1", "๐", "Tabu search", "classical (Glover)", "2748", "100.00", "0.24", VER],
["2", "๐ฐ๐ท", "VIDRAFT QuantumOS (parallel tempering)", "VIDRAFT", "2744", "99.85", "0.43", VER],
["3", "๐", "Simulated annealing", "classical (Kirkpatrick)", "2741", "99.75", "0.30", VER],
["4", "๐", "Random search (20k)", "baseline", "2538", "92.36", "0.33", VER],
["5", "๐", "Greedy (one-pass)", "baseline", "2505", "91.16", "0.01", VER]],
center=(0, 1, 4, 5, 6, 7), ours_idx=(1,))
OPT_B = table(
["Flag", "Method / Platform", "Reported claim", "Source"],
[["๐บ๐ธ", "QAOA (Farhi et al.)", "gate-based; >8 layers beats Goemans-Williamson", 'arXiv 1411.4028'],
["๐บ๐ธ", "Goemans-Williamson (SDP)", "0.878 approximation guarantee (classical)", 'JACM 1995'],
["๐จ๐ฆ", "D-Wave Advantage2", "4400+ qubit annealer, Zephyr degree-20", 'D-Wave'],
["๐บ๐ธ", "QuEra Aquila (neutral atom)", "MaxCut/MIS on Rydberg arrays (Ebadi 2022)", 'Science 2022']],
center=(0,))
OPT_QAOA = table(
["Flag", "Quantum algorithm", "By", "Layers", "Approx. ratio (⟨C⟩/opt)", "Status"],
[["๐ฐ๐ท", "QAOA (statevector)", "VIDRAFT (run)", "p=1", "0.811", VER],
["๐ฐ๐ท", "QAOA (statevector)", "VIDRAFT (run)", "p=2", "0.814", VER],
["๐ฐ๐ท", "QAOA (statevector)", "VIDRAFT (run)", "p=3", "0.875", VER]],
center=(0, 3, 4, 5))
OPT_HTML = page(
'② Quantum Optimization — Max-Cut
'
'Weighted Max-Cut on a fixed instance G(N=140, p=0.5, seed 7), 4860 edges. Largest cut found (higher is better) + wall time. '
'% is relative to the best cut found among tested solvers. ✓ VERIFIED = run on this benchmark's identical instance.
'
'A. Solvers evaluated (verified, 140-node instance)
' + OPT_A +
'B. Quantum algorithm — QAOA (14-node instance, statevector)
' + OPT_QAOA +
'QAOA on a 14-node random Max-Cut (44 edges; exact optimum = 32 by brute force). Approximation ratio = expected cut / optimum; '
'it rises with circuit depth p (0.81 → 0.88 at p=3, approaching the classical Goemans-Williamson 0.878 guarantee). '
'Small instance because 140-qubit QAOA is not classically simulable.
'
'C. Published references REPORTED — different instances/hardware
' + OPT_B)
# ---------------- Event 3: VQE ----------------
VQE_A = table(
["Flag", "Method", "By", "System", "Result", "Status"],
[["๐ฐ๐ท", "VIDRAFT VQE (HEA, COBYLA)", "VIDRAFT", "H₂ / STO-3G, 4-qubit, eq. (simulation)",
"energy err 0.22 mHa vs FCI (chemical accuracy)", VER],
["๐ฐ๐ท", "VIDRAFT VQE (VDR-001, 27-Pauli)", "VIDRAFT", "4-qubit, IBM Heron r2 (real HW)",
"−0.6763 ±0.0022 Ha", VER]],
center=(0, 5), ours_idx=())
VQE_CURVE = table(
["Bond length R (Å)", "FCI energy (Ha)", "VQE energy (Ha)", "Error (mHa)", "Chem. accuracy"],
[["0.50", "−1.05516", "−1.05158", "3.58", "—"],
["0.735 (eq.)", "−1.13731", "−1.13709", "0.22", "✓"],
["1.00", "−1.10115", "−1.10055", "0.60", "✓"],
["1.50", "−0.99815", "−0.99724", "0.91", "✓"],
["2.00", "−0.94864", "−0.93956", "9.08", "—"]],
center=(0, 1, 2, 3, 4))
VQE_B = table(
["Flag", "Group / Work", "Reported result", "Source"],
[["๐ฌ๐ง", "Peruzzo et al. 2014", "first VQE; photonic chip; HeH⁺", 'Nat Commun 2014'],
["๐บ๐ธ", "O'Malley et al. 2016", "H₂ dissociation on superconducting qubits", 'PRX 2016'],
["๐จ๐ญ", "Kandala et al. 2017", "hardware-efficient VQE: H₂, LiH, BeH₂", 'Nature 2017'],
["๐บ๐ธ", "Google AI 2020", "Hartree-Fock on Sycamore: H₁₂ (12 qubits)", 'Science 2020']],
center=(0,))
VQE_HTML = page(
'③ Variational Quantum Eigensolver (VQE)
'
'Ground-state energy by VQE. Metric: energy error vs exact diagonalization (FCI); chemical accuracy = < 1.6 mHa. '
'Reference min-eigenvalue for this operator: −1.857275 Ha. ✓ VERIFIED = simulated on this benchmark.
'
'A. Verified runs
' + VQE_A +
'B. H₂ dissociation curve (4-qubit, VQE vs FCI)
' + VQE_CURVE +
'VQE (hardware-efficient ansatz) reproduces the H₂ potential-energy curve, reaching chemical accuracy (<1.6 mHa) at and near equilibrium '
'(R=0.735–1.5 Å); the compressed (0.5) and stretched (2.0) geometries miss it — the known limitation of shallow hardware-efficient ansätze '
'(UCCSD/ADAPT close this gap; Phase 2). Larger molecules (LiH, BeH₂) under hardware noise remain the open challenge (Track B).
'
'C. Published references REPORTED — real-hardware experiments
' + VQE_B)
# ---------------- Event 4: QRAM ----------------
QRAM_QEC = table(
["Flag", "Storage noise p", "Unprotected (d1)", "d3", "d7", "d11", "d15", "Status"],
[["๐ฐ๐ท", "10%", "90.0%", "97.2%", "99.7%", "99.97%", '100.0%', VER],
["๐ฐ๐ท", "20%", "80.0%", "89.6%", "96.7%", "98.8%", '99.6%', VER]],
center=(0, 1, 2, 3, 4, 5, 6, 7), ours_idx=(0, 1))
QRAM_HW = table(
["Flag", "Address", "Expected bit", "Query accuracy", "Shots", "Status"],
[["๐ฐ๐ท", "00", "1", "0.922", "256", VER],
["๐ฐ๐ท", "01", "0", "0.902", "256", VER],
["๐ฐ๐ท", "10", "1", "0.906", "256", VER],
["๐ฐ๐ท", "11", "1", "0.949", "256", VER]],
center=(0, 1, 2, 3, 4, 5))
QRAM_BB = table(
["n (addr)", "cells N", "qubits (BB)", "T-count (BB)", "query fid. BB", "query fid. fanout"],
[["4", "16", "31", "112", "0.984", "0.984"],
["8", "256", "511", "1792", "0.968", "0.774"],
["12", "4096", "8191", "28672", '0.953', "0.017"]],
center=(0, 1, 2, 3, 4, 5))
QRAM_B = table(
["Flag", "Work", "Reported result", "Source"],
[["๐จ๐ณ", "Zhejiang Univ 2026 (experimental BB-QRAM)", "hardware query fidelity: 2-layer 0.80, 3-layer 0.60", 'arXiv 2506.16682 / Nat. Phys.'],
["๐บ๐ธ", "Giovannetti-Lloyd-Maccone 2008", "bucket-brigade QRAM architecture", 'PRL 2008'],
["๐บ๐ธ", "Hann et al. 2021", "QRAM noise resilience; infidelity ~ O(polylog N)", 'PRX Quantum 2021']],
center=(0,))
QRAM_HTML = page(
'④ QRAM — Accuracy via QEC protection
'
'(A) VIDRAFT QEC-protected QRAM (simulation): a repetition code + majority decode protects the retrieved bit '
'against storage noise. (B) Bucket-brigade resource/noise model. ✓ VERIFIED = computed/simulated on this benchmark (exact binomial).
'
'A. VIDRAFT QEC-protected QRAM reliability vs code distance ๐ฐ๐ท
' + QRAM_QEC +
'At 20% storage noise a repetition-code QEC layer raises retrieval reliability from 80% (unprotected) to '
'99.6% at d=15; at 10% it reaches 100%. The reported hardware QRAM (Zhejiang, Track B) plateaus near 60–80% without QEC. '
'Honest scope: the VIDRAFT figures are a small-scale simulation on the accuracy axis; the Zhejiang figures are real hardware — '
'different methodologies, not a head-to-head. Full fault-tolerant QRAM (logical query gates) remains future work.
'
'B. Real hardware — IBM Heron r2 (select-QRAM) ๐ฐ๐ท VIDRAFT
' + QRAM_HW +
'Real-hardware QRAM measurement. A 4-cell select-QRAM (2 address + 1 data qubit, word [1,0,1,1]) on IBM '
'Heron r2 (ibm_marrakesh, job d8n0nb3nn5bs738tv4hg): mean query fidelity 0.920 over the four addresses (256 shots each, transpiled depth ~128). '
'Honest scope: this is a select-QRAM with computational-address queries (1-bit words) — simpler than the Zhejiang '
'bucket-brigade with superposition queries and multiple layers, so 0.92 is not directly comparable to their 0.60–0.80. '
'It is a genuine real-hardware QRAM datapoint; combined with the QEC-protection layer (section A, simulation) it covers both axes.
'
'C. Bucket-brigade vs fanout resource/noise model (analytic)
' + QRAM_BB +
'D. Published references REPORTED — hardware/theory
' + QRAM_B)
# ---------------- Event 5: Simulation ----------------
SIM_A = table(
["Flag", "Method", "By", "Qubits", "Depth", "Time (s)", "Notes", "Status"],
[["๐ฐ๐ท", "VIDRAFT stabilizer (stim, Clifford)", "VIDRAFT / stim", "100,000", "1e5", "54.7", "Clifford-only; far beyond statevector", VER],
["๐ฐ๐ท", "VIDRAFT MPS (tensor-network)", "VIDRAFT (quimb-style)", "100", "10", "0.11", "low-entanglement 1D; χ≤32", VER],
["๐ฐ๐ท", "VIDRAFT GPU statevector (cupy)", "VIDRAFT / cupy (B200)", "30", "10", "10.07", "exact, GPU; 8.6 GB (32q OOM @191 GB)", VER],
["๐ฐ๐ท", "VIDRAFT dense statevector", "VIDRAFT (numpy, CPU)", "20", "10", "4.93", "exact; memory-bound (2ⁿ)", VER]],
center=(0, 3, 4, 5, 7), ours_idx=())
SIM_B = table(
["Flag", "Work", "Reported result", "Source"],
[["๐ฌ๐ง", "Tindall et al. 2024", "TN sim of IBM Eagle kicked-Ising (127 qubits)", 'PRX Quantum 2024'],
["๐จ๐ณ", "Pan & Zhang 2022", "classical TN spoofing of Sycamore supremacy", 'PRL 2022'],
["๐บ๐ธ", "Google Sycamore 2019", "quantum supremacy claim (53 qubits)", 'Nature 2019']],
center=(0,))
SIM_HTML = page(
'⑤ Quantum-Inspired / Classical Simulation
'
'How large a quantum circuit a classical method can handle. Qubits simulated + wall time. '
'Dense statevector is exact but memory-bound (~2ⁿ); tensor networks reach far more qubits on low-entanglement circuits. '
'✓ VERIFIED = run on this benchmark.
'
'A. Verified runs
' + SIM_A +
'B. Published references REPORTED — larger-scale records
' + SIM_B)
# ---------------- Event 6: Quantum Cryptanalysis ----------------
CRYPTO_A = table(
["Flag", "Cipher structure", "Quantum attack", "Speedup", "Verified (simulation)", "Status"],
[["๐ฐ๐ท", "Even-Mansour block cipher", "Simon (period finding)", "exp → poly", "key recovery up to n=8 (24 qubits)", VER],
["๐ฐ๐ท", "SPN block cipher (key recovery)", "Grover (amplitude amp.)", "quadratic √", "key up to n=8 (√256 = 13 iters)", VER],
["๐ฐ๐ท", "CBC-MAC (tag forgery)", "Simon (period finding)", "exp → poly", "forgery period up to n=6", VER],
["๐ฐ๐ท", "Linear encoding / keystream mask", "Bernstein-Vazirani", "n queries → 1", "secret extract up to n=16", VER],
["๐ฐ๐ท", "Feistel (DES structure) — 3 / 4 / 5 / 6-round", "Simon · Grover-meets-Simon", "exp → poly", "3R full · 4–6R key-recovery", VER]],
center=(0, 3, 4, 5), ours_idx=(0, 1, 2, 3, 4))
CRYPTO_B = table(
["Flag", "Work", "Reported result", "Source"],
[["๐", "Simon 1994", "quantum period-finding — exponential speedup (the engine of these attacks)", 'SIAM J. Comput.'],
["๐", "Grover 1996", "quantum unstructured search — quadratic speedup (symmetric key search)", 'STOC 1996'],
["๐ฏ๐ต", "Kuwakado & Morii 2010 / 2012", "Simon distinguishes 3-round Feistel; key recovery on Even-Mansour", 'IEEE ISIT'],
["๐ซ๐ท", "Kaplan, Leurent, Leverrier, Naya-Plasencia, Schrottenloher 2016", "Simon breaks CBC-MAC, PMAC, GMAC, GCM, OCB; quantum slide attacks", 'CRYPTO 2016'],
["๐ณ๐ฑ", "Santoli & Schaffner 2017", "Simon-based existential forgery of MACs (CBC-MAC and more)", 'QIC 2017'],
["๐ฉ๐ช", "Leander & May 2017", "“Grover meets Simon” — key recovery on the FX / whitened-key construction", 'ASIACRYPT 2017'],
["๐ซ๐ท", "Bonnetain, Naya-Plasencia, Schrottenloher 2019", "offline Simon — quantum attacks without superposition queries (Q1 model)", 'ASIACRYPT 2019'],
["๐ซ๐ท", "Bonnetain, Schrottenloher, Sibleyras 2022", "beyond quadratic speedups in quantum attacks on symmetric schemes", 'EUROCRYPT 2022'],
["๐จ๐ญ", "Grassl, Langenberg, Roetteler, Steinwandt 2016", "Grover key search for AES: ~6681 logical qubits (AES-256)", 'PQCrypto 2016'],
["๐บ๐ธ", "Jaques, Naehrig, Roetteler, Virdia 2020", "Grover oracles for AES / LowMC; lower NIST cost estimates + Q# code", 'EUROCRYPT 2020'],
["๐", "Simon — Even-Mansour on quantum hardware 2026", "genuine break on IBM at block N=3,4 (N=5 = circuit-synthesis wall)", 'arXiv 2604.25509'],
["๐ฎ๐ณ", "Quantum cryptanalysis of symmetric ciphers — review 2022", "survey of Simon / Grover / offline-Simon attacks across primitives", 'Comput. Electr. Eng.']],
center=(0,))
CRYPTO_HTML = page(
'⑦ Quantum Cryptanalysis — Symmetric Ciphers ๐ฐ๐ท VIDRAFT QuantumOS
'
'Genuine (un-compiled) quantum algorithms breaking symmetric-cipher constructions, run as high-performance simulation. '
'While real quantum hardware for these attacks is stuck at n=4 (Track B, 2026), QuantumOS covers all five symmetric-crypto structures — '
'Even-Mansour, SPN, MAC, and Feistel. ✓ VERIFIED = the genuine attack recovers the secret on this engine.
'
'A. Cipher structures broken (verified in simulation) ๐ฐ๐ท
' + CRYPTO_A +
'Feistel round-depth (DES family). The Feistel entry deepens genuinely: 3-round is a direct Simon period-recovery; '
'4-, 5- and 6-round use Grover-meets-Simon — guess the last one/two/three round keys, peel them off, and the reduced 3-round '
'Simon period survives only for the correct guess (verified: the true key is uniquely selected; wrong keys destroy the period). Verified genuine '
'at block 6–8 (21–29 qubits). Scope: the quantum Simon test is fully simulated; the outer key search's √ speedup is Grover (coherent '
'nesting needs parallel Simon copies, beyond statevector), so it is stated as the theoretical outer loop. Still 3–6 rounds, not 16-round DES.
'
'Real hardware — IBM Heron ๐ฐ๐ท. The Even-Mansour Simon attack was also run on a real IBM quantum processor '
'(ibm_fez, Heron 156-qubit; n=3; 8192 shots; job d94i5rkql68s73c9imp0). The genuine circuit recovers the secret key (period argmax = k₁), '
'with a k₁⊥ signal fraction of 0.553 vs the 0.50 noise floor — a bias of ≈9.6σ (statistically real, not luck). '
'This matches the 2026 real-hardware SOTA scale (Even-Mansour at n=3,4). Adding error mitigation (dynamical decoupling XY4 + Pauli/measurement '
'twirling; job d94jcb5gc6cc73ff6e80) sharpens the signal to 0.657 (bias ≈28σ) — a clean, genuine improvement. '
'At n=4, the naive single-period metric is below threshold, but that is the wrong post-processing: standard Simon linear-algebra recovery '
'(GF(2) null-space of the highest-count independent measured outcomes) recovers the exact key in two independent jobs '
'(8192 & 16384 shots; d94ju2fu…, d94k0pkq…) — matching the 2026 real-hardware SOTA scale (n=3,4). '
'Scope: this is error mitigation, not error correction (QEC) — the attack runs on physical qubits '
'with no logical encoding (application-circuit QEC is not feasible on today's NISQ hardware). A genuine cryptanalysis-attack key recovery on a real QPU.
'
'N=5 through N=10 — extending the hardware frontier ๐ฉ๐ฐ๐ท. The published hardware record stops at N=4 '
'(arXiv:2604.25509; its N=5 was blocked by a classical circuit-synthesis limit). Using proprietary QuantumOS methods (full details reserved for a '
'forthcoming paper), VIDRAFT recovered the Even-Mansour secret key on a real IBM QPU at block sizes N=5 through N=10 — to our '
'knowledge the largest genuine Even-Mansour key recovery on real quantum hardware. Results are reproducibly verified — measured true-key ranks (ibm_kingston): n5=1, n6=6, n7=3, n8=9, n9=15, n10=63/1023, each recovered via a small quantum-ranked shortlist + classical verification, with an independent control key at every size. Honest scope: '
'this is a proof-of-concept at reduced sizes (not a break of real AES-256 or RSA-2048); it uses error mitigation (not QEC); and '
'— importantly — on today's noisy hardware the effective search reduction tracks the classical birthday bound (~2^(n/2)), so '
'this is an experimental frontier demonstration, not a quantum speedup over classical cryptanalysis. Formal record status pending peer review.
'
'Feistel (DES family) — real hardware ๐ฐ๐ท. Beyond Even-Mansour, the 3-round Feistel construction was also recovered on a real IBM QPU (ibm_kingston) at block sizes 6 and 8 — both a target key and an independent control key, clean rank-1 recovery at both sizes. A second genuine quantum-hard structure demonstrated on real hardware (still 3-round, not 16-round DES).
'
''
'
'
'
'
'Honest scope. These are genuine quantum algorithms (Simon / Grover / Bernstein-Vazirani), verified in GPU/CPU '
'simulation (qiskit + an independent JavaScript engine, Node-checked). Simon-based attacks assume the quantum-query (Q2) oracle model. '
'The Feistel entry is a 3-round Feistel — the design family DES belongs to — not 16-round DES, and this is not a break of '
'real AES-256 or RSA-2048. Sizes are reduced (browser-live to block 8; S4-verified to block 12); classical projections to real sizes are estimates. '
'No claim of quantum advantage over deployed cryptography is made.
'
'
'
'A 156-qubit state-preparation circuit (X + measure) on ibm_kingston, arranged to spell VIDRAFT — each dot is one real qubit. Logical banner layout, not physical chip geometry.
'
'B. The quantum-cryptanalysis landscape REPORTED — theory / hardware
'
'The field is largely theory (attacks proven on paper) plus a single 2026 hardware demonstration at block n=4. VIDRAFT's '
'contribution here is a genuine, multi-structure simulation platform spanning all five symmetric-crypto structures — broader in breadth, verified and '
'interactive, at sizes real hardware cannot yet reach.
' + CRYPTO_B)
FOOTER = ('FINAL-Bench hosts this benchmark; all methods — including those submitted by VIDRAFT (๐ฐ๐ท) — '
'are evaluated under identical public protocols and shown with the same confidence intervals as every other entry. '
'Track B numbers are quoted from their sources (codes, noise models, and hardware differ) and are not directly comparable. '
'No quantum-advantage claims are made. Real-hardware QEC (โ section B) uses a repetition code with offline majority-vote — '
'not surface-code below-threshold, not fault-tolerant QEC. Cumulative ~2.4M IBM QPU shots; a methods paper is in preparation. '
'VIDRAFT entry reference: vidraft-quantumos.hf.space.
')
MEDALS_HTML = page(
'🏅 Participating groups by country
'
'Who appears across the five events (Track A measured here + Track B published). A neutral participation map — not a ranking of nations.
' +
table(["Flag", "Country", "Groups / methods featured"],
[["๐บ๐ธ", "United States", "Google (Willow, AlphaQubit, Tesseract, stim, Sycamore), IBM, AWS (Ocelot), QuEra, Quantinuum, Fusion Blossom, Infleqtion"],
["๐ฌ๐ง", "United Kingdom", "O. Higgott (PyMatching, BeliefMatching), Roffe (ldpc / BP+OSD), Riverlane (LCD, Ambiguity Clustering)"],
["๐จ๐ณ", "China", "USTC (Zuchongzhi 3.2), Zhejiang Univ (experimental QRAM), Pan & Zhang (TN spoofing)"],
["๐ฐ๐ท", "Korea", "VIDRAFT (QEC-AI decoder, IBM-hardware repetition QEC, QEC-protected QRAM, VQE, simulation)"],
["๐ณ๐ฑ", "Netherlands", "QuTech / Delft (NN decoder)"],
["๐ฏ๐ต", "Japan", "Fujitsu (Ising-machine decoder, Digital Annealer)"],
["๐ซ๐ท", "France", "Alice & Bob (cat qubits)"],
["๐จ๐ฆ", "Canada", "Xanadu (photonic GKP), D-Wave (annealer)"],
["๐จ๐ญ", "Switzerland", "IBM Zurich (Kandala VQE)"],
["๐ฎ๐ณ", "India", "QpiAI (real-time decoder)"],
["๐ฉ๐ช", "Germany", "Munich Quantum Toolkit (MQT QECC)"]],
center=(0,)))
ABOUT_HTML = page(
'ℹ About & Cite
'
'FINAL-Bench Quantum is an open, neutral benchmark suite for quantum-computing methods. '
'Track A = methods measured here under one fixed public protocol (with 95% confidence intervals); Track B = published results quoted from their sources.
'
'Reproducibility
'
'Each event states its exact configuration (code, distance, rounds, noise model, shot count, seed). '
'The frozen QEC test set (rotated surface code d=5, p=0.005, 20k shots) is published for independent evaluation. Submit your own method via the Submit tab.
'
'Honesty boundaries
'
'No quantum-advantage claims. Real-hardware QEC uses a repetition code with offline majority-vote (not surface-code below-threshold, not fault-tolerant). '
'QRAM accuracy figures are simulation. Track B numbers are not directly comparable (different codes, noise models, hardware).
'
'Citation
'
'A methods paper is in preparation. Provisional BibTeX:
'
'@misc{finalbench_quantum_2026, title={FINAL-Bench Quantum: an open benchmark suite for quantum-computing methods}, '
'author={FINAL-Bench}, year={2026}, note={huggingface.co/spaces/FINAL-Bench/quantum-bench-leaderboard}}
')
# ---------------- Submit handler ----------------
def submit(event, team, country, name, github, hf, email, notes, file):
if not (name and name.strip()) or not (email and email.strip()) or not ((github and github.strip()) or (hf and hf.strip())):
return "โ Required: method/decoder name, email, and at least one link (GitHub or Hugging Face)."
rec = {"event": event, "team": team, "country": country, "name": name, "github": github,
"hf": hf, "email": email, "notes": notes, "submitted_at": time.strftime("%Y-%m-%dT%H:%M:%S")}
stamp = time.strftime("%Y%m%d_%H%M%S")
safe = "".join(c for c in (name or "entry") if c.isalnum() or c in "-_")[:30]
base = "submissions/%s_%s" % (stamp, safe)
try:
api.upload_file(path_or_fileobj=json.dumps(rec, ensure_ascii=False, indent=1).encode(),
path_in_repo=base + ".json", repo_id=SUB_DS, repo_type="dataset")
if file is not None:
fp = file if isinstance(file, str) else getattr(file, "name", None)
if fp:
api.upload_file(path_or_fileobj=fp, path_in_repo=base + "_" + os.path.basename(fp),
repo_id=SUB_DS, repo_type="dataset")
return ("โ
Submission received and stored privately for manual review. It will be reproduced under the "
"event's fixed protocol; you will be emailed about leaderboard inclusion. Thank you!")
except Exception as e:
return "โ ๏ธ Could not store submission: " + str(e)[:200]
with gr.Blocks(title="FINAL-Bench Quantum", theme=gr.themes.Soft()) as demo:
gr.Markdown("# FINAL-Bench Quantum Quantum Olympics\n"
"An open benchmark suite for quantum-computing methods โ five events, one fair yardstick. "
"Each entry is labeled by origin (country flag + author/group); add your own via the Submit tab.\n\n"
"[]"
"(https://huggingface.co/blog/FINAL-Bench/quantum-leaderboard)")
with gr.Tab("โ QEC Decoder"):
gr.HTML(QEC_HTML)
with gr.Tab("โก Optimization"):
gr.HTML(OPT_HTML)
with gr.Tab("โข VQE"):
gr.HTML(VQE_HTML)
with gr.Tab("โฃ QRAM"):
gr.HTML(QRAM_HTML)
with gr.Tab("โค Simulation"):
gr.HTML(SIM_HTML)
with gr.Tab("โฅ Quantum Cryptanalysis"):
gr.HTML(CRYPTO_HTML)
with gr.Tab("๐ Charts"):
gr.Markdown("Measured on this benchmark (rotated surface code, d=5, Stim, 20k shots). "
"\\*The neural-ensemble entry's latency includes computing its base-decoder features (โ BP+OSD time); "
"its NN forward pass itself adds only ~ยตs.")
with gr.Row():
gr.Image(value="chart_threshold.png", label="LER vs physical error rate", show_label=True, height=300)
gr.Image(value="chart_distance.png", label="LER vs code distance", show_label=True, height=300)
gr.Image(value="chart_latency.png", label="Latency vs accuracy (log x)", show_label=True, height=320)
with gr.Tab("๐
Medals"):
gr.HTML(MEDALS_HTML)
with gr.Tab("โน๏ธ About"):
gr.HTML(ABOUT_HTML)
with gr.Tab("๐ค Submit"):
gr.Markdown("Submit a method for **manual review**. Submissions are stored privately, reproduced under the "
"event's fixed protocol, and the submitter is emailed about leaderboard inclusion. Fields marked * are required.")
event = gr.Dropdown(["โ QEC Decoder", "โก Optimization", "โข VQE", "โฃ QRAM", "โค Simulation", "โฅ Quantum Cryptanalysis", "Other"],
label="Event", value="โ QEC Decoder")
with gr.Row():
team = gr.Textbox(label="Team / Author")
country = gr.Textbox(label="Country (for flag)")
name = gr.Textbox(label="Method / decoder name *")
with gr.Row():
github = gr.Textbox(label="GitHub URL")
hf = gr.Textbox(label="Hugging Face URL")
email = gr.Textbox(label="Email *")
notes = gr.Textbox(label="Method / notes", lines=3)
file = gr.File(label="Optional: results or code file")
btn = gr.Button("Submit", variant="primary")
out = gr.Markdown()
btn.click(submit, [event, team, country, name, github, hf, email, notes, file], out)
gr.HTML(page(FOOTER))
if __name__ == "__main__":
demo.launch()