FA-90907 / Quantum circuit simulation / Member archive
Collapse outcome test drops parentheses around the bit extraction · case 02
Projecting qubit 1 onto outcome 1 reports "impossible" even when that qubit is certainly excited.
Case contract
Input [n, amps, q, outcome]; measure qubit q (0 = LSB) of the possibly unnormalized state. Return {"probability": p, "state": post} with p normalized by the total squared norm and the post-measurement state renormalized to unit norm with the other branch zeroed; values rounded to 6 decimals. Return "impossible" when p < 1e-12.
Why this case matters
Mid-circuit measurement and collapse drive dynamic circuits; wrong renormalization breaks every later probability.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random collapse 38 | "impossible" | {"probability": 0.475302, "state": [[0.0, 0.0], [0.0, 0.0], [-0.440491, 0.425233], [0.059042, 0.472334], [0.0, 0.0], [0.0, 0.0], [0.084914, 0.000663], [0.508157, 0.364864]]} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗