← Back to Dashboard

16. Error Correction

Stage C - Calibrated

3-qubit repetition code with 20-run calibration ensemble. 100% correction rate. 1.8k physical qubits.

Algorithm
3-Qubit Repetition Code
Logical Qubits
5
Framework
Modern QDK (qsharp 1.31.0)

Run Visualisation

Rendered from the committed estimate and simulator artifacts by the viz pipeline.

Error Correction: active, stage C. Estimated logical qubits: 18; physical qubits: 1746. Simulator histogram available. Logarithmic resource bars; sampled outcomes are separate kernel evidence, not quantum advantage. Bloch panel, returned bit 0 (zero-based result order): measurement-derived z polarization, z = -0.03, P(0) = 0.485, P(1) = 0.515. Diagonal-state representation; x/y unknown; drawn as 0 by convention. Phase unavailable; not state tomography.
What this image is not.
  • Resource estimates and sampled kernel outcomes describe different programs. Neither demonstrates quantum advantage; this is not a quantum-state animation.

Resource Estimation (Azure Quantum RE)

Physical Qubits
1.7k
Logical Qubits
18
T-Gates
Rotations
Runtime
7.3μs

Resource Breakdown

Calibration Evidence (20-Run Ensemble)

Mean Value
1.000
95% CI
undefined
Runs
20
Std Dev
0.000

Every run returned the same value. The interval is a normal approximation, which has zero width when the runs do not vary, so it does not bound the mean; it is left undefined rather than shown as ± 0.

Noise Resilience (Depolarizing Simulation)

Ideal outcome: [One] (52% probability)

p = 0.001
99.4%
p = 0.01
100.0%
p = 0.05
100.0%

Cross-Platform Emulator Results (100 shots)

Quantinuum H2-1E
[0]
56% of shots
Rigetti QVM
H2-1E Distribution

Troyer Utility-Scale Classification

Quantum Simulation (Native Advantage Potential)
Quantum Speedup
N/A infrastructure, not application
Classical Competitor
N/A
Honest Assessment (Troyer Framework)

QEC is enabling infrastructure, not an application. The repetition code demonstrates error detection but is not a path to utility. Surface codes and beyond are needed for fault-tolerant computation. See errorcorrectionzoo.org for comprehensive code taxonomy.

These two numbers describe different programs

The resource estimate below is for Main.RunRepetitionCodeCycle(false, 0), the algorithm at utility scale. The Azure Quantum runs executed QECKernel(), a small kernel sized to fit today's hardware. Qubit counts and runtimes from the estimate are not measurements of the run, and the run histogram is not a sample of the estimated circuit.

Multi-Model Resource Comparison

Physical qubit requirements across 6 qubit technologies × 2 QEC schemes (inspired by Troyer Architecture Series, Part 3).

■ Gate-based + Surface code (blue)
Qubit ModelQECPhysical QubitsLogical Qubits
Superconducting (ns, 1e-4)surface_code30618
Trapped Ion (μs, 1e-4)surface_code30618
Superconducting (ns, 1e-3)surface_code1,74618
Trapped Ion (μs, 1e-3)surface_code1,74618

Problem Documentation

Problem 16 · Quantum Error Correction

Overview

Fault-tolerant quantum computing demands error correction codes that suppress noisy qubit failures faster than they accumulate. This scaffold supplies a reproducible classical baseline for repetition-code style logical error analysis while standing up a Q# project that will ultimately host stabilizer simulations and surface-code primitives. By comparing physical error rates against logical failure probabilities we track where quantum error correction (QEC) begins to pay off.

Directory Layout


16_error_correction/
├── estimates/                       # JSON artifacts from classical / quantum workflows
├── instances/                       # Code distances and physical error-rate sweeps
├── plots/                           # Generated figures from analyze.py
├── python/
│   ├── classical_baseline.py        # Analytical repetition-code logical error model
│   └── analyze.py                   # Visualization of suppression factors and pseudo-thresholds
└── qsharp/
    ├── qsharp.json            # Modern QDK project file
    └── Program.qs                   # Stubbed quantum workflow

Quick Start


cd problems/16_error_correction

# Classical logical error analysis
python python/classical_baseline.py

# Plot logical error curves and suppression heatmaps
python python/analyze.py

# Quantum placeholder (uses modern QDK  qsharp Python package)
python -c "import qsharp; qsharp.init(project_root='qsharp'); print('Build OK')"
 python tooling/run_all_qsharp.py  # runs via qsharp Python package

Next Quantum Milestones

1. Stabilizer Simulation – Implement syndrome extraction cycles for repetition or surface codes.

2. Decoder Integration – Explore minimum-weight matching or belief propagation within Q#.

3. Resource Accounting – Track qubit counts, circuit depth, and ancilla demand per cycle.

4. Fault-Tolerant Benchmarks – Compare logical error suppression across physical noise models.

This scaffold keeps the analytical QEC baseline reproducible while we build toward full stabilizer simulations in Q#. 🛡️⚛️

Objective Maturity Gate

  • **Current gate**: **Stage C complete** (hardware-aware validation evidence in place: 3-qubit repetition code runnable, calibration ensemble across runs, backend assumptions documented, dual-model estimator profile, OpenQASM export, real Azure resource estimate captured).
  • **Next gate target**: Maintenance QEC is infrastructure not application; track surface-code/QLDPC roadmap rather than escalate the claim.

Stage C evidence references for this problem:

  • Calibration ensemble: `estimates/quantum_calibration_ensemble.json` and `estimates/calibration_evidence.json`.
  • Backend assumptions: `estimates/backend_assumptions.md`.
  • Estimator profile (ns-e3 + surface-code-generic): `estimates/estimator_profile_summary.md`, `estimates/latest_qubit_gate_ns_e3.json`, `estimates/latest_surface_code_generic_v1.json`.
  • Real Azure resource estimate: `estimates/real_resource_estimate_2026-03-25T091444Z.json`.
  • Cross-platform OpenQASM export: `estimates/repetition_code_3q.qasm`.
  • Azure smoke validation: `estimates/azure_smoke_report_small_d1.md`, `estimates/azure_job_manifest_small_d1.json`.

DiVincenzo Readiness (Stage C/D Overlay)

| Criterion | Status | Evidence / Notes |

|---|---|---|

| Scalable qubit system | partial | Problem-scoped instance baselines are in place; full hardware-scale projections are tracked as Stage C work. |

| Initialization | partial | Input/state initialization path is defined for current workflows, with backend-ready loading fidelity still to be hardened. |

| Coherence vs gate time | not-yet | Backend-calibrated coherence-vs-depth evidence is pending and required for Stage C/D promotion. |

| Universal gate set | partial | Q# scaffold/build path exists; gate-basis decomposition and transpilation evidence remain Stage C tasks. |

| Qubit-specific measurement | partial | Measurement outputs are defined for current validation flows; hardware readout characterization is pending. |

Advantage Claim Contract

  • **Claim category (current)**: `theoretical`.
  • **Problem class and regime**: Problem-specific challenge instances defined in this directory.
  • **Fair baseline**: Problem-local classical baseline in `python/` outputs.
  • **Quantum resource scaling claim**: Expected asymptotic advantage depends on algorithm family and implementation assumptions; no hardware-demonstrated speedup claim yet.
  • **Data-loading and I/O assumptions**: Must be documented alongside future advantage claims.
  • **Noise/error model assumptions**: Backend-specific model and calibration assumptions to be added at Stage C.
  • **Confidence/uncertainty method**: To be reported using shot-based confidence intervals or equivalent statistical bounds.
  • **Residual risks**: Oracle/state-preparation/transpilation overhead may dominate for near-term instance sizes.

Reproduce It

cd problems/16_error_correction make classical # Run classical baseline make analyze # Generate plots make build # Validate Q# compilation make run # Run Q# entry point

Key Files

  • qsharp/src/Main.qs Quantum algorithm implementation
  • qsharp/HardwareKernel.qs Azure-submittable QIR kernel
  • python/classical_baseline.py Classical reference implementation
  • estimates/classical_baseline.json Baseline metrics
View on GitHub →