heuristic_custom_error_key#
- tqec.simulation.heuristic_custom_error_key(observables)[source]#
Get a heuristic custom error key using for the
error
metric insinter
.To get the statistics for each individual observable, we set
count_observable_error_combos=True
insinter.collect
. It will include error counts for each observable error combination in the stats. For example,{'obs_mistake_mask=EE_': 10, 'obs_mistake_mask=E_E': 20}
means that 10 errors flipped both the first and second observables, and 20 errors flipped both the first and third observables, are sampled. We then split the counts to get the error counts for each individual observable.By default,
sinter
will count an error that flips any number of observables as a single error in the stats. As we want to sample enough statistics for each individual observable, which might have large variance in the logical error rate, we need to select a goodcustom_error_count_key
.Firstly we find the observable with the minimum error rate, which is expected to be the observable with the minimal correlation surface area. If we ensure this observable has enough statistical data, we can ensure all the observables have enough data. Therefore, we need to find all the observable combinations that contains this observable. Then we order the combinations by their probabilities, and return the most frequent one as the heuristic custom error key, which needs the least shots to achieve a set
max_errors
. The final key will be in the form likeobs_mistake_mask=EE_
, where EE_ will be substituted by the actual observable combination.We estimate the probabilities of each possible observable combination by studying their correlation surfaces. Consider the correlation surfaces of some observables, an error chain crossing some fragment of correlation surface can flip all the observables iff. the fragment belongs to all the correlation surfaces, i.e. the intersection (AND) of the correlation surfaces. For each fragment, we find all the observables that contain it and generate the combination key. We then increase the frequency of the key, which means a single error chain at the fragment can flip all the observables. We use the number of fragments that can flip a observable comb as the proxy of the probability of the observable comb.
- Parameters:
observables (list[CorrelationSurface]) – The list of observables.
- Returns:
The heuristic custom error key.
- Return type:
str