AFTD Auto-Formalizing Theoretical Domains

apply_clifford_circuit

def

The symplectic action of a Clifford circuit circ : List (CliffordGate k) on a PauliLabel k, obtained by folding apply_clifford_gate across circ from left to right.

Statement

def apply_clifford_circuit {k : ℕ} (circ : List (CliffordGate k)) (p : PauliLabel k) : PauliLabel k
Defined in
scout/2610-04621-exact-clifford-optimality-for-two-sided-locally-randomized.md:453
Verified
31 Oct 2026
Axioms
none listed
Built on 3
  • CliffordGateAn inductive type representing a quantum gate in a k-qubit Clifford circuit: Hadamard h on qubit i : Fin k, phase gate s on qubit i : Fin…
  • PauliLabelA binary symplectic Pauli label on k qubits, given as a pair of binary vectors (x, z) in (ZMod 2)^k x (ZMod 2)^k.
  • apply_clifford_gateThe symplectic action of a Clifford gate g : CliffordGate k on a PauliLabel k: h i swaps the x and z components at qubit i; s i updates…
Used by 1
  • clifford_circuit_scoreThe integer score S_k(U) of a k-qubit Clifford circuit circ : List (CliffordGate k), defined as the sum over all p in full_support_paulis…

Read back from the Lean

Definition of apply_clifford_circuit: given an implicit natural number k, a list of Clifford gates circ on k qubits, and a Pauli label p : PauliLabel k, it returns the Pauli label obtained by iteratively applying each gate in circ from left to right to p using apply_clifford_gate via List.foldl.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- Action of a Clifford circuit on a Pauli label. -/
def apply_clifford_circuit {k : ℕ} (circ : List (CliffordGate k)) (p : PauliLabel k) : PauliLabel k := circ.foldl (fun acc g => apply_clifford_gate g acc) p
See it in the graphDiscuss this resultChallenge it