FAILURE MAP
← Case archive

FA-91055 / Quantum circuit simulation / Member archive

Direction fixer wraps Hadamards around the unflipped CNOT · case 05

A reversed CNOT is emitted as h c, h t, cx c t, h c, h t, still in the non-native direction.

Member previewVariant 5 · 3 implementations · 7 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: random coupling 33[["h", 0], ["h", 2], ["h", 3], ["cx", 2, 3], ["h", 2], ["h", 3]][["h", 0], ["h", 2], ["h", 3], ["cx", 3, 2], ["h", 2], ["h", 3]]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 ↗