GraphDecoder¶
-
class
GraphDecoder
(code, S=None)[source]¶ Bases:
object
Class to construct the graph corresponding to the possible syndromes of a quantum error correction code, and then run suitable decoders.
- Parameters
code (RepitionCode) – The QEC Code object for which this decoder will be used.
S (retworkx.PyGraph) – Graph describing connectivity between syndrome elements. Will be generated automatically if not supplied.
- Additional information:
The decoder for the supplied
code
is initialized by running_make_syndrome_graph()
. Since this process can take some time, it is also possible to load in a premadeS
. However, if this was created for a differently definedcode
, it won’t work properly.
Methods
Generate probabilities of single error events from result counts.
- param results
A results dictionary, as produced by the
- param string
A string describing the output from the code.
- param string
A string describing the output from the code.
Generate weighted syndrome graph from result counts.