Suppose I create a circuit, which applies depolarizing error to a single qubit with probability 0.04.

circuit = stim.Circuit()

Now, I sample measurements as


Is it possible to track back which of the Pauli errors occurred during the sampling?


1 Answer 1


There's an open issue to add this to Stim, so no it doesn't exist.

At the moment, the closest you can get is to sample the detector error model using circuit.detector_error_model().compile_sample().sample(record_errors=True) then convert those errors into corresponding circuit errors using circuit.explain_detector_error_model_errors. The downside of this is that the dem error doesn't uniquely identify circuit errors; there are multiple possible ways to get the same symptoms. It's also just generally more steps and more complications than really needed.

Part of the reason this isn't a priority is because in actual experiments you don't get access to this information.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.