Support readout noise in simulators and stim compiler - #3581
Open
João Boechat (joao-boechat) wants to merge 10 commits into
Open
Support readout noise in simulators and stim compiler#3581João Boechat (joao-boechat) wants to merge 10 commits into
João Boechat (joao-boechat) wants to merge 10 commits into
Conversation
João Boechat (joao-boechat)
marked this pull request as ready for review
August 13, 2026 00:11
João Boechat (joao-boechat)
requested review from
Andrew Casey (amcasey),
Bill Ticehurst (billti),
Ian Davis (idavis) and
orpuente-MS
as code owners
August 13, 2026 00:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds end-to-end support for readout noise (classical bit-flip noise applied
to a measurement result after it is sampled). A measured
0can be reportedas
1with probabilityp_zero_as_one, and a measured1as0withprobability
p_one_as_zero. The feature spans the Stim compiler, the QIR/adaptiveruntime representation, and every simulator back end.
Stim compiler
M/MZ/MX/MY,MR/MRZ/MRX/MRY, and thepair measurements
MXX/MYY/MZZ) now accept an optional parenthesizedprobability, e.g.
M(0.1) 0, and emit a__quantum__rt__readout_noisecallper produced result. Previously a parenthesized argument was rejected.
0 <= p <= 1, at most one argument); a probabilityof
0emits no noise call.ResultId/QubitId/StimQubitIdtype aliases to make thequbit-vs-result index distinction explicit throughout the QIR writer.
Runtime / QIR representation
__quantum__rt__readout_noise(double p_zero_as_one, double p_one_as_zero, ptr result).OP_READOUT_NOISE) and a newQirInstruction::ReadoutNoise/QirInstructionId::ReadoutNoise.intrinsic into the new instruction/opcode.
Simulators
Readout noise is supported in all simulators, base profile and adaptive profile: