Stim icon indicating copy to clipboard operation
Stim copied to clipboard

Add some way to sample a circuit while recording the errors

Open Strilanc opened this issue 2 years ago • 0 comments

This is a recurring question on the quantum stack exchange, and the dem stuff is too not-the-abstraction-they-are-using for beginners.

What I'm thinking is basically the following: every error channel specifies some number of "which error" bits, e.g. X_ERROR has 1 and DEPOLARIZE2 has 4. While the frame simulator runs it can optionally stash these bits. The compiled circuit sampler's sample method would gain an option record_errors=True, or maybe an alternate method, which would add the error data to the result tuple. There should also be an option to convert the errors from these raw bits into their explained form (and vice versa), so users don't have to do that task.

Strilanc avatar Apr 24 '23 14:04 Strilanc