Quantum systems should improve through a continuous optimization loop. The loop includes hardware calibration, compiler policy, scheduling, algorithm design, mitigation, and user workflow.
The field is moving too quickly for static best practices. A platform must learn from every run.
6.1 The optimization flywheel
Each execution produces data. That data should improve future compilation, scheduling, calibration, and algorithm selection.
View diagram source
flowchart LR
Run[Run workload] --> Capture[Capture raw counts and metadata]
Capture --> Evaluate[Evaluate quality and uncertainty]
Evaluate --> Learn[Update models and policies]
Learn --> ImproveCompiler[Improve compiler choices]
Learn --> ImproveCalibration[Improve calibration strategy]
Learn --> ImproveScheduler[Improve backend scoring]
Learn --> ImproveAlgorithms[Improve circuit ansatz / parameters]
ImproveCompiler --> Run
ImproveCalibration --> Run
ImproveScheduler --> Run
ImproveAlgorithms --> RunThe flywheel only works if metadata is complete. Missing metadata turns execution into anecdote.
6.2 Optimize the right layer
Poor results can originate in many layers. Fixing the wrong layer wastes machine time.
| Symptom | Likely layer | First investigation |
|---|---|---|
| Distribution differs from simulator even for shallow circuit | Hardware / readout | Run calibration and simple benchmarks |
| Compiled circuit much deeper than expected | Compiler / topology | Inspect routing and layout |
| Hybrid optimizer stalls | Algorithm / statistics | Check shot noise and optimizer sensitivity |
| Good result on one backend, bad on another | Hardware fit | Compare topology and native gates |
| Results drift over time | Calibration / environment | Compare calibration snapshots |
| Mitigated estimate unstable | Mitigation / shot budget | Inspect variance amplification |
6.3 Benchmark suites
A quantum platform needs benchmark suites at multiple levels.
View diagram source
flowchart TD
Benchmarks[Benchmark portfolio] --> Device[Device characterization]
Benchmarks --> Compiler[Compiler regression tests]
Benchmarks --> Workload[Application workload kernels]
Benchmarks --> User[User-facing acceptance tests]
Device --> Metrics[Quality metrics]
Compiler --> Metrics
Workload --> Metrics
User --> Metrics
Metrics --> ReleaseGate[Release and admission gates]A single benchmark is dangerous. It invites overfitting. The portfolio should include small diagnostic circuits, topology-sensitive circuits, algorithm kernels, and full application workflows.
6.4 Compiler optimization loop
Compiler changes should be treated like production changes. They can improve one workload and damage another.
A safe compiler release process includes:
- run benchmark circuits through old and new compiler versions,
- compare depth, two-qubit count, idle time, topology use, and estimated error exposure,
- execute a representative subset on hardware,
- compare output quality and uncertainty,
- roll out by workload class rather than globally when needed.
View diagram source
flowchart LR
NewPass[New compiler pass] --> SimBench[Simulation benchmark]
SimBench --> Metrics{Metrics acceptable?}
Metrics -- no --> Revise[Revise pass]
Revise --> NewPass
Metrics -- yes --> HWBench[Hardware benchmark]
HWBench --> Quality{Quality acceptable?}
Quality -- no --> Revise
Quality -- yes --> Canary[Canary rollout]
Canary --> Release[General availability]The compiler is part of the production stack. It deserves release gates.
6.5 Calibration optimization loop
Calibration consumes QPU time. More calibration is not automatically better. The goal is to calibrate the right things at the right time.
A mature platform can use adaptive calibration:
- recalibrate frequently drifting parameters more often,
- skip stable checks when confidence is high,
- prioritize calibrations that affect queued workloads,
- trigger diagnostics from workload anomalies,
- maintain fallback snapshots when new calibration degrades quality.
View diagram source
flowchart TD
Telemetry[Telemetry stream] --> Drift{Drift detected?}
Drift -- no --> Predict[Predict next calibration need]
Drift -- yes --> Impact[Estimate workload impact]
Impact --> Critical{Critical?}
Critical -- yes --> Immediate[Run immediate calibration]
Critical -- no --> Batch[Batch into next maintenance window]
Predict --> Batch
Immediate --> Validate[Validate against benchmarks]
Batch --> Validate
Validate --> Publish{Improves quality?}
Publish -- yes --> NewSnapshot[Publish snapshot]
Publish -- no --> Rollback[Keep previous snapshot and investigate]6.6 Scheduling optimization loop
Scheduling should optimize for result quality, not only utilization. A fully utilized QPU that mostly runs low-value jobs is not a good system.
Scheduling inputs should include:
- queue age,
- calibration validity,
- backend quality,
- workload sensitivity,
- user priority,
- expected runtime,
- opportunity cost of maintenance,
- similarity to recent failures.
6.7 Application optimization loop
Quantum applications often improve by changing the problem encoding rather than merely tuning the backend.
Application levers include:
| Lever | Effect |
|---|---|
| Ansatz design | Changes expressivity and trainability |
| Observable grouping | Reduces measurement settings; shot savings depend on covariance, basis changes, and noise |
| Symmetry exploitation | Reduces search space or validates results |
| Problem decomposition | Fits smaller devices |
| Classical preconditioning | Reduces quantum workload burden |
| Parameter initialization | Improves optimizer behavior |
A strong team will often get more benefit from better encoding than from waiting for a slightly better backend.
6.8 Continuous optimization dashboard
A useful dashboard is organized by decisions, not vanity metrics.
View diagram source
flowchart TB
Dashboard[Quantum operations dashboard] --> Admit[Should this job run?]
Dashboard --> Backend[Which backend should run it?]
Dashboard --> Calibrate[What needs calibration?]
Dashboard --> Compile[Which compiler policy wins?]
Dashboard --> Mitigate[Which mitigation strategy is valid?]
Dashboard --> Improve[What should be improved next?]For each decision, the dashboard should show supporting metrics, recent trends, and confidence.
6.9 Optimization anti-patterns
Anti-pattern: maximizing qubit count
The useful metric is not raw qubit count. It is workload-relevant quality under current operating conditions.
Anti-pattern: treating each run as independent
Runs are correlated through calibration state, compiler version, backend conditions, and workload design.
Anti-pattern: optimizing against one benchmark
A single metric can be gamed unintentionally. Use a benchmark portfolio.
Anti-pattern: hiding failed runs
Failures are training data for the operating system. Hiding them slows improvement.
6.10 Operator checklist
- Store complete metadata for every run.
- Maintain benchmark suites at device, compiler, and application levels.
- Gate compiler releases with hardware-relevant metrics.
- Use adaptive calibration rather than fixed ritual alone.
- Optimize scheduling for quality-adjusted throughput.
- Track uncertainty and confidence trends over time.
- Treat failed runs as diagnostic assets.
6.11 Chapter summary
Continuous optimization is how a quantum platform becomes better. Every run should improve models of the device, compiler, scheduler, calibration process, and application workflow. The winning platforms will not merely own better qubits. They will learn faster from the qubits they have.
Additional technical sources: [R253].