FA-91043 / Quantum circuit simulation / Member archive
Depth scheduler charges a layer for every barrier · case 03
Adding a barrier to a circuit increases its reported depth by one.
Case contract
Input [nq, nc, ops]; ops are [name, qubits], ["measure", [q], [c]], ["g", [q], "if", c] (classically conditioned), ["barrier", qubits] (empty list = all qubits) and ["id", [q]]. ASAP layering: each op lands one layer after the latest of its qubits and any clbit it reads or writes, and sets those levels; barriers align the listed qubits to their maximum without adding a layer; id costs nothing. Return [depth, qubit levels].
Why this case matters
Depth drives decoherence budgets and transpiler choices; scheduling slips misreport circuit cost.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random schedule 7 | [3, [2, 2, 3, 0]] | [2, [2, 2, 2, 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 ↗