tqecd.utils.remove_duplicate_detectors#
- remove_duplicate_detectors(circuit: Circuit) Circuit[source]#
Remove duplicate detectors from the provided circuit.
Detectors are considered duplicates if they have the same measurement record targets even if the coordinates are different.
Here we simplify the measurements tracking by always assuming the detectors are still valid even if the repeatition count for the
stim.CircuitRepeatBlockinstructions equals one.- Parameters:
circuit – circuit that includes detector instructions to remove duplicates from.
- Returns:
A new stim.Circuit instance with duplicate detectors removed.