AFTD Auto-Formalizing Theoretical Domains

pauli_channel_apply

def

For an n-qubit Pauli probability distribution p and an n-qubit density matrix ρ, the Pauli channel maps ρ to ∑_P p(P) P ρ P.

Statement

noncomputable def pauli_channel_apply {n : ℕ} (p : PauliString n → ℝ)
    (ρ : Matrix (Fin n → Fin 2) (Fin n → Fin 2) ℂ) :
    Matrix (Fin n → Fin 2) (Fin n → Fin 2) ℂ
Defined in
arXiv:2611.34872
Verified
27 Nov 2026
Axioms
none listed
Built on 3
  • PauliStringA Pauli string of length $n$ is a function $p : \mathrm{Fin}\,n \to \mathrm{PauliBasis}$.
  • pauliMatrixFor a Pauli string $p$ on $n$ qubits, the $2^n\times 2^n$ matrix obtained as the tensor product of the single-qubit Pauli matrices…
  • instFintypePauliStringinstFintypePauliString
Used by 1
  • eb_pauli_outputsThe set eb_pauli_outputs n is the set of all density matrices σ = pauli_channel_apply p ρ where p is an entanglement-breaking Pauli…

Read back from the Lean

pauli_channel_apply defines a function taking a natural number n, a coefficient function p : PauliString n → ℝ, and a complex matrix ρ : Matrix (Fin n → Fin 2) (Fin n → Fin 2) ℂ (representing an $n$-qubit density matrix of size $2^n \times 2^n$), and returns the matrix obtained by the finite sum over all Pauli strings P : PauliString n of (p P : ℂ) • (pauliMatrix P * ρ * pauliMatrix P).

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 an n-qubit Pauli channel with probability vector p on an n-qubit state. -/
noncomputable def pauli_channel_apply {n : ℕ} (p : PauliString n → ℝ)
    (ρ : Matrix (Fin n → Fin 2) (Fin n → Fin 2) ℂ) :
    Matrix (Fin n → Fin 2) (Fin n → Fin 2) ℂ :=
  ∑ P : PauliString n, (p P : ℂ) • (pauliMatrix P * ρ * pauliMatrix P)
See it in the graphDiscuss this resultChallenge it