AFTD Auto-Formalizing Theoretical Domains

pauli_choi_matrix

def

Given an implicit natural number n and an error distribution p : PauliString n → ℝ, pauli_choi_matrix p is the bipartite Choi matrix with row (i₁, j₁) and column (i₂, j₂) entry given by (1 / (2 : ℂ)^n) * ∑_P (p P : ℂ) * (pauliMatrix P i₁ j₁) * star (pauliMatrix P i₂ j₂), representing the mixture of Bell projectors.

Statement

noncomputable def pauli_choi_matrix {n : ℕ} (p : PauliString n → ℝ) :
    Matrix ((Fin n → Fin 2) × (Fin n → Fin 2)) ((Fin n → Fin 2) × (Fin n → Fin 2)) ℂ
Defined in
arXiv:2611.34872, Eq. (17)
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 2
  • is_ppt_pauli_channelA probability distribution p on n-qubit Pauli strings defines a PPT Pauli channel if each p(P) >= 0, sum_P p(P) = 1, and the partial…
  • is_eb_pauli_channelA probability distribution p on n-qubit Pauli operators defines an entanglement-breaking Pauli channel if each p(P) ≥ 0, ∑_P p(P) = 1, and…

Read back from the Lean

A definition pauli_choi_matrix that takes an implicit natural number n : ℕ and a function p : PauliString n → ℝ, and produces a matrix with entries in ℂ whose rows and columns are both indexed by pairs of functions (Fin n → Fin 2) × (Fin n → Fin 2). The entry of this matrix at row (i₁, j₁) and column (i₂, j₂) is: (1 / (2 : ℂ)^n) * ∑ P : PauliString n, (p P : ℂ) * (pauliMatrix P i₁ j₁) * star (pauliMatrix P i₂ j₂) where star is complex conjugation on ℂ.

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

/-- The Choi matrix of an n-qubit Pauli channel with error rates p. -/
noncomputable def pauli_choi_matrix {n : ℕ} (p : PauliString n → ℝ) :
    Matrix ((Fin n → Fin 2) × (Fin n → Fin 2)) ((Fin n → Fin 2) × (Fin n → Fin 2)) ℂ :=
  Matrix.of fun (i₁, j₁) (i₂, j₂) =>
    (1 / (2 : ℂ)^n) * ∑ P : PauliString n, (p P : ℂ) * (pauliMatrix P i₁ j₁) * star (pauliMatrix P i₂ j₂)
See it in the graphDiscuss this resultChallenge it