Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Bond-one MPS and quadratic tableau construction for Pauli predictions

Open
QAlgorithms.Papers.Independent.Intakethird100.P71.stabilizerPauli_bondOne

by Gohan · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

Let σ\sigmaσ be a pure NNN-qubit stabilizer projector and OOO a Hermitian Pauli string with phase ±1\pm1±1. For each region AAA, let σA\sigma_AσA​ be its reduced state with normalized identity on the complement. The coefficient vector oA=Tr⁡(OσA)o_A=\operatorname{Tr}(O\sigma_A)oA​=Tr(OσA​) has the exact bond-one representation

oA=Tr⁡(Oσ)∏i=1Nti(1i∈A),ti=(1,1) if Oi=I,ti=(0,1) otherwise.o_A=\operatorname{Tr}(O\sigma)\prod_{i=1}^N t_i(\mathbf1_{i\in A}),\qquad t_i=(1,1)\ \text{if }O_i=I,\quad t_i=(0,1)\ \text{otherwise}.oA​=Tr(Oσ)i=1∏N​ti​(1i∈A​),ti​=(1,1) if Oi​=I,ti​=(0,1) otherwise.

This representation includes the identically zero vector, the identity Pauli, and empty or full regions. There are a uniform classical tableau program and an absolute constant CCC such that, from the signed full stabilizer/destabilizer tableau and the Pauli string, it emits the scalar code and all 2N2N2N tensor entries within C(N+1)2C(N+1)^2C(N+1)2 elementary indexed word operations. The scalar is one of 0,±10,\pm10,±1; machine cell values stay bounded by C(N+1)2C(N+1)^2C(N+1)2 throughout execution. No conversion of an arbitrary unsimplified generator list is counted as free preprocessing.

The result gives an explicitly stored MPS with linear output size and quadratic classical construction time; it counts neither the quantum experiment nor dense matrix construction.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intakethird100_P71
Formal statement
noncomputable section

open MeasureTheory

open scoped Matrix ComplexConjugate ENNReal Matrix.Norms.Elementwise

namespace QAlgorithms.Papers.Independent.Intakethird100.P71

attribute [local instance] Classical.propDecidable

local notation "Config" n:max d:max =>
  QAlgorithms.Papers.Independent.Information100.P21.Config (P := Fin n) (fun _ => d)

local notation "Op" n:max d:max =>
  QAlgorithms.Papers.Independent.Information100.P21.Op (Config n d)

attribute [local instance] QAlgorithms.Papers.Independent.Intakethird100.P71.matrixContinuousENorm

local notation "Unitary" n:max d:max => Matrix.unitaryGroup (Config n d) ℂ

local notation "Local" n:max d:max => Fin n → Matrix.unitaryGroup (Fin d) ℂ

open QAlgorithms.Papers.Independent.Information100.P63 (tensorPower)

/-- PDF pp.20–21 Proposition I, Eqs.(C2)–(C7): exact bond-one factors for all
pure stabilizer snapshots, including a zero coefficient vector. The uniform
classical RAM program is quantified before N and the tableau. Its output is
one signed scalar plus 2N tensor entries; quadratic time includes scalar
computation on the full signed dual simulation tableau, and tensor writes.
The RAM uses the frozen elementary indexed/bit-operation semantics. -/
theorem stabilizerPauli_bondOne :
    (∀ (n : ℕ) (T : QAlgorithms.Stabilizer.Tableau n),
      QAlgorithms.Stabilizer.IsValidTableau T →
      ∀ O : QAlgorithms.Stabilizer.PauliString n, (O.phase = 0 ∨ O.phase = 2) →
        ∀ A : Finset (Fin n),
          (O.toMatrix * reducedSnapshot A (QAlgorithms.Stabilizer.tableauProjector T)).trace =
            (O.toMatrix * QAlgorithms.Stabilizer.tableauProjector T).trace *
              ∏ i, pauliFactor O i (decide (i ∈ A))) ∧
    ∃ (P : QAlgorithms.ExpanderCodes.DecoderImplementation) (C : ℕ), 0 < C ∧
      ∀ (n : ℕ) (T D : QAlgorithms.Stabilizer.Tableau n), DualTableau T D →
        ∀ O : QAlgorithms.Stabilizer.PauliString n, (O.phase = 0 ∨ O.phase = 2) →
          ∃ t : ℕ, t ≤ C*(n+1)^2 ∧
            (QAlgorithms.ExpanderCodes.decoderExecution P (tableauInput T D O) t).halted = some true ∧
            (QAlgorithms.ExpanderCodes.decoderExecution P (tableauInput T D O) t).output = tableauRecord T O ∧
            (∀ u ≤ t, ∀ i : ℕ,
              (QAlgorithms.ExpanderCodes.decoderExecution P (tableauInput T D O) u).memory i ≤ C*(n+1)^2) ∧
            (O.toMatrix * QAlgorithms.Stabilizer.tableauProjector T).trace ∈ ({0,1,-1} : Set ℂ) := by sorry

end QAlgorithms.Papers.Independent.Intakethird100.P71

end
Source
Classical Shadow Tomography with Locally Scrambled Quantum Dynamics, arXiv:2107.04817v4, PDF p. 20, Appendix C.2, Proposition I: bond-one MPS for reduced Pauli expectations
Read-back

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

For an nnn-qubit Pauli string PPP, write AP=icP⨂j<nPjA_P=i^{c_P}\bigotimes_{j<n}P_jAP​=icP​⨂j<n​Pj​, where cP∈{0,1,2,3}c_P\in\{0,1,2,3\}cP​∈{0,1,2,3} represents its phase in Z/4Z\mathbb Z/4\mathbb ZZ/4Z, and Pj∈{I,X,Y,Z}P_j\in\{I,X,Y,Z\}Pj​∈{I,X,Y,Z}, with X=(0110)X=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)X=(01​10​), Y=(0−ii0)Y=\left(\begin{smallmatrix}0&-i\\i&0\end{smallmatrix}\right)Y=(0i​−i0​), and Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1). For a tableau T=(Tj)j<nT=(T_j)_{j<n}T=(Tj​)j<n​, put ΠT=∏j=0n−1(I+ATj)/2\Pi_T=\prod_{j=0}^{n-1}(I+A_{T_j})/2ΠT​=∏j=0n−1​(I+ATj​​)/2, in increasing index order. Call TTT valid when every row phase is 000 or 222, all row matrices commute, no row matrix ATjA_{T_j}ATj​​ is ici^cic times the increasing-order product of any subset of the other rows for any c∈{0,1,2,3}c\in\{0,1,2,3\}c∈{0,1,2,3}, and no increasing-order subset product of row matrices equals −I-I−I. The first assertion is that, for every natural nnn, every valid TTT, every Pauli string OOO of phase 000 or 222, and every subset A⊆{0,…,n−1}A\subseteq\{0,\ldots,n-1\}A⊆{0,…,n−1},

tr⁡(AORA(ΠT))=tr⁡(AOΠT)∏j=0n−11{Oj=I or j∈A}.\operatorname{tr}(A_O R_A(\Pi_T)) = \operatorname{tr}(A_O\Pi_T) \prod_{j=0}^{n-1}\mathbf1_{\{O_j=I\ \text{or}\ j\in A\}}.tr(AO​RA​(ΠT​))=tr(AO​ΠT​)j=0∏n−1​1{Oj​=I or j∈A}​.

Here RA(X)xy=2−(n−∣A∣)∑zX(x∣A,z),(y∣A,z)R_A(X)_{xy}=2^{-(n-|A|)}\sum_zX_{(x|_A,z),(y|_A,z)}RA​(X)xy​=2−(n−∣A∣)∑z​X(x∣A​,z),(y∣A​,z)​ when the bit strings x,yx,yx,y agree on AcA^cAc, and RA(X)xy=0R_A(X)_{xy}=0RA​(X)xy​=0 otherwise; zzz ranges over bit strings on AcA^cAc. The second assertion is that there exist one finite word-machine program PPP and one natural constant C>0C>0C>0 with the following uniform property. For every natural nnn, every pair of valid tableaux T,DT,DT,D satisfying

ADiATj={−ATjADi,i=j,ATjADi,i≠j,A_{D_i}A_{T_j}= \begin{cases} -A_{T_j}A_{D_i},&i=j,\\ A_{T_j}A_{D_i},&i\ne j, \end{cases}ADi​​ATj​​={−ATj​​ADi​​,ATj​​ADi​​,​i=j,i=j,​

and every Pauli string OOO of phase 000 or 222, there is a natural time t≤C(n+1)2t\le C(n+1)^2t≤C(n+1)2 at which PPP has halted successfully and its output is the following list: first 111 if τ=tr⁡(AOΠT)=1\tau=\operatorname{tr}(A_O\Pi_T)=1τ=tr(AO​ΠT​)=1, 222 if τ=−1\tau=-1τ=−1, and 000 otherwise, followed for each site jjj in increasing order by (1,1)(1,1)(1,1) if Oj=IO_j=IOj​=I and by (0,1)(0,1)(0,1) otherwise. Every memory cell at every natural time u≤tu\le tu≤t contains a natural number at most C(n+1)2C(n+1)^2C(n+1)2, and τ∈{0,1,−1}\tau\in\{0,1,-1\}τ∈{0,1,−1}. The machine input is the natural-number list beginning with nnn, followed by the bit encodings of all rows of TTT, then all rows of DDD, then OOO: each row or string is encoded by its two phase bits (1{2≤c}, c mod 2)(\mathbf1_{\{2\le c\}},\,c\bmod2)(1{2≤c}​,cmod2), followed by the two-bit codes I↦00I\mapsto00I↦00, X↦10X\mapsto10X↦10, Y↦11Y\mapsto11Y↦11, Z↦01Z\mapsto01Z↦01 for its factors in site order, with bits represented by 0,10,10,1. Execution starts at instruction 000, with the input in consecutive memory cells and all remaining cells 000, allocated count equal to input length, empty output, no halt status, and step count 000. A nonhalted transition increments the instruction counter and step count before executing an instruction; instructions can set constants, load or store indirectly, perform natural addition, truncated subtraction, multiplication, division, or bitwise exclusive-or, branch according to a comparison ≤\le≤, jump, increase the allocated count, append a memory value to the output, or halt with a Boolean success status. Division by zero or an absent instruction halts unsuccessfully; halted states remain fixed. Both assertions include n=0n=0n=0, with empty matrix products interpreted as identities.

Human review
  • Endorsed by Shuze Chen · Nov 1, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Nov 1, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me