Repository navigation
[Docs] Task Graph and Dynamic DEM documentation rewrite - #907
Merged
Merged
Conversation
…ages Rewrite the task graph user guide around the minimal user path, and add two pages: "Task Graph Parallel Window" and a "Task Graph Reference" for execution details. - User guide: sliding-window quick start, complete shots, streaming with a FINAL round, reading streaming results, multi-node graphs, node kinds, guarded windows, and async streaming. - Parallel window: how layers A and B commit rounds, model requirements, configuration, building in code, decoding a shot, serving through the decoding server, and the graph the pattern builds. - Reference: async options and defaults, fire pools, streaming results, staged outputs, edge values, native streaming nodes, arbitrary-length sliding windows, and ensembles. - Add block diagrams under assets/docs, a parallel_window YAML and its lowered form, and Python and C++ examples. A new test, DocsExamples.ParallelWindowYamlMatchesItsLowering, checks that the two YAMLs build the same windows and decode every single-qubit flip correctly. - Label the window requests, data_artifacts and the non-spec parallel-window options as provisional; cudaq-edem will replace them. Remove the experimental window types and data_artifact from the C++ API reference. - Fix the existing example's streaming section to end the shot with FINAL and read streaming_result(), and its per-round measurement count. - Add the missing task-graph classes to the Python API reference. Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
The dem_chunks model format stays when task graphs move to cudaq-edem: the EDEM library's chunk adapter accepts it. The tools that build models out of chunks do not: cudaq-edem and its composer replace them. Document only the format. - Rewrite the Dynamic DEM page: phases and connections, seam_specs (prev_round and next_round rows), the H_sparse shorthand, num_rounds, and the optional D_sparse, m2o_sparse and observable_names fields. The model comes from the tested parallel-window YAML. - Replace the dyn_dem Python and C++ examples: build the model as a DemChunksSpec and decode a shot with PyMatching. Both exit non-zero on a wrong correction. - Keep the spec types, SeamId, seam_name, phase_name and memory_dem_chunks_from_decoder_inputs in the API references. Remove the CSS-matrix functions, ExtendedDem, stitch/close/merge, PriorCombineMode, the unique-column checks, the dem_chunks_to_* maps and the compact chain forms. The code is unchanged. - Shorten the decoders guide section to a pointer, and ignore the doxygen links that now point at functions left out of the docs. Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
tlshannon
marked this pull request as ready for review
November 3, 2026 17:23
Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
…#898 Staged coverage now starts where clear_corrections() last consumed the value, and a streaming node can stream rounds of different widths when its decoder implements streaming_correction_provider. Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
Bring in NVIDIA#906's get_logical_measurements across the task graph pages. The example model now ends with a data-qubit readout and uses output: corrections_and_logical, so both results are shown and tested. Also drop the async closure caveat now that NVIDIA#912 is merged. Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
Correct the async enqueue_syndrome return value and the YAML mapping of decoder_type, mark C++-only helpers, and say when get_logical_measurements reads are refused or consume the shot. Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
The quick start said a streaming graph decodes once per round. It decodes only after its 3-round window fills, then once per round. Write the quick-start YAML as one node with window_size and step_size, point fixed-length shots to single_window, say which window from_spec picks, and fix the same claim in the example comments. Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
The guide's first figure XORed two decoder nodes named x and z, which read as adding corrections to unrelated observables. It now shows a predecoder that passes the detectors it did not explain to a global decoder, with an xor adding both nodes' corrections to the same observables. The figure labels each edge with what it carries rather than the xor's port names. The figure's YAML moves to a file that a new test loads, streams and checks. The reference page now points to the figure instead of repeating the same edges, and a test comment no longer says the docs show the x/z graph. Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
justinlietz
approved these changes
Nov 6, 2026
tlshannon
enabled auto-merge (squash)
November 6, 2026 18:13
Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
Native streaming nodes now report only the rounds their decoder has committed (NVIDIA#926). The reference page says when such a node publishes, what FINAL and a shot the decoder ends itself cover, and that several such nodes may feed one output. It drops the old claim that they cannot, and says when an output's generation advances with them. Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
…into task_graph_docs Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
Signed-off-by: Tracy Shannon <tshannon@nvidia.com>
melody-ren
disabled auto-merge
November 6, 2026 21:21
melody-ren
added a commit
to eliotheinrich/cudaq-qec
that referenced
this pull request
Nov 6, 2026
Resolve the documentation conflicts after PR NVIDIA#907 was squash-merged. Keep the ensemble API entries, navigation, and dedicated guide while retaining main's corrected native-streaming coverage documentation. Apply repository formatting to the changed Python configuration line and remove trailing whitespace from the ensemble guide. Signed-off-by: Melody Ren <melodyr@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites the decoding task graph docs from the user's point of view, adds a page for parallel-window decoding and a reference page, and trims the dynamic DEM docs to the
dem_chunksmodel format. Interfaces that thecudaq-edemlibrary and its composer will replace are either labelled provisional or left out of the API reference.Task graphs
FINALround, readingstreaming_result(), multi-node graphs, node kinds, guarded windows and async streaming.assets/docs/.parallel_windowYAML and its written-out form, plus Python and C++ examples. The existing example's streaming section now ends the shot withFINAL.windows:requests,data_artifactsand the non-spec parallel-window options. The experimental window types anddata_artifactare removed from the C++ API reference.TaskGraph*classes.Dynamic DEM
dem_chunksformat, which the EDEM chunk adapter will accept.DemChunksSpecand decode a shot.Testing
DocsExamples.ParallelWindowYamlMatchesItsLowering, checks that the two YAMLs build identical windows. It also checks that every single data-qubit flip in shots up to 40 rounds gets the correct correction from both graphs.task_graph_parallel_window,decoding_task_graphanddyn_demexamples (Python and C++) run and check their results.scripts/ci/test_examples.shpicks them up.