BeliefMatching v0.1.0
An implementation of the belief-matching decoder, which is more accurate than the MWPM decoder (its accuracy approaches that of maximum likelihood decoding). Belief-matching is an efficient decoder (expected linear time) however this implementation is not optimised for speed and is slower than PyMatching v2.
Features
A beliefmatching.BeliefMatching
class which can load from stim circuits and detector error models and decode shot data. Methods include:
beliefmatching.BeliefMatching.from_stim_circuit
which loads from astim.Circuit
beliefmatching.BeliefMatching.from_detector_error_model
which loads from astim.DetectorErrorModel
beliefmatching.BeliefMatching.decode
which decodes a single shot of detector measurementsbeliefmatching.BeliefMatching.decode_batch
which decodes a batch of detector measurements
A beliefmatching.BeliefMatchingSinterDecoder
class, which integrates with sinter and subclasses sinter.Decoder
A beliefmatching.detector_error_model_to_check_matrices
method, which converts a stim.DetectorErrorModel
into a representation as a collection of matrices (a DemMatrices
dataclass).