ccz_layer_syndrome
def
The syndrome of the layer of m disjoint CCZ gates on 3m qubits (blocks {3j, 3j+1, 3j+2}): 1 on each block triple and 0 on every other subset; the layer is the pure-cubic diagonal gate (-1)^{sum_j x_{3j} x_{3j+1} x_{3j+2}}.
Statement
def ccz_layer_syndrome (m : ℕ) (A : Finset (Fin (3 * m))) : ZMod 2- Defined in
- Exact T-counts of Toffoli Layers from an Isotropy Bound, arXiv:2610.01024, Sec. 2 and App. C.1 (layer of m disjoint CCZ gates, Theorem 40 / Corollary 83) and Fact 21
- Verified
- 06 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Used by 4
- ccz_layer_parity_repr_card_geThe Hadamard-free floor of arXiv:2610.01024 (Corollary 83): every set of nonzero parities on 3m qubits whose order-1, 2, 3 moments equal…
- ccz_layer_parity_repr_twoTwo disjoint CCZ gates have a parity representation with 13 = 6 * 2 + 1 parities, so the Hadamard-free T-count of the layer with m = 2 is…
- ccz_layer_syndrome_across_blocksSanity check: for two CCZ gates the syndrome vanishes on a triple meeting both blocks.
- ccz_layer_syndrome_one_blockSanity check: for two CCZ gates the syndrome is 1 on the first block {0, 1, 2}.
Lean source view module on GitHub
/-- The syndrome of the layer of m disjoint CCZ gates on qubits {3j, 3j+1, 3j+2}: 1 on those triples and 0 on every other set. -/ def ccz_layer_syndrome (m : ℕ) (A : Finset (Fin (3 * m))) : ZMod 2 := if ∃ j : Fin m, A = {⟨3 * j.val, by omega⟩, ⟨3 * j.val + 1, by omega⟩, ⟨3 * j.val + 2, by omega⟩} then 1 else 0