Skip to content

docs(qec): misc docs updates#744

Open
bmhowe23 wants to merge 4 commits into
NVIDIA:mainfrom
bmhowe23:bmh/docs-qec-0.7.0-decoder-gaps
Open

docs(qec): misc docs updates#744
bmhowe23 wants to merge 4 commits into
NVIDIA:mainfrom
bmhowe23:bmh/docs-qec-0.7.0-decoder-gaps

Conversation

@bmhowe23

Copy link
Copy Markdown
Collaborator

Description

Documentation-only change that closes several gaps for the 0.7.0 QEC release,
where new or existing decoder features were not reflected in the docs. No code
or behavior changes.

Decoders newly documented

  • PyMatching (MWPM) decoder — new API fragment pymatching_api.rst
    (error_rate_vec, merge_strategy and its five values, optional O
    observables matrix, matchable-graph requirement), wired into the Python and
    C++ "Built-in Decoders" lists, plus a tutorial section in decoders.rst.
  • Chromobius color-code decoder — new API fragment chromobius_api.rst
    (DEM-native construction from Stim DEM text, the "no parity-check matrix"
    restriction, ≤64-observable limit, and the five boolean options), wired into
    both API pages and decoders.rst.

Existing 0.7.0 features/options now documented

  • Surface-code orientation construction option (XV/XH/ZV/ZH, aliases
    O1O4, default ZH) with Python and C++ usage examples.
  • trt_decoder composite/global decoder chaining (global_decoder /
    global_decoder_params, including the "supply params — even empty — when
    global_decoder is set" caveat).
  • cuda_device_id placement knob added to the trt_decoder and
    nv-qldpc-decoder parameter tables.
  • Note that Python decode results are NumPy arrays as of 0.7.0
    (DecoderResult / BatchDecoderResult / AsyncDecoderResult).

All option names, values, and defaults were verified against the plugin
sources (pymatching.cpp, chromobius.cpp, surface_code.cpp, decoder.cpp,
trt_decoder.cpp, py_decoder.cpp).

This branch is based on main and is intended to be cherry-picked onto
releases/v0.7.0.

Runtime / performance impact

N/A — documentation only.

Self-review checklist

Before requesting review

  • I reviewed my own full diff in GitHub or my editor.
  • PR is in Draft if it is not yet ready for review.
  • Temporary / debugging changes have been removed.
  • Local test logs reviewed; no unexplained warnings or errors. (Docs build with sphinx -n -W --keep-going succeeds with zero warnings; the script's invalid-HTML checks pass.)
  • CI logs reviewed; no unexplained warnings or errors.
  • Full CI has been run.

Scope and size

  • PR is under ~1000 lines, or an exception is justified in the description.
  • Refactoring-only changes are isolated in their own PR(s).
  • No existing tests were disabled or modified just to make this PR pass.

Tests

  • New functionality has new tests. Documentation-only change; no code paths added.
  • Tests fail if the new functionality is broken. N/A (docs only).
  • Negative tests added where exceptions are expected. N/A (docs only).
  • Truth data added. N/A (docs only).
  • CI runtime impact considered; team notified if significant. (Docs-only; negligible.)

Documentation

  • Public-facing APIs have Doxygen docs.
  • User-visible behavior changes have public docs, or a follow-up is tracked.

Code style

  • Naming follows the existing convention for the area being modified. (reStructuredText; mirrors the existing *_api.rst fragment pattern.)

Dependencies

  • No new third-party dependencies.

🤖 Generated with Claude Code

…der options

Close several documentation gaps for the 0.7.0 QEC release:

- Add dedicated API fragments for the PyMatching (MWPM) and Chromobius
  color-code decoders and wire them into the Python and C++ "Built-in
  Decoders" lists; add matching tutorial sections in decoders.rst.
- Document the surface-code `orientation` construction option
  (XV/XH/ZV/ZH, aliases O1-O4, default ZH) with usage examples.
- Note that Python decode results are NumPy arrays as of 0.7.0
  (DecoderResult / BatchDecoderResult / AsyncDecoderResult).
- Document `trt_decoder` composite/global decoder chaining
  (`global_decoder` / `global_decoder_params`, including the
  supply-params-when-set caveat) and the `cuda_device_id` placement
  knob on the trt and nv-qldpc decoder parameter tables.

All option names, values, and defaults verified against the plugin
sources. Docs build clean (sphinx -n -W, zero warnings).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Ben Howe <bhowe@nvidia.com>
@bmhowe23 bmhowe23 changed the title docs(qec): document PyMatching/Chromobius decoders and new 0.7.0 decoder options docs(qec): misc docs updates Jul 23, 2026
Comment thread docs/sphinx/api/qec/nv_qldpc_decoder_api.rst Outdated
Comment thread docs/sphinx/api/qec/chromobius_api.rst Outdated
Comment thread docs/sphinx/api/qec/pymatching_api.rst Outdated
@melody-ren

Copy link
Copy Markdown
Collaborator

Using this PR as a catch all place: I think decoder_context is not in the docs yet

bmhowe23 and others added 2 commits July 24, 2026 20:37
- Reword the cuda_device_id note (trt + nv-qldpc): when unpinned, the
  decoder runs on the default device (GPU 0) rather than a vague
  "current/default" device.
- Simplify the get_decoder intro note for the PyMatching and Chromobius
  fragments per review feedback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Ben Howe <bhowe@nvidia.com>
@bmhowe23

Copy link
Copy Markdown
Collaborator Author

Using this PR as a catch all place: I think decoder_context is not in the docs yet

I think it's actually already documented - it's under the Python casing DecoderContext (PascalCase vs snake_case as in many [but not all] of the Python vs C++ APIs). Coverage today:

  • Python: cudaq_qec.DecoderContext (with :members:) in api/qec/python_api.rst.
  • C++: cudaq::qec::decoder_context in api/qec/cpp_api.rst.

@bmhowe23
bmhowe23 requested a review from melody-ren July 24, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants