The code used for the experiments reported in the manuscript "Per-Phase Fidelity Attribution for Quantum Compilers using HBR Decomposition" is available in this repository.
Quantum compilers sit between an algorithm's theoretical promise and what executes on physical hardware. Existing benchmarks report aggregate post-transpilation metrics but cannot attribute where fidelity is lost within the compilation pipeline. We present HBR decomposition, a per-phase fidelity attribution model that quantifies relative fidelity loss across High-level structural decomposition (H), Basis translation (B), and Routing (R). We evaluate three production SDKs (Qiskit, PennyLane, TKET) across eight algorithms on two backend topologies: IBM Heron (heavy-hex) and IonQ Forte (all-to-all). The dominant compiler bottleneck is strongly circuit-class dependent: Routing accounts for up to 60% of relative fidelity loss in search-class circuits, while synthesis dominates Hamiltonian simulation workloads. Early synthesis choices amplify or compress downstream routing overhead depending on circuit connectivity. SDK rankings at diagnostic optimization level (opt=0) reverse at production levels (opt=2) for deep circuits, showing that stagewise diagnostics and production results answer different questions. HBR correctly predicts SDK rank ordering across noisy simulations (8 circuits x 3 SDKs x 2 tiers) and real IBM Fez hardware executions, revealing stage-specific bottlenecks that are not observable through aggregate compiler benchmarks.
algos/ 8 benchmark algorithms (GHZ, Grover, BV, QFT, QPE, QAOA, Trotter, QDRIFT)
sdks/ Per-SDK HBR runners (qiskit_runner, tket_runner, pennylane_runner)
configs/ Backend definitions (IBM Heron, IonQ Forte) and experiment config
metrics.py NISQ fidelity model, CX-equivalent gate costing, T2 decoherence
analysis/ Attribution, scaling projections, figures, statistical validation
tables/ Markdown table generators for all paper sections
results/ Cached benchmark outputs (simulator, tier2, hardware, scaling, noisy validation)
| Script | Paper section | Description |
|---|---|---|
run_all.py |
SS4 | Full benchmark: 8 algos x 3 SDKs x 2 backends, generates HBR tables |
run_scaling.py |
SS4.4 | Multi-n scaling benchmarks, fidelity cliff projections |
run_tier2.py |
SS5 | Production-level (opt=2) validation |
run_ibm_noisy_validation.py |
SS5.1 | IBM FakeFez noisy-sim validation (8 circuits x 3 SDKs x 2 tiers) |
run_ionq_noisy_validation.py |
SS5.2 | IonQ Forte-1 noisy-sim validation (8 circuits x 3 SDKs x 2 tiers) |
run_hardware.py |
SS5.3 | IBM Fez hardware validation (BV n=12, Grover n=4) |
pip install -r requirements.txt
# Full simulator benchmark (SS4)
python run_all.py
# Scaling analysis (SS4.4)
python run_scaling.py
# Tier 2 production-level (SS5)
python run_tier2.py
# Noisy-sim validation
python run_ibm_noisy_validation.py --shots 8192
python run_ionq_noisy_validation.py --shots 1024
# Hardware validation (requires IBM Quantum credentials in configs/hardware.py)
python run_hardware.py --shots 4096# Generate all HBR attribution tables
python -m tables.generate_all
# Scaling tables
python -m tables.generate_scaling_tables
# Figures
python -m analysis.generate_figures
# Statistical validation (25-seed transpiler variance)
python -m analysis.statisticalconfigs/backends.py-- Backend noise parameters, coupling maps, gate setsconfigs/experiment.py-- Fairness locks (seed, shots), algorithm parametersconfigs/hardware.py-- IBM Quantum credentials (not tracked in git)
| Backend | Topology | Native 2Q | Qubits |
|---|---|---|---|
| IBM Heron (FakeFez) | Heavy-hex | CZ | 156 |
| IonQ Forte | All-to-all | MS (CX-equiv) | 36 |
Python >= 3.10. See requirements.txt for dependencies.
@techreport{pati2026perphasefidelity,
title = {Per-Phase Fidelity Attribution for Quantum Compilers using HBR Decomposition},
author = {Pati, Chandrachud and Simmhan, Yogesh},
institution = {arXiv},
year = {2026},
number = {arXiv:2605.07876},
doi = {10.48550/arXiv.2605.07876},
url = {https://arxiv.org/abs/2605.07876}
}