Documentation

MIPRE.Foundations.Weyl

Generalized Pauli operators over a field of characteristic two #

The paper's sec:generalized-pauli: for a ∈ F_q^n the X-type operator shifts the computational basis of (C^q)^{⊗ n} by a, the Z-type operator is diagonal with the phase ω^{tr(a · b)}, and the two families twisted-commute, τ^X(a) τ^Z(b) = ω^{-tr(a · b)} τ^Z(b) τ^X(a).

This is the missing half of the Pauli basis test's infrastructure. MIPRE/LCS/Pauli.lean is the 2 × 2 Pauli matrices for the Magic Square; what the appendix's expansion stage and its swap isometry both run on is the F_q Weyl system, and that is this file.

Two deliberate restrictions #

Characteristic two. The paper states the construction over F_p with ω = e^{2πi/p} and then specializes. This file is only the p = 2 case, where ω = -1 and every phase is the real sign MIPRE.sgn of MIPRE/Foundations/Sign.lean. That is not a loss for this project: the Pauli basis test's parameters are admissible (def:admissible), which means q = 2^k, and no consumer instantiates it elsewhere. What it buys is large — there are no roots of unity, the operators are self-adjoint involutions rather than order-p unitaries, so they are genuine ±1-observables, and (τ^W(a))² = 1 is where the paper needs (σ^W(a))^p = I.

One matrix, not an iterated Kronecker product. (C^q)^{⊗ n} is presented as Matrix (n → F) (n → F) C: the basis of the n-fold tensor power is indexed by the functions n → F, which is F_q^n. So τ^W(a) is a single matrix and the n-register statements are the one-register statements with no associativity bookkeeping. The index type n is an arbitrary finite type rather than Fin n, which is what lets the Pauli basis test use it at n = (Fin m → Bool), the indexing MIPRE.LowDegree already uses for F_q^M with M = 2^m.

What is here #

wX, wZ, the group laws, self-adjointness, involutivity, unitarity, and the twisted commutation wX_mul_wZ. Then the Z-eigenbasis projectors, the expansion of wZ in them, and the Fourier inversion that recovers a projector from an average of operators --- the identity the expansion stage's E_r (-1)^{tr(ar)} Ŵ^r(u) is an instance of. The X side and the maximally entangled state come next; they go through the Fourier transform conjugating one family into the other.

Characteristic two #

Algebra (ZMod 2) F is the whole of the hypothesis: the algebra map from a field is injective, so F has characteristic two, and every element is its own additive inverse.

theorem MIPRE.Weyl.two_eq_zero {F : Type u_1} [Field F] [Algebra (ZMod 2) F] :
2 = 0
theorem MIPRE.Weyl.add_self {F : Type u_1} [Field F] [Algebra (ZMod 2) F] (x : F) :
x + x = 0
theorem MIPRE.Weyl.add_add_cancel {F : Type u_1} [Field F] [Algebra (ZMod 2) F] (x y : F) :
x + y + y = x
theorem MIPRE.Weyl.add_self_vec {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} (a : n → F) :
a + a = 0
theorem MIPRE.Weyl.add_add_cancel_vec {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} (a b : n → F) :
a + b + b = a
theorem MIPRE.Weyl.add_eq_zero_iff {F : Type u_1} [Field F] [Algebra (ZMod 2) F] (x y : F) :
x + y = 0 ↔ x = y

In characteristic two a sum vanishes exactly when the two summands agree.

theorem MIPRE.Weyl.add_eq_zero_iff_vec {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} (a b : n → F) :
a + b = 0 ↔ a = b

The bilinear form #

trDot a b = tr_{q → 2}(a · b), the F_2-valued form the phases are built from. It is the symmetric bilinear form that decides commutation, and trDotL is it as a linear functional, which is the shape card_filter_ker_mul' consumes.

noncomputable def MIPRE.Weyl.trDot {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (a b : n → F) :

tr_{q → 2}(a · b) for a, b ∈ F_q^n.

Equations
Instances For
    theorem MIPRE.Weyl.trDot_comm {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (a b : n → F) :
    trDot a b = trDot b a
    @[simp]
    theorem MIPRE.Weyl.trDot_zero_left {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (b : n → F) :
    trDot 0 b = 0
    @[simp]
    theorem MIPRE.Weyl.trDot_zero_right {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (a : n → F) :
    trDot a 0 = 0
    theorem MIPRE.Weyl.trDot_add_left {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (a a' b : n → F) :
    trDot (a + a') b = trDot a b + trDot a' b
    theorem MIPRE.Weyl.trDot_add_right {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (a b b' : n → F) :
    trDot a (b + b') = trDot a b + trDot a b'
    noncomputable def MIPRE.Weyl.trDotL {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (b : n → F) :
    (n → F) →ₗ[ZMod 2] ZMod 2

    The form against a fixed b, as an F_2-linear functional.

    Equations
    Instances For
      @[simp]
      theorem MIPRE.Weyl.trDotL_apply {F : Type u_1} [Field F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (b a : n → F) :
      (trDotL b) a = trDot a b

      The operators #

      The section's variables are what Matrix (n → F) (n → F) ℂ needs in order to exist at all --- DecidableEq (n → F) for the diagonal and the identity, Fintype (n → F) for a matrix product --- so the rfl-level lemmas below do not each use all of them. The linter is silenced for the section rather than omit-ed a dozen times.

      def MIPRE.Weyl.wX {F : Type u_1} [Field F] [DecidableEq F] {n : Type u_2} [Fintype n] (a : n → F) :
      Matrix (n → F) (n → F) ℂ

      The X-type Weyl operator: the shift of the computational basis by a.

      Equations
      Instances For
        noncomputable def MIPRE.Weyl.wZ {F : Type u_1} [Field F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] (b : n → F) :
        Matrix (n → F) (n → F) ℂ

        The Z-type Weyl operator: diagonal, with the sign (-1)^{tr(b · i)}.

        Equations
        Instances For
          @[simp]
          theorem MIPRE.Weyl.wX_apply {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a j i : n → F) :
          wX a j i = if j = i + a then 1 else 0
          @[simp]
          theorem MIPRE.Weyl.wZ_apply {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (b j i : n → F) :
          wZ b j i = if j = i then sgn (trDot b i) else 0

          The group laws #

          @[simp]
          theorem MIPRE.Weyl.wX_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] :
          wX 0 = 1
          @[simp]
          theorem MIPRE.Weyl.wZ_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] :
          wZ 0 = 1
          theorem MIPRE.Weyl.wX_mul_wX {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a a' : n → F) :
          wX a * wX a' = wX (a + a')
          theorem MIPRE.Weyl.wZ_mul_wZ {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (b b' : n → F) :
          wZ b * wZ b' = wZ (b + b')
          @[simp]
          theorem MIPRE.Weyl.wX_mul_self {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a : n → F) :
          wX a * wX a = 1
          @[simp]
          theorem MIPRE.Weyl.wZ_mul_self {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (b : n → F) :
          wZ b * wZ b = 1

          Self-adjointness and unitarity #

          @[simp]
          theorem MIPRE.Weyl.wX_conjTranspose {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a : n → F) :
          @[simp]
          theorem MIPRE.Weyl.wZ_conjTranspose {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (b : n → F) :
          theorem MIPRE.Weyl.wX_isUnitary {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a : n → F) :
          theorem MIPRE.Weyl.wZ_isUnitary {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (b : n → F) :

          Within a family the operators commute #

          theorem MIPRE.Weyl.wX_comm {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a a' : n → F) :
          wX a * wX a' = wX a' * wX a
          theorem MIPRE.Weyl.wZ_comm {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (b b' : n → F) :
          wZ b * wZ b' = wZ b' * wZ b

          The twisted commutation relation #

          The paper's eq:twisted-fq. In characteristic two the phase ω^{-tr(a·b)} is (-1)^{tr(a·b)} and there is no sign to track on the exponent.

          theorem MIPRE.Weyl.wX_mul_wZ {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a b : n → F) :
          wX a * wZ b = sgn (trDot a b) • (wZ b * wX a)

          τ^X(a) τ^Z(b) = (-1)^{tr(a · b)} τ^Z(b) τ^X(a).

          theorem MIPRE.Weyl.wX_mul_wZ_of_ne {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a b : n → F) (h : trDot a b = 1) :
          wX a * wZ b = -(wZ b * wX a)

          The anticommuting case: when the form is nonzero the two operators anticommute.

          theorem MIPRE.Weyl.wX_mul_wZ_of_eq {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a b : n → F) (h : trDot a b = 0) :
          wX a * wZ b = wZ b * wX a

          The commuting case.

          The cancellation lemma #

          The paper's lem:cancellation (Fact 3.2 of NW19) in the case that matters here: the character a ↦ (-1)^{tr(a · c)} of F_q^n is trivial exactly when c = 0, and a nontrivial character sums to zero. Its \cnote warns that the ambient space must be a subspace over the base field; here it is the whole of F_q^n over F_2, so the hypothesis is met with nothing to check.

          The count comes from card_filter_ker_mul', which says the kernel of a nonzero F_2-functional has index two --- exactly half the vectors give each sign, so they cancel.

          theorem MIPRE.Weyl.trDotL_ne_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {c : n → F} (hc : c ≠ 0) :
          theorem MIPRE.Weyl.sum_sgn_trDot {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {c : n → F} (hc : c ≠ 0) :
          ∑ a : n → F, sgn (trDot a c) = 0

          A nontrivial sign character sums to zero.

          theorem MIPRE.Weyl.sum_sgn_trDot_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] :
          ∑ b : n → F, sgn (trDot b 0) = ↑(Fintype.card (n → F))

          The trivial character sums to the dimension of the space.

          The Z-eigenbasis projectors, and the Fourier inversion #

          zProj c projects onto the computational basis vector c, and wZ expands in them with the sign coefficients (eq:pauli-obs-proj). The inversion eq:pauli-inversion-0 recovers a projector from an average of operators; it is the identity E_r (-1)^{tr(ar)} Ŵ^r(u) of the expansion stage, with the average over a line r ↦ r · v rather than over the whole space.

          def MIPRE.Weyl.zProj {F : Type u_1} [DecidableEq F] {n : Type u_2} [Fintype n] (c : n → F) :
          Matrix (n → F) (n → F) ℂ

          The rank-one projector onto the computational basis vector c.

          Equations
          Instances For
            @[simp]
            theorem MIPRE.Weyl.zProj_apply {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (c j i : n → F) :
            zProj c j i = if j = i then if i = c then 1 else 0 else 0
            theorem MIPRE.Weyl.sum_zProj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] :
            ∑ c : n → F, zProj c = 1
            theorem MIPRE.Weyl.wZ_eq_sum_zProj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (b : n → F) :
            wZ b = ∑ c : n → F, sgn (trDot b c) • zProj c

            wZ expands in the computational-basis projectors with the sign coefficients: the paper's eq:pauli-obs-proj.

            theorem MIPRE.Weyl.sum_sgn_smul_wZ {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (c : n → F) :
            (↑(Fintype.card (n → F)))⁻¹ • ∑ b : n → F, sgn (trDot b c) • wZ b = zProj c

            The Fourier inversion, the paper's eq:pauli-inversion-0: averaging wZ against the conjugate character recovers the projector onto a single computational basis vector.

            The spectral projectors, once for both families #

            Everything the appendix does with the eigenbasis projectors of one family uses only three facts about it: it represents the additive group of F_q^n, its operators are self-adjoint, and the identity sits at 0. IsWeylFamily is those three, proj is the Fourier average that builds the projectors out of them, and the spectral statements are then proved once. wZ is one instance and wX the other, so the paper's Fourier transform conjugating one family into the other is not needed to reach the X-side projectors --- worth avoiding, since that transform carries a q^{-1/2} and would put a square root into matrix entries.

            structure MIPRE.Weyl.IsWeylFamily {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {n : Type u_2} [Fintype n] [DecidableEq n] (w : (n → F) → Matrix (n → F) (n → F) ℂ) :

            A family of self-adjoint operators indexed by F_q^n representing its additive group. The two Weyl families are the instances, and the spectral theory needs nothing else.

            • map_add (a a' : n → F) : w (a + a') = w a * w a'

              The family is a homomorphism from the additive group.

            • map_zero : w 0 = 1

              The identity sits at 0.

            • selfAdjoint (a : n → F) : (w a).conjTranspose = w a

              Every operator is self-adjoint.

            Instances For
              theorem MIPRE.Weyl.card_ne_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] :
              ↑(Fintype.card (n → F)) ≠ 0
              noncomputable def MIPRE.Weyl.proj {F : Type u_1} [Field F] [Fintype F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (w : (n → F) → Matrix (n → F) (n → F) ℂ) (e : n → F) :
              Matrix (n → F) (n → F) ℂ

              The spectral projector of a Weyl family at the eigenvalue pattern e: the Fourier average of the family against the character of e. For wZ it is zProj e (proj_wZ); for wX it is the projector onto the X-eigenbasis vector the paper writes |e_X⟩.

              Equations
              Instances For
                theorem MIPRE.Weyl.proj_def {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (w : (n → F) → Matrix (n → F) (n → F) ℂ) (e : n → F) :
                proj w e = (↑(Fintype.card (n → F)))⁻¹ • ∑ a : n → F, sgn (trDot a e) • w a

                The defining Fourier average, as a rewrite.

                theorem MIPRE.Weyl.proj_wZ {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (c : n → F) :

                The Z-family's spectral projectors are the computational-basis ones.

                theorem MIPRE.Weyl.proj_mul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {w : (n → F) → Matrix (n → F) (n → F) ℂ} (hw : IsWeylFamily w) (e a : n → F) :
                proj w e * w a = sgn (trDot a e) • proj w e

                A projector absorbs its own family's operators, up to the sign: one reindexing.

                theorem MIPRE.Weyl.proj_mul_proj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {w : (n → F) → Matrix (n → F) (n → F) ℂ} (hw : IsWeylFamily w) (e e' : n → F) :
                proj w e * proj w e' = if e = e' then proj w e else 0

                The projectors are mutually orthogonal idempotents.

                theorem MIPRE.Weyl.sum_proj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {w : (n → F) → Matrix (n → F) (n → F) ℂ} (hw : IsWeylFamily w) :
                ∑ e : n → F, proj w e = 1

                The projectors of a Weyl family sum to the identity.

                theorem MIPRE.Weyl.eq_sum_proj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {w : (n → F) → Matrix (n → F) (n → F) ℂ} (a : n → F) :
                w a = ∑ e : n → F, sgn (trDot a e) • proj w e

                A Weyl operator expands in its own projectors with the sign coefficients: the paper's eq:pauli-obs-proj for either family.

                The group law is not used: this is pure Fourier inversion on the index group, and holds for any family at all. What the group law buys is that the projectors are then mutually orthogonal (proj_mul_proj), which is what makes them a measurement.

                theorem MIPRE.Weyl.proj_conjTranspose {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {w : (n → F) → Matrix (n → F) (n → F) ℂ} (hw : IsWeylFamily w) (e : n → F) :

                The projectors are self-adjoint.

                noncomputable def MIPRE.Weyl.xProj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (e : n → F) :
                Matrix (n → F) (n → F) ℂ

                The X-side projectors, the paper's |e_X⟩⟨e_X|.

                Equations
                Instances For
                  theorem MIPRE.Weyl.sum_xProj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] :
                  ∑ e : n → F, xProj e = 1
                  theorem MIPRE.Weyl.wX_eq_sum_xProj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a : n → F) :
                  wX a = ∑ e : n → F, sgn (trDot a e) • xProj e
                  theorem MIPRE.Weyl.xProj_mul_xProj {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (e e' : n → F) :
                  xProj e * xProj e' = if e = e' then xProj e else 0
                  theorem MIPRE.Weyl.xProj_conjTranspose {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (e : n → F) :

                  The syndrome projectors #

                  The expansion stage does not average the Weyl family over the whole of F_q^n: it averages over the line r ↦ r · v for a fixed v ∈ F_q^n, against the character of a field element a. What comes out is the projector onto the eigenvectors whose F_q-valued pairing with v is a --- the paper's τ^{W,u}_a = τ^W_{[g_·(u) = a]} of eq:qld-point-obs-def, at v = ind_m(u).

                  def MIPRE.Weyl.dotF {F : Type u_1} [Field F] {n : Type u_2} [Fintype n] (a b : n → F) :
                  F

                  The F_q-valued pairing, before the trace.

                  Equations
                  Instances For
                    theorem MIPRE.Weyl.dotF_comm {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (a b : n → F) :
                    dotF a b = dotF b a
                    theorem MIPRE.Weyl.trDot_smul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (r : F) (v e : n → F) :
                    trDot (r • v) e = (Algebra.trace (ZMod 2) F) (r * dotF v e)

                    Scaling one argument of the pairing pulls the scalar out.

                    noncomputable def MIPRE.Weyl.trMulL {F : Type u_1} [Field F] [Algebra (ZMod 2) F] (x : F) :

                    The trace against a fixed field element, as an F_2-linear functional on F_q.

                    Equations
                    Instances For
                      theorem MIPRE.Weyl.trMulL_ne_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {x : F} (hx : x ≠ 0) :
                      theorem MIPRE.Weyl.sum_sgn_linear {V : Type u_3} [AddCommGroup V] [Module (ZMod 2) V] [Fintype V] [DecidableEq V] (τ : V →ₗ[ZMod 2] ZMod 2) (hτ : τ ≠ 0) :
                      ∑ v : V, sgn (τ v) = 0

                      A nonzero sign character of a finite F_2-space sums to zero. sum_sgn_trDot and sum_sgn_trMul are its two instances; the content is the index-two kernel of card_filter_ker_mul'.

                      theorem MIPRE.Weyl.sum_sgn_trMul {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {x : F} (hx : x ≠ 0) :
                      ∑ r : F, sgn ((Algebra.trace (ZMod 2) F) (r * x)) = 0

                      The one-field cancellation: the r-average of the sign of tr(r x) vanishes unless x = 0.

                      theorem MIPRE.Weyl.sum_sgn_trMul_zero {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] :
                      ∑ r : F, sgn ((Algebra.trace (ZMod 2) F) (r * 0)) = ↑(Fintype.card F)
                      noncomputable def MIPRE.Weyl.synOf {F : Type u_1} [Field F] [Fintype F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {C : Type u_3} [DecidableEq C] (w : (n → F) → Matrix (n → F) (n → F) ℂ) (φ : (n → F) → C) (o : C) :
                      Matrix (n → F) (n → F) ℂ

                      A coarse-graining of the eigenbasis measurement: the sum of the spectral projectors over a level set of an arbitrary label φ. The syndrome projector below is this at φ = ⟨·, v⟩, and the expansion stage's line measurements are this at the label ``restriction of the low-degree encoding to the line''.

                      Equations
                      Instances For
                        noncomputable def MIPRE.Weyl.syn {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (w : (n → F) → Matrix (n → F) (n → F) ℂ) (v : n → F) (a : F) :
                        Matrix (n → F) (n → F) ℂ

                        The syndrome projector: onto the eigenvectors whose pairing with v is a. The paper's eq:qld-point-obs-def.

                        Equations
                        Instances For
                          theorem MIPRE.Weyl.syn_eq_synOf {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] (w : (n → F) → Matrix (n → F) (n → F) ℂ) (v : n → F) :
                          syn w v = synOf w fun (e : n → F) => dotF e v

                          The syndrome projector is the coarse-graining along the pairing.

                          theorem MIPRE.Weyl.sum_synOf {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {C : Type u_3} {D : Type u_4} [Fintype C] [DecidableEq C] [DecidableEq D] (w : (n → F) → Matrix (n → F) (n → F) ℂ) (φ : (n → F) → C) (g : C → D) (c : D) :
                          ∑ o : C with g o = c, synOf w φ o = synOf w (fun (e : n → F) => g (φ e)) c

                          Coarse-graining a level-set family again is the level-set family of the composite label. The level sets of g ∘ φ are the unions of the level sets of φ along the level sets of g, so relabelling a coarse-grained eigenbasis measurement never leaves the family.

                          theorem MIPRE.Weyl.sum_sgn_smul_line {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : Type u_2} [Fintype n] [DecidableEq n] {w : (n → F) → Matrix (n → F) (n → F) ℂ} (v : n → F) (a : F) :
                          (↑(Fintype.card F))⁻¹ • ∑ r : F, sgn ((Algebra.trace (ZMod 2) F) (a * r)) • w (r • v) = syn w v a

                          The identity the expansion stage calls. Averaging the family along the line r ↦ r · v against the character of a gives the syndrome projector: the paper's E_r (-1)^{tr(ar)} \qp^W(r \cdot v) = \qp^W_{[\cdot v = a]}. As with eq_sum_proj, the group law is not used.