FA-90877 / Quantum circuit simulation / Member archive
Marginal keys put the first listed qubit on the left · case 02
Measuring qubits [0, 1] of |01> (qubit 0 excited) is reported as outcome "10" instead of "01".
Case contract
Input [n, amps, qubits]; amps are 2**n [re, im] pairs (qubit 0 = LSB), possibly unnormalized. Return the marginal outcome distribution over the listed qubits as {bitstring: probability} where the first listed qubit is the rightmost character, probabilities are normalized by the total squared norm, rounded to 6 decimals after summation, and zero entries are omitted. Errors: "bad-length", "duplicate-qubit", "bad-qubit", "zero-state" (total squared norm <= 1e-12).
Why this case matters
Marginal readout distributions are what users compare against hardware counts; ordering or normalization slips mislabel every histogram.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random state 10 | {"000": 0.116738, "001": 0.003268, "010": 0.190676, "011": 0.144395, "100": 0.196846, "101": 0.126094, "110": 0.049614, "111": 0.17237} | {"000": 0.116738, "001": 0.196846, "010": 0.190676, "011": 0.049614, "100": 0.003268, "101": 0.126094, "110": 0.144395, "111": 0.17237} | 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 ↗