qiskit.ignis.verification.GraphDecoder¶

class
GraphDecoder
(code, S=None)[código fonte]¶ Class to construct the graph corresponding to the possible syndromes of a quantum error correction code, and then run suitable decoders.
 Parâmetros
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.

__init__
(code, S=None)[código fonte]¶  Parâmetros
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
__init__
(code[, S]) param code
The QEC Code object for which this decoder
get_error_probs
(results)Generate probabilities of single error events from result counts.
get_logical_prob
(results[, algorithm]) param results
A results dictionary, as produced by the
make_error_graph
(string[, subgraphs]) param string
A string describing the output from the code.
matching
(string) param string
A string describing the output from the code.
weight_syndrome_graph
(results)Generate weighted syndrome graph from result counts.

get_error_probs
(results)[código fonte]¶ Generate probabilities of single error events from result counts.
 Parâmetros
results (dict) – A results dictionary, as produced by the
method of the code. (process_results) –
 Retorna
Keys are the edges for specific error events, and values are the calculated probabilities
 Tipo de retorno
dict
 Additional information:
Uses results to estimate the probability of the errors that create the pairs of nodes specified by the edge. Calculation done using the method of Spitz, et al. https://doi.org/10.1002/qute.201800012

get_logical_prob
(results, algorithm='matching')[código fonte]¶  Parâmetros
results (dict) – A results dictionary, as produced by the
method of the code. (process_results) –
algorithm (str) – Choice of which decoder to use.
 Retorna
Dictionary of logical error probabilities for each of the encoded logical states whose results were given in the input.
 Tipo de retorno
dict

make_error_graph
(string, subgraphs=None)[código fonte]¶  Parâmetros
string (str) – A string describing the output from the code.
subgraphs (list) – Used when multiple, semiindependent graphs need
to created. (need) –
 Retorna
The subgraph(s) of S which corresponds to the nontrivial syndrome elements in the given string.
 Tipo de retorno
E

matching
(string)[código fonte]¶  Parâmetros
string (str) – A string describing the output from the code.
 Retorna
 A string with corrected logical values,
computed using minimum weight perfect matching.
 Tipo de retorno
str
 Additional information:
This function can be run directly, or used indirectly to calculate a logical error probability with get_logical_prob

weight_syndrome_graph
(results)[código fonte]¶ Generate weighted syndrome graph from result counts.
 Parâmetros
results (dict) – A results dictionary, as produced by the
method of the code. (process_results) –
 Additional information:
Uses results to estimate the probability of the errors that create the pairs of nodes in S. The edge weights are then replaced with the corresponding log(p/(1p).