Skip to main content
QCOS™ QEC Stack

Quantum Error Correction for production clouds

From stabilizer algebra to fault-tolerant certification — validated on the QCOS CPU state-vector simulator.

A complete QEC middleware that implements generalized bicycle QLDPC codes targeting sub-10⁻¹² logical error rates, BP+OSD decoding, Pauli-based computation compilation, and SHA-256-sealed fault-tolerant isolation certificates — all tested end-to-end on the QCOS CPU state-vector simulator.

Validated on

CPU state-vector simulatorQLDPC-ready
≤ 24
Qubits Simulated
QCOS CPU state-vector simulator
SHA-256
Content Hash
Seal on each certificate record

A QEC layer between quantum backends and fault-tolerant computing

Raw qubit access does not include the QEC middleware needed for fault tolerance. Without it, there is no tenant isolation, no transparent error correction, and no verifiable certification that a computation ran within FT guarantees.

No tenant isolation

Errors in one logical computation can propagate to another tenant's qubits on shared hardware.

No transparent QEC

Application developers shouldn't need to manage syndrome extraction, decoding, and correction manually.

No certification

No sealed record of the conditions under which a computation executed.

Six modules. One integrated stack.

~4,200 lines of Python covering the full pipeline from symplectic Pauli algebra to SHA-256-sealed fault-tolerant certificate records.

Stabilizer Algebra

stabilizer.py — 803 lines

Symplectic Pauli operator representation over GF(2). CHP-style stabilizer tableau for efficient state simulation. Commutation checking, tensor products, and GF(2) row reduction — no external finite-field libraries.

  • PauliOperator (frozen, symplectic)
  • StabilizerGroup (commutativity validation)
  • StabilizerTableau (CHP simulation)
  • GF(2) row reduction & null-space

Code Library

codes.py — 721 lines

Repetition, Surface, generalized bicycle (GB) and bivariate bicycle (BB) QLDPC codes — a code family targeting logical error rates below 10⁻¹² (analytical design target, not a hardware measurement). Catalog includes codes up to [[288, 12, 18]].

  • RepetitionCode [[n, 1, n]]
  • SurfaceCode [[d², 1, d]]
  • GeneralizedBicycleCode (QLDPC)
  • BB catalog: [[72,12,6]] → [[288,12,18]] (Bravyi et al., 2024)

BP+OSD Decoder

decoder.py — 621 lines

Two-stage decoder pipeline: belief propagation (min-sum or sum-product) on the Tanner graph, with ordered-statistics decoding (OSD-0/w) fallback. Converges in 1–2 iterations for all tested codes.

  • Min-sum & sum-product BP
  • OSD-0 and OSD-w fallback
  • 1–2 iteration convergence
  • Tanner-graph message passing

Syndrome Extraction

syndrome.py — 347 lines

Automated Qiskit circuit synthesis for any QuantumCode. Builds X-check and Z-check sub-circuits with ancilla allocation, measurement, and majority-vote syndrome decoding from shot statistics.

  • Automatic circuit synthesis
  • X/Z check sub-circuits
  • Ancilla management
  • Majority-vote decoding

PBC Compiler

pbc.py — 865 lines

Pauli-based computation compiler that separates Clifford operations (tracked classically via symplectic frame) from non-Clifford T gates (requiring quantum execution).

  • Clifford frame tracking (Sp(2n,F₂))
  • Magic state injection
  • Classical Clifford tracking
  • T-count preservation (100%)

FT Isolation Certifier

ft_isolation.py — 762 lines

Fault-tolerant isolation certification with 6 levels (physical → logical → sealed). Issues a certificate record per execution, sealed with a SHA-256 content hash, with syndrome leakage rates and logical error bounds.

  • 6 isolation levels
  • SHA-256 content hash
  • Syndrome leakage tracking
  • Tamper-evident seal

Module dependency graph

stabilizer.py ──▶ codes.py ──▶ syndrome.py ──▶ decoder.py
                     │              │
                     ▼              ▼
                  pbc.py      ft_isolation.py
Next-Generation QLDPC

Bicycle QLDPC Codes

Generalized bicycle (GB) and bivariate bicycle (BB) codes are quantum low-density parity-check codes; the BB codes in the catalog are those of Bravyi et al., Nature 627, 778 (2024), including the [[144, 12, 12]] gross code. They target logical error rates below 10⁻¹² with fewer physical qubits than traditional surface codes. These are analytical design targets, not hardware measurements.

The surface code bottleneck

  • Surface codes require d² physical qubits per logical qubit — 1,000+ for useful error rates
  • No built-in Clifford optimization — every gate runs on hardware
  • No cryptographic certification of fault-tolerant execution

The QCOS QEC approach

  • Bicycle QLDPC codes encode k logical qubits in one block: [[144, 12, 12]] holds 12 at distance 12
  • BP+OSD decoder: belief propagation with an ordered-statistics fallback
  • PBC compiler tracks Cliffords classically — only non-Clifford T gates need quantum execution
  • Every execution receives a fault-tolerance certificate record sealed with a SHA-256 content hash
CapabilityTraditional ApproachQCOS QEC StackAdvantage
Code familySurface codes (high overhead)GB QLDPC (low-density parity-check)Up to 10× fewer physical qubits
Qubit overheadd² physical per logical qubit2m physical for k logical qubitsSub-linear scaling with distance
Logical error rate~10⁻⁶ at d=5Target <10⁻¹² at [[144,12,12]] (analytical, not measured)Up to 6 orders of magnitude lower, as a design target
Clifford executionRun on quantum hardwareTracked classically via PBCOnly non-Clifford T gates need quantum execution
FT certificationNot providedSHA-256 content hash per executionAudit-ready records built in

QCOS QLDPC Code Catalog

CodeParametersn/2Qubits (+ anc)Status
gb_8_2_2[[8, 2, 2]]416Simulator validated (test fixture)
gb_10_2_3[[10, 2, 3]]520Simulator validated (test fixture)
bb_72_12_6[[72, 12, 6]]36144Unit tested
bb_144_12_12[[144, 12, 12]]72288Unit tested
bb_288_12_18[[288, 12, 18]]144576Unit tested

Bicycle codes take H_X = [A | B] and H_Z = [Bᵀ | Aᵀ] with A, B in a commutative group algebra: F₂[Z_m] for GB codes, F₂[Z_ℓ × Z_m] for BB codes. Then H_X · H_Zᵀ = AB + BA = 0, so the CSS condition holds by construction.

Simulator Validated

End-to-end simulator validation

The full pipeline — circuit synthesis → CPU state-vector execution → syndrome extraction → BP decoding → PBC compilation → FT certification — runs on the QCOS CPU state-vector simulator (≤ 24 qubits).

Simulation Setup

Platform
QCOS
Backend
CPU state-vector simulator
Qubit limit
≤ 24 qubits
Circuit SDK
Qiskit

Execution Paths

CPU state-vector

≤ 24 qubits

Trapped-ion

BYO credentials

Superconducting

BYO credentials

Neutral-atom

BYO credentials

Simulator results — Illustrative sample, not a real execution record

CodeParamsQubitsSyndromeDecoderFT Cert
Repetition-3[[3, 1, 3]]5CleanBP (1 iter)Verified
Surface-3[[9, 1, 3]]18CleanBP (1 iter)Verified
GB [[8,2,2]][[8, 2, 2]]16CleanBP (1 iter)Verified

Error Injection & Correction Validation

Rep-3

InjectedX on q₁
Before[0,0]
After[1,0]
Corrected✓ Yes

Rep-5

InjectedX on q₂
Before[0,0,0,0]
After[0,0,0,0]
Corrected✓ Yes

GB-8

InjectedX on q₄
Before[0,0,0,0]
After[1,0,0,1]
Corrected✓ Yes

GB-10

InjectedX on q₅
Before[0,0,0,0,0]
After[1,1,1,0,1]
Corrected✓ Yes

Six levels of fault-tolerant isolation

From individual qubit separation to SHA-256-sealed logical isolation records. Each execution produces a certificate record with a SHA-256 content hash.

L0PHYSICAL_QUBIT

Individual qubit spatial separation

L1PHYSICAL_ZONE

Guard qubits between tenant zones

L2PHYSICAL_DEVICE

Separate cryostats / ion traps

L3LOGICAL_BASIC

QEC active, bounded error rate

L4LOGICAL_CERTIFIED

Syndrome verification passed

L5LOGICAL_ATTESTED

SHA-256 sealed, tamper-evident

Sample certificate records — Illustrative sample, not real execution records

Repetition-3✓ Verified
Surface-3✓ Verified
GB [[8,2,2]]✓ Verified

Cliffords tracked classically, T gates executed

The PBC compiler tracks Clifford operations classically via a symplectic frame — only T gates and measurements require actual quantum execution. In FTQC architectures, Clifford gates are "free" but T gates cost magic state distillation. Our compiler makes this explicit.

100%

T-count preservation

No T-count overhead

1

Measurement depth

All T gates parallelized

Pauli-Based Computation Pipeline

Input Circuit

H, CNOT, S, T gates

Clifford Frame Tracking

Classical Sp(2n,F₂) simulation

Magic State Injection

T gates → distillation circuits

PBC Program Output

Only measurements + corrections

✓ FT
Classical (free)Quantum (costly)Certified output

Built for QCOS integration

The QEC stack plugs directly into the QCOS operating system as the error correction middleware layer.

Multi-Tenant Isolation

Each tenant gets an isolated logical zone with guaranteed physical qubit separation and an FT certificate record with a SHA-256 content hash.

Transparent QEC

Applications submit logical circuits. Code selection, syndrome scheduling, decoding, and correction happen automatically.

Pricing Metrics

T-count, Clifford savings and measurement depth are reported as resource metrics for each run.

Fault-tolerant quantum computing starts here

The QEC stack is built for fault-tolerant workflows. Validated on the QCOS CPU state-vector simulator (≤ 24 qubits).

Technical resources:

White paper (PDF)API documentationIllustrative sample certificate (JSON)

Stay updated on QCOS QEC

Get the latest on QEC stack releases, simulator validation results, and fault-tolerant computing research.