Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The explicit qutrit erasure code and self-dual CSS perfect state

Open
QAlgorithms.Papers.Independent.Intakenext100.P95.three_qutrit_code_and_four_qutrit_perfect_state

by Gohan · Oct 31, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Use arithmetic modulo three. Define the encoder by

M∣l⟩=13∑a∈Z3∣a,a+l,a+2l⟩,M\lvert l\rangle=\frac1{\sqrt3}\sum_{a\in\mathbb Z_3}\lvert a,a+l,a+2l\rangle,M∣l⟩=3​1​a∈Z3​∑​∣a,a+l,a+2l⟩,

and define the four-qutrit state, with reference leg last, by

∣Ψ⟩=13∑a,l∈Z3∣a,a+l,a+2l,l⟩.\lvert\Psi\rangle=\frac13\sum_{a,l\in\mathbb Z_3}\lvert a,a+l,a+2l,l\rangle.∣Ψ⟩=31​a,l∈Z3​∑​∣a,a+l,a+2l,l⟩.

The encoder is isometric, and erasure of any set of at most one physical qutrit is correctable by a CPTP recovery channel. The displayed state is normalized and perfect; every marginal on at most two qutrits is maximally mixed. It spans the joint +1+1+1 space of the X-type and Z-type checks with the same rows (1,1,1,0)(1,1,1,0)(1,1,1,0) and (1,−1,0,1)(1,-1,0,1)(1,−1,0,1), so this state is self-dual CSS. Here X∣j⟩=∣j−1⟩X\lvert j\rangle=\lvert j-1\rangleX∣j⟩=∣j−1⟩ and Z∣j⟩=ωj∣j⟩Z\lvert j\rangle=\omega^j\lvert j\rangleZ∣j⟩=ωj∣j⟩ with ω=e2πi/3\omega=e^{2\pi i/3}ω=e2πi/3. The construction supplies the source’s concrete qutrit example.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakenext100_P95
Formal statement
namespace QAlgorithms.Papers.Independent.Intakenext100.P95

open scoped Matrix ComplexConjugate

noncomputable section

local instance (p : Prop) : Decidable p := Classical.propDecidable p

/-- PDF pp.45–46, Appendix A.2: the explicit three-qutrit erasure code and
normalized four-qutrit perfect state. Recovery channels precede the input operator.
The shared X/Z check rows and the one-dimensional +1 space state the self-dual CSS clause. -/
theorem three_qutrit_code_and_four_qutrit_perfect_state :
    qutritEncoderᴴ * qutritEncoder = 1 ∧
    (∀ A : Finset (Fin 3), A.card ≤ 1 →
      ∃ R : Superop (SubsetConfig Trit Aᶜ) Trit, IsChannel R ∧
        ∀ rho : Matrix Trit Trit ℂ,
          R (subsetDensity Aᶜ (qutritEncoder * rho * qutritEncoderᴴ)) = rho) ∧
    IsState fourQutritState ∧ IsPerfect fourQutritState ∧
    (∀ A : Finset (Fin 4), A.card ≤ 2 →
      subsetDensity A (pureDensity fourQutritState) = ((Fintype.card (SubsetConfig Trit A) : ℂ)⁻¹ • 1)) ∧
    qutritCSSSpace = Submodule.span ℂ {fourQutritState} := by sorry

end

end QAlgorithms.Papers.Independent.Intakenext100.P95
Source
Holographic quantum error-correcting codes: Toy models for the bulk/boundary correspondence, arXiv:1503.06237v2, PDF p. 45, Appendix A.2: explicit three-qutrit erasure code and four-qutrit perfect state
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

Let F3=Z/3Z\mathbb F_3=\mathbb Z/3\mathbb ZF3​=Z/3Z, let E:CF3→CF33E:\mathbb C^{\mathbb F_3}\to\mathbb C^{\mathbb F_3^3}E:CF3​→CF33​ be the matrix

Ey,l={1/3,y1=y0+l, y2=y0+2l,0,otherwise,E_{y,l}= \begin{cases} 1/\sqrt3,&y_1=y_0+l,\ y_2=y_0+2l,\\ 0,&\text{otherwise}, \end{cases}Ey,l​={1/3​,0,​y1​=y0​+l, y2​=y0​+2l,otherwise,​

and let Φ∈CF34\Phi\in\mathbb C^{\mathbb F_3^4}Φ∈CF34​ be given by Φ(y)=1/3\Phi(y)=1/3Φ(y)=1/3 when y1=y0+y3y_1=y_0+y_3y1​=y0​+y3​ and y2=y0+2y3y_2=y_0+2y_3y2​=y0​+2y3​, and zero otherwise, with all these equations in F3\mathbb F_3F3​. For any subset AAA of the relevant positions, define reduction onto AAA by

DA(ρ)a,a′=∑b∈F3Acρa⊔b,  a′⊔b.D_A(\rho)_{a,a'}=\sum_{b\in\mathbb F_3^{A^c}}\rho_{a\sqcup b,\;a'\sqcup b}.DA​(ρ)a,a′​=b∈F3Ac​∑​ρa⊔b,a′⊔b​.

The theorem asserts E†E=IE^\dagger E=IE†E=I, and for every A⊆{0,1,2}A\subseteq\{0,1,2\}A⊆{0,1,2} with ∣A∣≤1|A|\le1∣A∣≤1, there exists a map RRR from complex matrices indexed by F3Ac\mathbb F_3^{A^c}F3Ac​ to complex matrices indexed by F3\mathbb F_3F3​ such that

R(X)=∑ν=0r−1KνXKν†,∑ν=0r−1Kν†Kν=I,R ⁣(DAc(EρE†))=ρR(X)=\sum_{\nu=0}^{r-1}K_\nu X K_\nu^\dagger,\qquad \sum_{\nu=0}^{r-1}K_\nu^\dagger K_\nu=I,\qquad R\!\left(D_{A^c}(E\rho E^\dagger)\right)=\rhoR(X)=ν=0∑r−1​Kν​XKν†​,ν=0∑r−1​Kν†​Kν​=I,R(DAc​(EρE†))=ρ

for some natural number rrr and matrices Kν:CF3Ac→CF3K_\nu:\mathbb C^{\mathbb F_3^{A^c}}\to\mathbb C^{\mathbb F_3}Kν​:CF3Ac​→CF3​, and for every complex 3×33\times33×3 matrix ρ\rhoρ, without a positivity or trace restriction on ρ\rhoρ. This includes A=∅A=\varnothingA=∅. The vector Φ\PhiΦ has norm one and is nonzero, its number of positions is even, and for every A⊆{0,1,2,3}A\subseteq\{0,1,2,3\}A⊆{0,1,2,3} with 2∣A∣≤42|A|\le42∣A∣≤4, the matrix FA(b,a)=Φ(a⊔b)F_A(b,a)=\Phi(a\sqcup b)FA​(b,a)=Φ(a⊔b) satisfies FA†FA=cAIF_A^\dagger F_A=c_AIFA†​FA​=cA​I for some real cA>0c_A>0cA​>0. Furthermore,

DA(∣Φ⟩⟨Φ∣)=3−∣A∣Ifor every A⊆{0,1,2,3} with ∣A∣≤2,D_A(|\Phi\rangle\langle\Phi|)=3^{-|A|}I \quad\text{for every }A\subseteq\{0,1,2,3\}\text{ with }|A|\le2,DA​(∣Φ⟩⟨Φ∣)=3−∣A∣Ifor every A⊆{0,1,2,3} with ∣A∣≤2,

including the empty subset. Finally, the complex subspace of vectors ψ∈CF34\psi\in\mathbb C^{\mathbb F_3^4}ψ∈CF34​ satisfying, for c0=(1,1,1,0)c_0=(1,1,1,0)c0​=(1,1,1,0), c1=(1,−1,0,1)c_1=(1,-1,0,1)c1​=(1,−1,0,1), both j=0,1j=0,1j=0,1, and every y∈F34y\in\mathbb F_3^4y∈F34​,

ψ(y+cj)=ψ(y),e(2πi/3)rep⁡(∑i(cj)iyi)ψ(y)=ψ(y)\psi(y+c_j)=\psi(y),\qquad e^{(2\pi i/3)\operatorname{rep}(\sum_i(c_j)_iy_i)}\psi(y)=\psi(y)ψ(y+cj​)=ψ(y),e(2πi/3)rep(∑i​(cj​)i​yi​)ψ(y)=ψ(y)

is exactly span⁡C{Φ}\operatorname{span}_{\mathbb C}\{\Phi\}spanC​{Φ}, where rep⁡\operatorname{rep}rep takes the representative modulo 333 in {0,1,2}\{0,1,2\}{0,1,2}.

Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 31, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me