Skip to main content
Quantum error correction

From a code to a correction in one call

QCOS builds an error-correcting code, extracts its syndrome on a simulator and decodes it with belief propagation plus ordered-statistics decoding (BP+OSD). One request returns the code, the syndrome and the correction, so you can check each step.

Codes
Repetition, surface, bivariate bicycle
Decoder
BP+OSD
Errors
Injected on a simulator

The problem

A syndrome says something went wrong, not what

An error-correcting code spreads logical qubits across many physical ones. Measuring its checks gives a syndrome, and a decoder has to infer the most likely error from it before the next round.

On low-density parity-check (LDPC) codes, belief propagation is fast but does not always converge. Ordered-statistics decoding resolves the cases it leaves open, which is why BP+OSD is a common choice for these codes.

  • Codes you can name

    Choose a family and a distance, or a published code from the catalogue.

  • A syndrome you can inspect

    The response lists the data and ancilla qubits and every check that fired.

  • A correction you can verify

    The residual syndrome shows whether the correction explains what was measured.

Fig. 02 · Code lattice

The pipeline

Four stages in one request

  1. 01

    Build the code

    Set code_family to repetition, surface or generalized_bicycle with a code_distance from 3 to 99, or name a code from the catalogue.

  2. 02

    Extract the syndrome

    QCOS builds the syndrome-extraction circuit and samples it on a simulator with your shot count, up to 100,000. You can inject an error on a chosen qubit first.

  3. 03

    Decode

    BP+OSD infers a correction from the syndrome. The pipeline decodes bit-flip (X) errors from the Z-type checks.

  4. 04

    Check

    The correction is applied to the syndrome. A residual syndrome of all zeros means the correction accounts for every check that fired.

The API call

A distance-3 surface code with one injected error

This request builds a distance-3 surface code, flips data qubit 4 with an X error, extracts the syndrome from 1,024 shots and decodes it. Authenticate with your QCOS API key in the X-API-Key header.

Requestbash
curl -X POST https://api.softquantus.com/api/v1/qec/pipeline \
  -H "X-API-Key: $QCOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code_family": "surface",
    "code_distance": 3,
    "shots": 1024,
    "inject_error": { "type": "x", "qubit": 4 }
  }'

The answer

Two checks fire, one qubit is corrected

An abridged response from one run of the QCOS code now in production, on a CPU simulator, on 10 October 2026. The X error on qubit 4 fires two of the four Z-type checks. BP+OSD converges in one iteration on a weight-1 correction of that same qubit, and the residual syndrome is all zeros.

Response, abridgedjson
{
  "code": { "n": 9, "k": 1, "d": 3 },
  "syndrome": {
    "n_data_qubits": 9,
    "n_ancilla_qubits": 8,
    "total_qubits": 17,
    "z_syndrome": [1, 0, 0, 1],
    "has_errors": true
  },
  "decoder_result": {
    "decoder": "bp_osd",
    "status": "bp_converged",
    "converged": true,
    "correction": [0, 0, 0, 0, 1, 0, 0, 0, 0],
    "correction_weight": 1,
    "residual_syndrome": [0, 0, 0, 0],
    "iterations": 1
  }
}

Catalogue

Bivariate bicycle codes from the literature

QCOS builds these codes from its catalogue. They are the bivariate bicycle codes published by Bravyi et al. in Nature 627, 778 (2024), each encoding 12 logical qubits.

Code [[n, k, d]]Physical qubitsLogical qubitsDistance
[[72, 12, 6]]72126
[[144, 12, 12]]1441212
[[288, 12, 18]]2881218

QCOS checks n and k when it builds each code. The distance d is the published value; QCOS does not recompute it. Syndrome simulation for these codes is not shown on this page.

Limits

What this does not show

Simulated errors only

Errors are injected and syndromes sampled on a CPU simulator. No decoding of data from quantum hardware is shown.

No error rates or thresholds

This page reports single decoding runs. It publishes no logical error rate, threshold or decoding latency.

X errors in the pipeline

The pipeline decodes bit-flip errors from the Z-type checks. Phase-flip errors are not decoded in the same call.

One decoder in the pipeline

The pipeline always uses BP+OSD. The decoder field of the request does not change it.

Published distances

Catalogue distances come from the publication, not from a computation in QCOS.

Values vary

Syndromes are sampled from shots, so a run with noise or a different code can give a different syndrome.

Questions

What QEC researchers ask first

Which decoder does QCOS use?

The pipeline uses BP+OSD: belief propagation first, with ordered-statistics decoding when belief propagation does not settle on a correction that explains the syndrome.

Can I choose the decoder or its settings?

Not in the pipeline. A separate decoder endpoint takes a syndrome for a code created in QCOS and lets you choose BP, OSD or BP+OSD, an OSD order from 0 to 10 and a channel error rate up to 0.5.

Does this decode data from quantum hardware?

No. Syndromes on this page come from a simulator. Access to quantum hardware through Softquantus Cloud is in development.

What are bivariate bicycle codes?

Quantum LDPC codes built from two commuting cyclic shifts. They encode several logical qubits in far fewer physical qubits than a surface code of similar distance, which is why they are studied for quantum memory.

Bring a code and a noise question

Tell us the code family, the distance and the errors you care about. We will show what the QCOS pipeline decodes today and where it stops.