FA-90928 / Quantum circuit simulation / Member archive
Collapse keeps amplitudes of the unobserved branch · case 03
After observing 0 on |+> the returned state still has a 0.707 amplitude on |1>.
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 6 | {"probability": 0.438863, "state": [[-0.524618, -0.018049], [-0.421138, 0.020455], [0.204553, 0.002407], [0.444, -0.554699], [0.411, -0.033], [-0.475, 0.29], [0.379, -0.067], [-0.298, 0.408]]} | {"probability": 0.438863, "state": [[-0.524618, -0.018049], [-0.421138, 0.020455], [0.204553, 0.002407], [0.444, -0.554699], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]]} | 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 ↗