Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
8609a87
Port doc layout scaffolding from releases/v0.7.0
melody-ren Jul 31, 2026
2936bf1
Split introduction.rst into the components/qec folder (release layout)
melody-ren Jul 31, 2026
dfba859
Move the gamma-ensemble study into a Performance Studies section
melody-ren Jul 31, 2026
8237487
Reorganize the QEC examples into the release layout (main content)
melody-ren Jul 31, 2026
913702e
Add redirects for the example pages merged/moved on main
melody-ren Jul 31, 2026
a98fd9d
Apply the release's Realtime naming and reference notes to the api pages
melody-ren Jul 31, 2026
45fa4f0
Keep the Realtime Enabled column in the decoder catalog for main
melody-ren Jul 31, 2026
dec5c70
Link the realtime leaf pages into the new structure
melody-ren Jul 31, 2026
7215026
Fix realtime API anchor placement and point app_examples link at main
melody-ren Jul 31, 2026
5e61f65
Fetch git-LFS objects in the docs publish workflow
melody-ren Aug 3, 2026
1887356
Merge branch 'main' into melodyr/updating_doc_layout
melody-ren Aug 3, 2026
51296ad
Add the realtime_decoding_demo example in the restructured layout
melody-ren Aug 3, 2026
afe28d1
Add versioning to docs (#761)
anjbur Aug 3, 2026
e90bcc2
Merge remote-tracking branch 'upstream/main' into melodyr/updating_do…
melody-ren Aug 4, 2026
cd568ed
Fix doc rendering: blank line before patch field list, LaTeX math rol…
melody-ren Aug 5, 2026
0c9ec1a
Merge remote-tracking branch 'upstream/main' into melodyr/updating_do…
melody-ren Aug 5, 2026
f9cd9fd
Merge remote-tracking branch 'upstream/main' into melodyr/updating_do…
melody-ren Aug 14, 2026
42e4de8
Add Dynamic DEM Construction concept subsection linking to the example
melody-ren Aug 14, 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
1 change: 1 addition & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
uses: actions/checkout@v4
with:
set-safe-directory: true
lfs: true

# ========================================================================
# CUDA Quantum build
Expand Down
6 changes: 6 additions & 0 deletions docs/sphinx/_static/cudaq_override.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ max-width: 1240px !important;
code.code span.pre, code.cpp span.pre, code.docutils span.pre{
color: darkgreen;
}

/* Render the general index in a single column instead of the theme's multi-column layout */
table.genindextable td {
display: block;
width: 100% !important;
}
2 changes: 1 addition & 1 deletion docs/sphinx/api/qec/chromobius_api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. class:: chromobius

A decoder for color codes built on the open-source
`Chromobius <https://github.com/quantumlib/chromobius>`_ Mobius decoder.
`Chromobius <https://github.com/quantumlib/chromobius>`_ Möbius decoder.
Unlike the matrix-based decoders, Chromobius is *detector-error-model native*:
it is constructed directly from Stim detector-error-model (DEM) text and
predicts logical observable flips directly.
Expand Down
6 changes: 4 additions & 2 deletions docs/sphinx/api/qec/cpp_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ Chromobius Decoder

.. include:: chromobius_api.rst

Real-Time Decoding
==================
.. _cpp_realtime_decoding_api:

Realtime Decoding
=================

.. include:: cpp_realtime_decoding_api.rst

Expand Down
7 changes: 2 additions & 5 deletions docs/sphinx/api/qec/cpp_realtime_decoding_api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
.. _cpp_realtime_decoding_api:


The Real-Time Decoding API enables low-latency error correction on quantum hardware by allowing CUDA-Q quantum kernels to interact with decoders during circuit execution. This API is designed for use cases where corrections must be calculated and applied within qubit coherence times.
The Realtime Decoding API enables low-latency error correction on quantum hardware by allowing CUDA-Q quantum kernels to interact with decoders during circuit execution. This API is designed for use cases where corrections must be calculated and applied within qubit coherence times.

The real-time decoding system supports simulation environments for local testing and hardware integration (e.g., on
`Quantinuum's Helios QPU
Expand Down Expand Up @@ -47,7 +44,7 @@ The configuration API enables setting up decoders before circuit execution. Deco
Helper Functions
----------------

Real-time decoding requires converting matrices to sparse format for efficient decoder configuration. The following utility functions are essential:
Realtime decoding requires converting matrices to sparse format for efficient decoder configuration. The following utility functions are essential:

- :cpp:func:`cudaq::qec::pcm_to_sparse_vec` for converting a dense PCM to a sparse PCM.
- :cpp:func:`cudaq::qec::pcm_from_sparse_vec` for converting a sparse PCM to a dense PCM.
Expand Down
40 changes: 38 additions & 2 deletions docs/sphinx/api/qec/python_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ Decoder Interfaces

.. autofunction:: cudaq_qec.get_decoder

.. note::
**scipy.sparse interop** — :func:`cudaq_qec.get_decoder` and
:class:`cudaq_qec.Decoder` accept a ``scipy.sparse`` matrix (CSR, CSC,
COO, or any other ``scipy.sparse`` format) as the parity-check matrix
``H``. This is the preferred form for large PCMs because no dense
``rows x cols`` allocation is made — the matrix is normalised to CSR
internally. Dense NumPy ``uint8`` arrays remain supported.
The PCM utilities :func:`cudaq_qec.reorder_pcm_columns`,
:func:`cudaq_qec.shuffle_pcm_columns`, and
:func:`cudaq_qec.pcm_to_sparse_vec` also accept SciPy sparse matrices
without creating a dense ``cudaqx::tensor``. Reordering and shuffling a
sparse input returns a ``scipy.sparse.csc_matrix``; a dense input continues
to return a NumPy array.

``scipy`` is an optional dependency; if it is not installed, pass a dense
NumPy array instead.

Built-in Decoders
=================

Expand Down Expand Up @@ -120,8 +137,10 @@ Chromobius Decoder

.. include:: chromobius_api.rst

Real-Time Decoding
==================
.. _python_realtime_decoding_api:

Realtime Decoding
=================

.. include:: python_realtime_decoding_api.rst

Expand All @@ -133,6 +152,23 @@ Common
.. autofunction:: cudaq_qec.x_sample_memory_circuit
.. autofunction:: cudaq_qec.z_sample_memory_circuit

.. _syndrome_measurement_layout:

.. note::
**Syndrome measurement layout** — ``sample_memory_circuit`` returns a tuple
``(syndromes, data)``. The ``syndromes`` tensor has shape
``(num_shots, num_detectors)`` with columns laid out as ``[ B S S … S B ]``:

- ``B`` (boundary block) = ``code.get_num_z_stabilizers()`` for Z-basis
preparations (``prep0``/``prep1``), or ``code.get_num_x_stabilizers()`` for
X-basis preparations (``prepp``/``prepm``).
- ``S`` (inter-round block) = ``num_z_stabilizers + num_x_stabilizers``
detectors per round transition (``num_rounds - 1`` blocks total).
- Total: ``num_detectors = 2*B + (num_rounds - 1)*S``.

The ``data`` tensor has shape ``(num_shots, block_size)`` and holds the final
data-qubit measurements used to verify logical-state preservation.

.. autofunction:: cudaq_qec.sample_code_capacity

.. _dem_sampling_python_api:
Expand Down
7 changes: 2 additions & 5 deletions docs/sphinx/api/qec/python_realtime_decoding_api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
.. _python_realtime_decoding_api:


The Real-Time Decoding API enables low-latency error correction on quantum hardware by allowing CUDA-Q quantum kernels to interact with decoders during circuit execution. This API is designed for use cases where corrections must be calculated and applied within qubit coherence times.
The Realtime Decoding API enables low-latency error correction on quantum hardware by allowing CUDA-Q quantum kernels to interact with decoders during circuit execution. This API is designed for use cases where corrections must be calculated and applied within qubit coherence times.

The real-time decoding system supports simulation environments for local testing and hardware integration (e.g., on
`Quantinuum's Helios QPU
Expand Down Expand Up @@ -180,7 +177,7 @@ Configuration Functions
Helper Functions
----------------

Real-time decoding requires converting matrices to sparse format for efficient decoder configuration. The following utility functions are essential:
Realtime decoding requires converting matrices to sparse format for efficient decoder configuration. The following utility functions are essential:

.. py:function:: cudaq_qec.pcm_to_sparse_vec(pcm)

Expand Down
5 changes: 2 additions & 3 deletions docs/sphinx/api/qec/tensor_network_decoder_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
decoder. Use `pip install cudaq-qec[tensor-network-decoder]` in order to use
this decoder.

The Tensor Network Decoder has the same GPU support as the `Quantum Low-Density Parity-Check Decoder <https://nvidia.github.io/cudaqx/components/qec/introduction.html#quantum-low-density-parity-check-decoder>`__.
The Tensor Network Decoder has the same GPU support as the :ref:`Quantum Low-Density Parity-Check Decoder <qldpc_decoder>`.
However, if you are using the V100 GPU (SM70), you will need to pin your
cuTensor version to 2.2 by running `pip install cutensor_cu12==2.2`. Note
that this GPU will not be supported by the Tensor Network Decoder when
CUDA-Q 0.5.0 is released.
that this GPU is not supported by the Tensor Network Decoder.

.. note::
It is recommended to create decoders using the `cudaq_qec` plugin API:
Expand Down
Loading
Loading