Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
93b25ab
docs(qec): add standalone decoding server reference page
vedika-saravanan Jul 14, 2026
ec3881a
Merge upstream/main into decoding server documentation
vedika-saravanan Oct 16, 2026
66106d2
docs(qec): redesign the decoding server guide around Docker
vedika-saravanan Oct 16, 2026
5fdf291
docs(qec): provide complete decoding server example workflows
vedika-saravanan Oct 16, 2026
93958f2
style(qec): match package example test formatting
vedika-saravanan Oct 16, 2026
3c7f222
docs(qec): reuse the pinned color model checkout
vedika-saravanan Oct 16, 2026
a68e6ab
Merge upstream main into decoding server documentation
vedika-saravanan Oct 22, 2026
e106e90
docs(qec): validate decoding workflows against the NGC package
vedika-saravanan Oct 22, 2026
b6306fb
Merge SPDX header migration into decoding server documentation
vedika-saravanan Oct 22, 2026
168ac1d
docs(qec): adopt SPDX headers for package examples
vedika-saravanan Oct 22, 2026
3135a1b
docs(qec): explain circuit interaction with the packaged server
vedika-saravanan Oct 23, 2026
a90b5c2
Merge upstream main into decoding server documentation
vedika-saravanan Oct 26, 2026
5fe1418
docs(qec): accept completed playback final-readout events
vedika-saravanan Oct 26, 2026
f6d6108
Address PR review comments
vedika-saravanan Oct 27, 2026
59b5066
Merge branch 'main' into docs/decoding-server
vedika-saravanan Oct 27, 2026
315b2ed
docs(qec): clarify generator-to-server workflow
vedika-saravanan Nov 3, 2026
541a1e4
Merge branch 'main' into docs/decoding-server
vedika-saravanan Nov 3, 2026
9e90938
docs(qec): clarify decoding pipeline and fix API reference
vedika-saravanan Nov 3, 2026
d612e31
docs(qec): streamline decoding server user workflows
vedika-saravanan Nov 3, 2026
aad36c6
docs(qec): polish and compact decoding server workflow figure
vedika-saravanan Nov 3, 2026
d3ccd33
Merge main for playback documentation links
vedika-saravanan Nov 3, 2026
7085f06
docs(qec): address decoding server guide review
vedika-saravanan Nov 3, 2026
cc7b249
docs(qec): explain custom decoder plugin deployment
vedika-saravanan Nov 4, 2026
e360ddb
docs(qec): make custom plugin setup self-contained
vedika-saravanan Nov 5, 2026
77a070a
Merge branch 'main' into docs/decoding-server
vedika-saravanan Nov 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions docs/sphinx/_static/decoding-server-workflow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/sphinx/components/qec/decoders.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ basis; composition infrastructure uses ``decoder_output_request`` to request
standardized auxiliary outputs from a compatible decoder. See the PyMatching
API for the migration from its former ``O``-implies-observables behavior.

.. _qec-custom-decoder:

Implementing a New Decoder in C++
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
3 changes: 3 additions & 0 deletions docs/sphinx/components/qec/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ These types are meant to be extended by developers to provide new error correcti

The pages below document each of these interfaces in depth — the abstraction, how to extend it, and what ships built in. For runnable, copy-pasteable programs, see the :doc:`CUDA-Q QEC examples </examples_rst/qec/examples>`.

For configuration, client integration and examples, see the
:doc:`Decoding Server User Guide </examples_rst/qec/decoding_server>`.

.. toctree::
:maxdepth: 2

Expand Down
1 change: 1 addition & 0 deletions docs/sphinx/components/qec/realtime_decoding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ partial output file, which must be removed before retrying.
See Also
^^^^^^^^

* :doc:`Decoding Server User Guide </examples_rst/qec/decoding_server>`: configuration, playback and client integration
* :ref:`Pre-built QEC Decoders <prebuilt_qec_decoders>` — decoders available for realtime use
* :doc:`Realtime Decoding examples </examples_rst/qec/realtime_decoding>` — runnable end-to-end examples
* :doc:`Playback Emulator </examples_rst/qec/playback_emulator>` — replay timed decoder calls without a QPU
Expand Down
16 changes: 9 additions & 7 deletions docs/sphinx/examples/qec/color_code_demo/color_code_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@

# Shots in flight: shot i starts once shot i - DEPTH has its correction.
DEPTH = 4
# Playback requires a positive tick duration; use one microsecond.
PLAYBACK_TICK_NS = 1000
MEASURE_OPS = {"M", "MZ", "MX", "MY", "MR", "MRX", "MRY", "MRZ"}


Expand Down Expand Up @@ -244,12 +246,12 @@ def per_round(ler, rounds):

def run_checked(schedule, shots, **session):
"""Runs `schedule`; fails unless every shot returned its correction."""
result = pb.run(schedule, tick_ns=0, sources={}, **session)
gc = [r for r in result.records if r.op == pb.operation.get_corrections]
result = pb.run(schedule, tick_ns=PLAYBACK_TICK_NS, sources={}, **session)
records = result.records
gc = [r for r in records if r["op"] == "get_corrections"]
bad = [
str(r.status)
for r in gc
if str(r.status) != "OK" or r.correction_count == 0
str(r["status"]) for r in gc if r["status"] != 0 or
not r["read_completed"] or not r["correction_bits"]
]
if len(gc) != shots or bad:
raise RuntimeError("%d/%d corrections returned, failures: %s" %
Expand Down Expand Up @@ -320,8 +322,8 @@ def run_session(name, mdc, schedule, shots):
# Runtime per round: the time until the last reply, divided by
# the rounds decoded.
runtime = max(
r.return_ns for r in result.records) / 1e3 / args.shots / d
errors = sum(r.correction_mismatch for r in gc)
r["return_ns"] for r in result.records) / 1e3 / args.shots / d
errors = sum(r["correction_mismatch"] for r in gc)
# Per-round rate from the d-round rate, with a binomial error
# bar.
total = min(max(errors / args.shots, 0.5 / args.shots), 1 - 1e-12)
Expand Down
6 changes: 6 additions & 0 deletions docs/sphinx/examples/qec/decoding_server/memory_schedule.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Synthetic distance-3 Z-memory smoke test: 26 extraction rounds plus readout.
# Not sampled circuit data or an accuracy/performance benchmark.
0 reset
1 stream source=0b00000000 rounds=26 every=1
- enqueue_data source=0b000000000
- get_corrections 0 return_size=1
18 changes: 13 additions & 5 deletions docs/sphinx/examples_rst/qec/color_code_demo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ once per path between the emulator and the decoder (``session``):
:doc:`/examples_rst/qec/realtime_decoding_demo` serves the surface-code Ising
predecoder from ``decoding_server``, with syndromes sourced from a QPU kernel or an
FPGA. Here, the playback emulator replays the pre-sampled shots of the superdense color-code
memory circuit to every the decoder on a fixed timing loop using the playback emulator.
memory circuit to each decoder on a fixed timing loop.

For starting the prebuilt Docker server and connecting clients, see
:ref:`decoding-server-color-code`. The model preparation and benchmark on
this page require the software listed below.

Prerequisites
-------------
Expand Down Expand Up @@ -84,14 +88,18 @@ records:
- The LER per round: the fraction of shots whose correction differs from
Stim's true observable flip, converted to a per-round rate.

In the figure, grey is raw Chromobius and green is the Ising predecoder.
The generated figure uses grey for Chromobius and green for the Ising
predecoder. Points with no logical errors are not drawn. The figure below
shows example output from an earlier run with 100,000 shots per distance at
:math:`p = 0.001`.

.. image:: ../../../../assets/docs/color_code_demo.png
:align: center
:alt: Logical error rate per round versus runtime per round for raw Chromobius and the Ising predecoder, for distances 5 to 13, in process and over UDP
:alt: Example logical error rate per round versus runtime per round for Chromobius and the Ising predecoder, for distances 5 to 13, in process and over UDP

The figure above is from a run with the default options (100,000 shots per
distance at :math:`p = 0.001`). Points with no logical errors are not drawn.
Current runs use one-microsecond ticks; reported runtime includes scheduling,
transport, and decoding. Use the figure generated by your run when comparing
configurations.

The example source
------------------
Expand Down
Loading
Loading