Documentation

MIPRE.Foundations.Introspection.BlockTwirl

Entry formulas for Pauli twirls with an ancillary space #

Stated for block matrices over an arbitrary algebra ๐’œ (Phase 4 of planning/mipco-track.md): the register is Fin n โ†’ F, the ancilla is abstract, an operator of register and ancilla is a matrix Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ, and a register operator A is smulKron 1 A. The matrix statements, on (Fin n โ†’ F) ร— H, are the case ๐’œ = Matrix H H โ„‚.

theorem MIPRE.Introspection.smulKron_wZ_mul_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (v x y : Fin n โ†’ F) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
(smulKron 1 (Weyl.wZ v) * M) x y = sgn (Weyl.trDot v x) โ€ข M x y
theorem MIPRE.Introspection.mul_smulKron_wZ_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (v x y : Fin n โ†’ F) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
(M * smulKron 1 (Weyl.wZ v)) x y = sgn (Weyl.trDot v y) โ€ข M x y
theorem MIPRE.Introspection.smulKron_wZ_conjugate_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (v x y : Fin n โ†’ F) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
(smulKron 1 (Weyl.wZ v) * M * smulKron 1 (Weyl.wZ v)) x y = sgn (Weyl.trDot v (x + y)) โ€ข M x y
noncomputable def MIPRE.Introspection.dephaseZ {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ

Average over the full Z Pauli family on the register.

Equations
Instances For
    theorem MIPRE.Introspection.dephaseZ_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (x y : Fin n โ†’ F) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
    dephaseZ M x y = if x = y then M x y else 0

    The full Z twirl removes precisely the off-diagonal blocks in the sampled register.

    theorem MIPRE.Introspection.smulKron_wX_mul_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (v x y : Fin n โ†’ F) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
    (smulKron 1 (Weyl.wX v) * M) x y = M (x + v) y
    theorem MIPRE.Introspection.mul_smulKron_wX_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (v x y : Fin n โ†’ F) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
    (M * smulKron 1 (Weyl.wX v)) x y = M x (y + v)
    theorem MIPRE.Introspection.smulKron_wX_conjugate_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (v x y : Fin n โ†’ F) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
    (smulKron 1 (Weyl.wX v) * M * smulKron 1 (Weyl.wX v)) x y = M (x + v) (y + v)
    noncomputable def MIPRE.Introspection.averageX {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (K : Submodule F (Fin n โ†’ F)) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
    Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ

    Average the X Pauli conjugations belonging to a subspace.

    Equations
    Instances For
      noncomputable def MIPRE.Introspection.averagedBlock {F : Type u_1} [Field F] [Fintype F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (K : Submodule F (Fin n โ†’ F)) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) (x : Fin n โ†’ F) :
      ๐’œ

      The diagonal ancillary block obtained by averaging the fiber through x.

      Equations
      Instances For
        theorem MIPRE.Introspection.averageX_dephaseZ_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (K : Submodule F (Fin n โ†’ F)) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) (x y : Fin n โ†’ F) :
        averageX K (dephaseZ M) x y = if x = y then averagedBlock K M x else 0

        First dephasing, then averaging X(K), leaves only the averaged diagonal blocks.

        theorem MIPRE.Introspection.averagedBlock_eq_of_sub_mem {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (K : Submodule F (Fin n โ†’ F)) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) (x y : Fin n โ†’ F) (hxy : x - y โˆˆ K) :

        The averaged ancillary block is constant on each coset of the twirled subspace.

        theorem MIPRE.Introspection.synOf_wZ_entry {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} (L : (Fin n โ†’ F) โ†’โ‚—[F] Fin n โ†’ F) (a x y : Fin n โ†’ F) :
        Weyl.synOf Weyl.wZ (โ‡‘L) a x y = if x = y then if L x = a then 1 else 0 else 0
        theorem MIPRE.Introspection.linear_twirl_blocks {F : Type u_1} [Field F] [Fintype F] [DecidableEq F] [Algebra (ZMod 2) F] {n : โ„•} {๐’œ : Type u_2} [Ring ๐’œ] [Algebra โ„‚ ๐’œ] (L : (Fin n โ†’ F) โ†’โ‚—[F] Fin n โ†’ F) (M : Matrix (Fin n โ†’ F) (Fin n โ†’ F) ๐’œ) :
        averageX L.ker (dephaseZ M) = โˆ‘ a : Fin n โ†’ F, smulKron (averagedBlock L.ker M (linearPreimage L a)) (Weyl.synOf Weyl.wZ (โ‡‘L) a)

        The exact block decomposition used by the hiding argument, including an arbitrary ancilla.