tqecd.construction.annotate_detectors_automatically#

annotate_detectors_automatically(circuit: Circuit) Circuit[source]#

Insert detectors into the provided circuit instance.

This is the main user-facing function to automatically insert detectors into a quantum circuit composed of Clifford operations. The provided circuit should check some pre-conditions to be accepted, which are detailed in details below.

First and foremost, the provided circuit should check the pre-conditions listed in the documentation of split_stim_circuit_into_fragments().

Parameters:

circuit – circuit to insert detectors in.

Returns:

A new stim.Circuit instance with automatically computed detectors.