FA-91070 / Quantum circuit simulation / Member archive
Direction fixer reports the output position of an unroutable CNOT · case 05
For an unroutable gate at input position 1 the error names position 5 after an earlier flip expanded the output.
Case contract
Input [edges, ops]; edges are directed native CNOT pairs [c, t]. Each ["cx", c, t] is kept if [c, t] is native, else rewritten as h c, h t, cx t c, h c, h t if [t, c] is native, else the result is ["unroutable", op index]; c == t gives ["invalid", op index]. Other ops pass through. A final stack pass cancels an ["h", q] against an identical immediately preceding ["h", q].
Why this case matters
Direction fixing is a mandatory transpiler pass for devices with directed couplers; errors either break hardware constraints or bloat circuits.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random coupling 20 | ["unroutable", 5] | ["unroutable", 1] | 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 ↗