FA-91329 / Quantum circuit simulation / Member archive
T-count tests the quarter-turn class before the half-turn class · case 04
rz(pi/2), an S gate, is counted as a T gate.
Case contract
Input a gate list. t and tdg count one T each; h, s, sdg, x, y, z, cx, cz, swap count one Clifford; ccx costs 7 T and 8 Clifford; ["rz", q, a] with a in units of pi reduced mod 2 is skipped if 0, Clifford if a multiple of 1/2, one T if an odd multiple of 1/4, else ["unsupported", index]; other names give ["unknown-gate", index]. Return {"t_count", "clifford_count"}.
Why this case matters
T-count is the dominant fault-tolerant cost metric; misclassifying rotations skews resource estimates.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: random t-count 13 | {"clifford_count": 1, "t_count": 3} | {"clifford_count": 2, "t_count": 2} | 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 ↗