qb-compiler

Quantum Execution Intelligence

Know which backend to use, whether your circuit is viable, what fidelity to expect, and what it will cost — before you spend QPU time. Built on top of Qiskit's transpiler.

PyPIPython 3.10+Apache 2.0
View on GitHub

KNOW BEFORE YOU RUN

qb-compiler helps quantum developers make better execution decisions.

Viability Check

Is your circuit worth running? Get a VIABLE / CAUTION / DO NOT RUN verdict with fidelity estimate and cost before you submit.

Multi-Vendor

IBM, Rigetti, IonQ, IQM, Quantinuum from one API. Compare backends side-by-side. Budget-aware compilation with cost estimation.

Smart Optimizations

Selective dynamical decoupling that knows when to skip. Calibration-aware layout. Compilation receipts for full audit trails.

QUICK START

python
from qb_compiler import QBCompiler, check_viability

# Is my circuit worth running?
result = check_viability(circuit, backend="ibm_fez")
print(result)
# → Status: VIABLE
# → Est. fidelity: 0.847
# → Cost (4096 shots): $0.6554
# → Suggestions:
# →   - Circuit looks good — proceed with execution.

# Compile with automatic optimizations
compiler = QBCompiler.from_backend("ibm_fez")
compiled = compiler.compile(circuit)

CLI

Five commands for quantum execution intelligence from your terminal

qbc preflight

— Should I run this?
bash
$ qbc preflight circuit.qasm -b ibm_fez

Circuit: GHZ-8    Backend: ibm_fez (156q)

Status: VIABLE
Est. fidelity: 0.8519
Depth: 12 (viable limit: 188)
2Q gates: 7
Cost (4096 shots): $0.6554

qbc analyze

— Detailed analysis
bash
$ qbc analyze circuit.qasm -b ibm_fez

Circuit: QAOA-MaxCut
Qubits: 6  Gates: 84  Depth: 47

Status: MARGINAL
Est. fidelity: 0.1823
Signal/noise: 11.7x
Cost (4096 shots): $0.6554

Suggestions:
  - Consider ZNE or PEC error mitigation
  - Good candidate for 2-5x improvement

qbc diff

— Compare backends
bash
$ qbc diff circuit.qasm -b ibm_fez --vs ibm_torino

Circuit: GHZ-5
              ibm_fez    ibm_torino
Status         VIABLE       VIABLE
Fidelity       0.9430       0.9285
Cost/4096     $0.6554      $0.5734

Recommendation: ibm_fez (+0.0145)

qbc doctor

— Health check
bash
$ qbc doctor

✔ qb-compiler 0.2.0
✔ Python 3.11.14
✔ Qiskit 1.4.5
✔ IBM credentials (2 accounts)
✔ 9 backends configured
✔ 5 calibration snapshots

Environment looks good!

qbc compile

— With receipt
bash
$ qbc compile circuit.qasm -b ibm_fez --receipt

Compiled: depth 12 -> 8 (33.3%)
Est. fidelity: 0.8519
Time: 142.3 ms
Receipt: circuit.receipt.json

FEATURE COMPARISON

qb-compiler vs standard Qiskit transpiler

FeatureQiskitqb-compiler
TranspilationYesUses Qiskit internally
Circuit viability checkqbc preflight
Pre-execution fidelity estimateYes
Backend recommendationYes
Selective dynamical decouplingYes
Cost estimationYes
Budget enforcementYes
Compilation receipts--receipt
Multi-vendor backendsIBM onlyIBM, Rigetti, IonQ, IQM, Quantinuum
Environment health checkqbc doctor
Circuit analysis + suggestionsqbc analyze
Backend comparisonqbc diff

HARDWARE VALIDATION

IBM Fez (156 qubits, March 2026). All results are measured fidelity from real hardware runs with 4096 shots.

Layout Selection — GHZ Circuits

CalibrationMapper (post-routing scoring, multi-region search) vs Qiskit opt_level=3. Both use Qiskit's SabreSwap for routing — the only difference is initial qubit placement.

CircuitQiskitqb-compilerDeltaNotes
GHZ-396.5%96.7%+0.2%Both find optimal region
GHZ-592.5%93.2%+0.7%Different regions selected
GHZ-882.1%87.5%+5.3%Best result — region 120-143
GHZ-1078.8%79.8%+1.0%Region 120-147

Fidelity = P(000...0) + P(111...1) over 4096 shots. Improvement is largest when qb-compiler discovers a better region than Qiskit's default search. When both converge on the same optimal region, results are statistically equivalent.

Dynamical Decoupling

Selective DD applied after Qiskit routing. Automatically skipped for dense circuits where it adds noise.

CircuitWithout DDWith DDDeltaNotes
GHZ-883.5%83.6%+0.1%Minimal idle time
QFT-62.1%2.6%+27% rel.Long idle periods — DD helps
QAOA-65.9%5.5%-6.6% rel.Dense — DD skipped in v0.2.1

QFT-6 and QAOA-6 base fidelities are in the noise floor (depth exceeds viable limit).qbc preflight would flag these as DO NOT RUN, saving QPU time.

Journey to These Results

1. Initial mapper lost to Qiskit by up to 10.6% (pre-routing scoring flaw)

2. Post-routing scoring fix closed the gap

3. Multi-region search + routed fidelity tiebreaker achieved positive results

4. Qiskit seed injection ensures qb-compiler never selects a worse layout than Qiskit's own best

Reproduce: python scripts/hardware_validation_v2.py --dry-run

HOW IT WORKS

1
Viability CheckIs it worth running?
2
Backend SelectionWhere should it run?
3
Qiskit TranspilationBest of N seeds, opt_level=3
4
Selective DDProtect idle qubits (skip dense circuits)
5
Fidelity EstimationWhat to expect
6
Cost EstimationWhat it will cost
7
Compilation ReceiptFull audit trail (JSON)

All transpilation uses Qiskit's routing engine internally. qb-compiler's value is in execution intelligence (preflight, viability, cost estimation) and calibration-aware layout selection that matches or exceeds Qiskit's default on hardware-validated benchmarks.

SUPPORTED BACKENDS

VendorBackendsQubitsNative Basis
IBMFez, Torino, Marrakesh (Heron)133-156ECR, RZ, SX
RigettiAnkaa-384CZ, RZ, RX
IonQAria, Forte25-36MS, GPI, GPI2
IQMGarnet, Emerald5-20CZ, PRX
QuantinuumH232RZ, U1Q, ZZ

Calibration data loaded from local JSON files or fetched from vendor APIs.

OPEN SOURCE vs QUBITBOOST PRO

FeatureOpen SourceQubitBoost Pro
Single-backend preflightYesYes
Multi-backend rankingYes
Cached calibrationYesLive calibration
Local receiptsYesCloud dashboard
Cost estimationSingle vendorCross-vendor
Drift alertsYes
Circuit watchlistYes

qb-compiler is free and fully functional standalone. QubitBoost Pro adds live multi-vendor calibration, cloud execution history, and advanced optimizations.

INSTALLATION

pip install qb-compilerCore (IBM backends via Qiskit)
pip install "qb-compiler[ml]"+ ML acceleration (optional)
pip install "qb-compiler[gnn]"+ GNN layout predictor (optional)
pip install "qb-compiler[dev]"Development

CLI REFERENCE

CommandDescription
qbc preflight <circuit> -b <backend>Quick viability check: VIABLE / CAUTION / DO NOT RUN
qbc analyze <circuit> -b <backend>Detailed analysis with suggestions
qbc diff <circuit> -b <backend> --vs <backend>Side-by-side backend comparison
qbc doctorEnvironment health check
qbc compile <circuit> -b <backend> --receiptCompile with audit trail
qbc infoShow version and available backends
qbc calibration show <backend>Show calibration summary

OPEN SOURCE

Apache 2.0. Contributions welcome.

See CONTRIBUTING.md for guidelines.

FULL EXECUTION LIFECYCLE

PRE-EXECUTION

qb-compiler

Is my circuit viable?
Which backend should I use?
What will it cost?
Compile with optimizations

Free and open source. Apache 2.0.

EXECUTION & POST-EXECUTION

QubitBoost SDK

TOMOGATEPre-flight state certification
LIVEGATEReal-time doom detection + early abort
SAFETYGATEQEC trust scoring
SHOTVALIDATORRedundant syndrome verification
GUARDGATEQAOA solution quality gate
OPTGATEAdaptive shot reduction
CHEMGATEVQE evaluation savings

Available at qubitboost.io

Together they cover the complete quantum execution lifecycle.