2

I am using stim and sinter to compute the logical error rate of a QEC code.
For the code I am testing, calling the function sinter.collect() triggers the following error:

ValueError                                Traceback (most recent call last)
ValueError: Failed to decompose errors into graphlike components with at most two symptoms.
The error component that failed to decompose is 'D31, D34, D58, D82, D994'.

In Python, you can ignore this error by passing ignore_decomposition_failures=True to stim.Circuit.detector_error_model(...). From the command line, you can ignore this error by passing the flag --ignore_decomposition_failures to stim analyze_errors.

The function was called with arguments: collected_qec_stats: List[sinter.TaskStats] = sinter.collect( 20 num_workers=4, 21 tasks=qec_tasks, 22 decoders=['pymatching'], 23 max_shots=100_000, 24 max_errors=100, 25 print_progress=True)

I was wondering if there is a way to enable the ignore_decomposition_failures from sinter API. If not, would this be possible by extending sinter API? (the latter question might be more suitable as an issue in stim's repo)

What are the implications of ignoring decomposition failures in the computation of the logical error rates?

giangiac
  • 21
  • 1

1 Answers1

1

The way you ignore decomposition errors in the python API is by making each circuit's detector error model for yourself, ignoring the decomposition errors at that time (or even not decomposing at all), and then specifying to use those models by attaching them to the sinter.Task items being given to sinter.collect:

import sinter
circuits = ...

tasks = [] for circuit in circuits: dem = circuit.detector_error_model( decompose_errors=True, ignore_decomposition_failures=True, ..., ) task = sinter.Task( circuit=circuit, detector_error_model=dem, json_metadata=..., ) tasks.append(task)

stats = sinter.collect( tasks=tasks, ... )

That said, don't expect to get good results when ignoring errors like this. For example, if you're using pymatching, you're violating the key property it uses to function correctly (errors being graphlike). It might refuse to decode the problem.

Craig Gidney
  • 36,389
  • 1
  • 29
  • 95