[Docs] Dem Sampling Docs, follow-up #479#511
Open
kvmto wants to merge 3 commits intoNVIDIA:mainfrom
Open
Conversation
Signed-off-by: kvmto <kmato@nvidia.com>
45db397 to
0636f23
Compare
Signed-off-by: kvmto <kmato@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.
This is a follow-up for #479
Summary
Adds comprehensive documentation for the
dem_samplingfeature across the Sphinx doc tree: API references (Python and C++), a dedicated example page with narrative explanation, and a new section in the QEC introduction page.Changes
docs/sphinx/examples_rst/qec/dem_sampling.rst— New dedicated page covering the DEM sampling workflow, GPU acceleration pipeline (sparse Bernoulli sampling, GF(2) sparse-dense multiply, bitpacking), input type handling (NumPy, PyTorch CUDA, PyTorch CPU), and backend selection logic.docs/sphinx/examples/qec/python/dem_sampling.py— Runnable Python example: basic usage, syndrome verification, reproducibility check, explicit CPU backend.docs/sphinx/examples/qec/cpp/dem_sampling.cpp— Runnable C++ example usingdem_sampler::cpu::sample_demwith syndrome verification.docs/sphinx/components/qec/introduction.rst— Added "DEM Sampling" subsection under "Numerical Experiments" with inline Python/C++ snippets and a link to the full example page.docs/sphinx/api/qec/python_api.rst— Addedautofunction:: cudaq_qec.dem_samplingsection.docs/sphinx/api/qec/cpp_api.rst— Addeddoxygenfunctionentries for all 5 C++ API functions (cpu::sample_demx2,gpu::sample_dem, legacydem_samplingx2).docs/sphinx/examples_rst/qec/examples.rst— Addeddem_sampling.rstto the examples toctree.Testing
ninja docs) succeeds with no new warnings.