Skip to content

Add docs and examples for decoder construction from Stim DEM strings #595

@vedika-saravanan

Description

@vedika-saravanan

Summary

Add public documentation and an example for constructing QEC decoders from Stim detector error model (DEM) strings.

PR #571 adds support for passing raw Stim DEM text to cudaq::qec::get_decoder(...) / cudaq_qec.get_decoder(...), but the user-facing docs and examples do not yet cover this capability.

Motivation

Users should be able to discover how to initialize decoders from a Stim DEM string without reading the implementation or tests. This is especially useful for DEM-derived workflows and for DEM-native decoders such as Chromobius.

Suggested Scope

Add a public example showing:

  • C++ decoder construction from a Stim DEM string using cudaq::qec::get_decoder(name, dem_text, options).
  • Python decoder construction from a Stim DEM string using cudaq_qec.get_decoder(name, dem_text, **options).
  • How DEM-derived defaults such as O and error_rate_vec are supplied for PCM-based decoders when not explicitly provided.
  • A short note that DEM-to-detector_error_model parsing is lossy, so DEM-native decoders should consume raw DEM text through the decoder initialization path.

Possible Locations

  • QEC Sphinx docs
  • QEC examples directory
  • Decoder API documentation

Related

Follow-up to PR #571.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions