@@ -31,17 +31,17 @@ using float_t = double;
3131#endif
3232
3333// / @brief Construction input for a decoder: either an explicit parity-check
34- // / matrix (\c cudaq::qec::sparse_binary_matrix) or a Stim detector error model string
35- // / (\c std::string_view).
34+ // / matrix (` cudaq::qec::sparse_binary_matrix` ) or a Stim detector error model
35+ // / string (` std::string_view` ).
3636// /
3737// / Parity-check-matrix-based decoders (LUT, sliding_window, TRT, PyMatching,
3838// / nv-qldpc, ...) accept either alternative: a DEM string is parsed into a
39- // / parity-check matrix via \c dem_from_stim_text. Decoders that require the raw
39+ // / parity-check matrix via ` dem_from_stim_text` . Decoders that require the raw
4040// / DEM (e.g. Chromobius, which needs detector color/basis annotations) require
4141// / the string alternative and reject a bare matrix.
4242// /
4343// / @note The string alternative is non-owning. The referenced buffer must stay
44- // / alive for the duration of the \c get_decoder / \c decoder::get call;
44+ // / alive for the duration of the ` get_decoder` / ` decoder::get` call;
4545// / decoders parse it during construction and do not retain the view.
4646using decoder_init =
4747 std::variant<cudaq::qec::sparse_binary_matrix, std::string_view>;
@@ -164,16 +164,16 @@ class decoder
164164 // / @brief Decode a single syndrome
165165 // / @param syndrome A vector of syndrome measurements where the floating point
166166 // / value is the probability that the syndrome measurement is a |1>. The
167- // / length of the syndrome vector should be equal to \p syndrome_size.
168- // / @returns Vector of length \p block_size with soft probabilities of errors
167+ // / length of the syndrome vector should be equal to ` syndrome_size` .
168+ // / @returns Vector of length ` block_size` with soft probabilities of errors
169169 // / in each index.
170170 virtual decoder_result decode (const std::vector<float_t > &syndrome) = 0;
171171
172172 // / @brief Decode a single syndrome
173173 // / @param syndrome An order-1 tensor of syndrome measurements where a 1 bit
174174 // / represents that the syndrome measurement is a |1>. The
175- // / length of the syndrome vector should be equal to \p syndrome_size.
176- // / @returns Vector of length \p block_size of errors in each index.
175+ // / length of the syndrome vector should be equal to ` syndrome_size` .
176+ // / @returns Vector of length ` block_size` of errors in each index.
177177 virtual decoder_result decode (const cudaqx::tensor<uint8_t > &syndrome);
178178
179179 // / @brief Decode a single syndrome
@@ -196,7 +196,7 @@ class decoder
196196 // / @brief Construct a registered decoder by name.
197197 // / @param name The registered decoder name.
198198 // / @param init Either a parity-check matrix or a Stim DEM string (see
199- // / \c decoder_init). The variant is forwarded to the decoder's creator, so
199+ // / ` decoder_init` ). The variant is forwarded to the decoder's creator, so
200200 // / parity-check-matrix-based decoders and DEM-native decoders (Chromobius)
201201 // / share a single entry point.
202202 // / @param param_map Optional decoder-specific parameters.
@@ -206,19 +206,22 @@ class decoder
206206
207207 static std::unique_ptr<decoder>
208208 get (const std::string &name, const cudaq::qec::sparse_binary_matrix &H,
209- const cudaqx::heterogeneous_map ¶m_map = cudaqx::heterogeneous_map()) {
209+ const cudaqx::heterogeneous_map ¶m_map =
210+ cudaqx::heterogeneous_map ()) {
210211 return get (name, decoder_init{H}, param_map);
211212 }
212213
213214 static std::unique_ptr<decoder>
214215 get (const std::string &name, const cudaqx::tensor<uint8_t > &H,
215- const cudaqx::heterogeneous_map ¶m_map = cudaqx::heterogeneous_map()) {
216+ const cudaqx::heterogeneous_map ¶m_map =
217+ cudaqx::heterogeneous_map ()) {
216218 return get (name, cudaq::qec::sparse_binary_matrix (H), param_map);
217219 }
218220
219221 static std::unique_ptr<decoder>
220222 get (const std::string &name, std::string_view stim_dem_text,
221- const cudaqx::heterogeneous_map ¶m_map = cudaqx::heterogeneous_map()) {
223+ const cudaqx::heterogeneous_map ¶m_map =
224+ cudaqx::heterogeneous_map ()) {
222225 return get (name, decoder_init{stim_dem_text}, param_map);
223226 }
224227
@@ -503,26 +506,27 @@ dem_default_values dem_defaults_for_missing_keys(
503506 const std::function<bool (const std::string &)> &contains_user_key,
504507 const detector_error_model &dem);
505508
506- // / @brief Extract the Stim DEM text from a \c decoder_init, throwing if it holds
507- // / a parity-check matrix instead. Use this in the create() function of decoders
508- // / that require a raw DEM (e.g. Chromobius), which cannot be reconstructed from
509- // / a bare parity-check matrix.
509+ // / @brief Extract the Stim DEM text from a ` decoder_init` , throwing if it
510+ // / holds a parity-check matrix instead. Use this in the create() function of
511+ // / decoders that require a raw DEM (e.g. Chromobius), which cannot be
512+ // / reconstructed from a bare parity-check matrix.
510513std::string_view require_dem_text (const decoder_init &init);
511514
512- // / @brief Build a parity-check-matrix-based decoder from a \c decoder_init.
515+ // / @brief Build a parity-check-matrix-based decoder from a ` decoder_init` .
513516// /
514- // / If \p init holds a sparse matrix, it is used directly as the parity-check matrix.
515- // / If it holds a Stim DEM string, it is parsed via \c dem_from_stim_text and the
516- // / derived observables (`"O"`) and per-error rates (`"error_rate_vec"`) are
517- // / injected into \p params unless the user already supplied them (user values
518- // / win). This is the shared implementation behind the create() function of every
519- // / parity-check-matrix-based decoder, giving them DEM-string support for free.
517+ // / If `init` holds a sparse matrix, it is used directly as the parity-check
518+ // / matrix. If it holds a Stim DEM string, it is parsed via
519+ // / `dem_from_stim_text` and the derived observables (`"O"`) and per-error
520+ // / rates (`"error_rate_vec"`) are injected into `params` unless the user
521+ // / already supplied them (user values win). This is the shared implementation
522+ // / behind the create() function of every parity-check-matrix-based decoder,
523+ // / giving them DEM-string support for free.
520524// /
521525// / @note The DEM parse is lossy: detector annotations, decomposition
522526// / separators, and `error_ids` are dropped. Sufficient for matching-style /
523527// / parity-check-matrix decoders (LUT, NV, sliding_window, TRT, PyMatching).
524528// / Decoders that need full DEM metadata (e.g. Chromobius detector color/basis)
525- // / must consume the string directly via \c require_dem_text.
529+ // / must consume the string directly via ` require_dem_text` .
526530template <typename DecoderT>
527531std::unique_ptr<decoder>
528532make_pcm_decoder (const decoder_init &init,
@@ -545,8 +549,8 @@ make_pcm_decoder(const decoder_init &init,
545549
546550// / @brief Construct a decoder by name from a Stim detector error model string.
547551// /
548- // / @deprecated Prefer \c get_decoder, which now accepts a Stim DEM string
549- // / directly via \c decoder_init. Retained as a thin convenience alias.
552+ // / @deprecated Prefer ` get_decoder` , which now accepts a Stim DEM string
553+ // / directly via ` decoder_init` . Retained as a thin convenience alias.
550554std::unique_ptr<decoder>
551555get_decoder_from_stim_dem (const std::string &name,
552556 const std::string &stim_dem_text,
0 commit comments