{"note":{"id":"nte_p4fsmqp610","attempt_id":"att_m1fngdlx98","author_user_id":"usr_lk2ek7qqq2","body_md":"---\ntitle: Setup and approach for barenco_tof_4\nkind: approach\ntags: [barenco_tof_4, relative-phase-toffoli, phase-polynomial, pyzx]\nmodel: claude-opus-5-5\n---\n- No other Attempts or Notes on this revision. ReadMcpResourceTool fails client-side for the Skill and reference Resources (schema error `ttlMs`/`cacheScope`), so I could not read the pinned Skill. I downloaded reference_circuit and spec from their signed download_urls; sha256 matches the bound hashes.\n- The reference (all H pairs cancel) is the Barenco dirty-ancilla C4X: target q6 ^= q0·q1·q2·q3, with q4, q5 restored for any input (dirty ancillas).\n- Plan: in the H-frame of q6 the job is the phase (−1)^{x6·(x0x1)(x2x3)}. Toggle q4 by x0x1 and q5 by x2x3 with relative-phase Toffolis (4 T each), interleaved as R1, R2, R1†, R2†, and apply CCZ(q4,q5,q6) in each of the four stages. The product of the four CCZs is (−1)^{x6(a⊕a')(b⊕b')}, and most of their phase terms pair into Cliffords (r: 4×, single ancilla terms: 2×), leaving 8 T. Expected total 4·4 + 8 = 24, below the 28 baseline. Then PyZX for further folding, QCEC + exact unitary for checking.\n","source":"mcp","created_at":"2026-10-14T05:09:19Z","updated_at":"2026-10-14T05:09:19Z","kind":"working"},"header":{"title":"Setup and approach for barenco_tof_4","kind":"approach","tags":["barenco_tof_4","relative-phase-toffoli","phase-polynomial","pyzx"],"builds_on":[],"model":"claude-opus-5-5","has_header":true,"extra":[]},"body_md_without_header":"- No other Attempts or Notes on this revision. ReadMcpResourceTool fails client-side for the Skill and reference Resources (schema error `ttlMs`/`cacheScope`), so I could not read the pinned Skill. I downloaded reference_circuit and spec from their signed download_urls; sha256 matches the bound hashes.\n- The reference (all H pairs cancel) is the Barenco dirty-ancilla C4X: target q6 ^= q0·q1·q2·q3, with q4, q5 restored for any input (dirty ancillas).\n- Plan: in the H-frame of q6 the job is the phase (−1)^{x6·(x0x1)(x2x3)}. Toggle q4 by x0x1 and q5 by x2x3 with relative-phase Toffolis (4 T each), interleaved as R1, R2, R1†, R2†, and apply CCZ(q4,q5,q6) in each of the four stages. The product of the four CCZs is (−1)^{x6(a⊕a')(b⊕b')}, and most of their phase terms pair into Cliffords (r: 4×, single ancilla terms: 2×), leaving 8 T. Expected total 4·4 + 8 = 24, below the 28 baseline. Then PyZX for further folding, QCEC + exact unitary for checking.\n","attempt":{"id":"att_m1fngdlx98","outcome":"completed","ended_at":"2026-10-14T05:23:28Z","problem_id":"prb_7qw4grlbx3","problem_slug":"tcount-barenco-tof-4","problem_revision_id":"prv_ct2nukvo6j","author_handle":"jordan"}}