Benchmarking¶
This guide describes the benchmarking framework for evaluating the backend selector.
Overview¶
The benchmarking suite evaluates performance using real-world quantum circuits from various application domains.
Benchmark Circuits¶
GHZ States¶
Test multi-qubit entanglement and connectivity.
Bernstein-Vazirani¶
Test parallel operations and phase kickback.
Mirror Circuits¶
Test device fidelity through circuit inversion. The circuit and its inverse should return to |0⟩.
LUCJ Ansatz¶
Chemistry ansatz for quantum chemistry applications. Reference: arXiv:2511.22476
QAOA¶
Quantum Approximate Optimization Algorithm for combinatorial optimization.
Mock Backends¶
The benchmarks use mock backends simulating real IBM processors:
| Backend | Qubits | Topology | Generation |
|---|---|---|---|
| IBM Heron R1 | 133 | Heavy-hex | 2023 |
| IBM Heron R2 | 156 | Heavy-hex | 2024 |
| IBM Nighthawk | 120 | Square lattice | 2025 |
Running Benchmarks¶
Results are saved to benchmarks/results/ with timestamps.
Custom Output Directory¶
Result Format¶
{
"benchmark_suite": "Enhanced Quantum Backend Selector",
"timestamp": "2026-01-07T01:05:48.123456",
"results": [
{
"name": "GHZ-5",
"circuit_metrics": {
"num_qubits": 5,
"depth": 6,
"num_nonlocal_gates": 4
},
"selection_time_seconds": 0.543,
"rankings": [
{
"rank": 1,
"backend": "ibm_nighthawk",
"score": -0.007466,
"error_percent": 0.747
}
]
}
]
}
Metrics Collected¶
Circuit Metrics:
num_qubits: Number of qubitsdepth: Circuit depthnum_nonlocal_gates: Two-qubit gate count
Performance Metrics:
selection_time_seconds: Time to select backendscore: Backend score (negative error)error_percent: Expected error percentage
Adding New Benchmarks¶
- Add circuit function to
benchmarks/circuits/benchmark_circuits.py:
def create_new_circuit(num_qubits: int) -> QuantumCircuit:
qc = QuantumCircuit(num_qubits, name="NewCircuit")
# Add gates
qc.measure_all()
return qc
- Export in
benchmarks/circuits/__init__.py - Add to suite in
benchmarks/run_benchmarks.py