Branch: * main
commit 8a65071e697efe26f6b97da204aabdcf2ef5b31c
Author: João Boechat <joaoboechat@microsoft.com>
Date: Fri Jul 17 14:10:56 2026 -0700
Support negated targets in stim collapsing gates (#3455)
This PR implements support for the following operations:
`M !0`, `MX !0`, `MY !0`,
`MR !0`, `MRX !0`, `MRY !0`,
`MZZ !0 1`, `MXX !0 1`, `MYY !0 1`,
where M, MZ; MR, MRZ are interchangeable,
and on pair measurements we can negate either target, or both, but the
negation will invert the result by the XOR of both negations. For
example:
`MZZ !0 1` = `MZZ 0 !1`
`MZZ !0 !1` = `MZZ 0 1`
In terms of the implementation, all that had to be done was adding an X
gate before and after the emitted M operations (all collapsing gates are
eventually decomposed to a single M in a qubit). For measurement reset
operations, we only add the X gate before the measurement (as we don't
care about post-measurement state).
The fuzz-testing workflow has detected a bug.
Auto-Minimized Fuzzing Input That Triggers the Bug: Click this line.
Note: If the input is multi-line then the end-of-line characters ' ' (0x0A) and ' ' (0x0D) may affect the reproducibility of the bug. If you fail to repro the bug with the input shown below then you may want to go to the workflow that reported this GitHub bug, download the artifact, and extract the file with the exact minimized input.The branch/commit the bug has been found in: Click.
If the developers fail to repro the bug in the latestmainthen the branch/commit info below can help them to make sure that they are using the correct way to repro. If the bug is reproducible in the branch/commit below, but not in latestmain, then the bug is likely fixed already or is not in themainbranch.Other Info
ubuntu-latest: Linux runnervm3jd5f 6.17.0-1020-azure #20~24.04.1-Ubuntu SMP Fri Jun 19 20:09:14 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux.