Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Theory of Quantum Circuits with Abelian Symmetries

Definition
QAlgorithms_Papers_Independent_Intake100_P83

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

prove2quantum

The objects the formalized statements of Theory of Quantum Circuits with Abelian Symmetries (arXiv:2302.12466) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • Words
  • IsOnsite: PDF p.6: the diagonal entries are unit-modulus characters of the same group.
  • productCharacter: PDF pp.4,6: the character of an actual product basis vector, including the empty product.
  • productSymmetryMatrix: PDF p.4: the actual system representation u(g) tensor n in the chosen product basis.
  • charges: PDF p.20: only characters actually occurring in this tensor power are counted.
  • chargeCount: PDF p.20: the number of distinct occurring characters, not the number of basis strings.
  • embedOnSites: PDF p.4: embedding on any ordered list of distinct named sites, with identity outside it.
  • IsSupportedOnAtMost: PDF p.4: acts on at most k sites; zero-site scalar operators are allowed.
  • CommutesWithSymmetry: PDF p.4: symmetry means commutation with the specified tensor-power action at every g.
  • finiteGateProducts: PDF p.4: exact finite products in temporal order; the empty word gives identity.
  • symmetricLocalGroup: PDF p.4: the actual group generated by individually invariant local unitary gates.
  • derived: PDF pp.5,19: the derived subgroup, generated by actual multiplicative commutators.
  • symmetricCircuitCommutant: PDF p.6 Eq.(6): the full complex operator commutant.
  • blockPreservingUnitaries: PDF pp.5,6: block-diagonality for a relation on the physical product basis.
  • blockSpecial: PDF pp.5,6: determinant one independently on every whole physical block. Representatives may repeat a block; each determinant is taken on its full support.
  • sameCharge: PDF p.6: equal charge means equality of complete character functions on all G.
  • SemiUniversal: PDF p.5 Eq.(5): every independent charge-block special unitary is realizable.
  • NoExtra: PDF p.6 Eq.(6), including the fixed second equality with the representation span.
  • CommDimension: PDF p.6 Eq.(7): dimension of the complex commutant.
  • basisPath: PDF pp.7,12: a finite path with both endpoints, allowing a one-vertex path.
  • TransitiveCharges: PDF p.7 Theorem 2 prime, condition 3.
  • component: PDF p.12 Eq.(28): canonical joint-eigenspace relation of the actual commutant. This is defined from the generated group, not from the desired basis paths.
  • componentSpace: PDF p.12: the full physical span of one commutant-defined basis block.
  • InvariantSpace: PDF p.12: invariance under every actually generated unitary.
  • ComponentDecomposition: PDF pp.6,12: completeness, orthogonality, charge refinement and actual irreducibility.
  • reservoirLength: PDF p.7 Eq.(13): the least positive reservoir length attaining the n-site charge count. For n positive the defining set contains n; no default infimum is used in a theorem.
  • leftRegularPermutationMatrix: PDF p.7: left regular action, |h> maps to |g h>.
  • IsRegularOnsiteRepresentation: PDF p.7: the chosen diagonal representation is unitarily equivalent to the regular one.
  • traceCharacter: PDF pp.7,18: the actual trace character of one qudit.
  • localChargeSpan: PDF pp.19-20: real span of the complete functions r^(n-k) f_mu on all G.
  • lieSpace: PDF p.19: the actual Lie algebra, characterized by one-parameter subgroups. Its real linear span is used, never a freely supplied Lie-algebra dimension.
  • groupDimension: PDF p.19: real Lie dimension of the actual generated subgroup.
  • CompactLie: PDF p.18: a compact finite-dimensional real Lie group, with its actual topology.
  • cyclicPhases: PDF pp.5,8: the specified Z_p qubit representation, on its actual residues. Only the values are needed to define commutation; no abstract charge labels are supplied.
  • excitationPhases: PDF p.7: diag(1,z) for z on the unit circle, equivalent for invariance to z rotations.
  • residueCharge: PDF p.8: total Z_p charge is excitation number modulo p.
  • basisMatrixUnit: PDF p.13: the dyad |r><s| on the complete physical Hilbert space.
  • twoX: PDF p.13: the two-level X operator, zero on every other basis vector.
  • twoY: PDF p.13: the paper's Y has +i on |r><s|, hence is minus the usual ordered Pauli Y.
  • twoZ: PDF p.13: Z = (i/2)[X,Y] = |r><r| - |s><s|.
  • positiveImaginaryEvolution: PDF pp.8,13: the source's positive-sign exponential exp(i theta H).
  • RedistributionTransition: PDF p.8: a redistribution dyad on at most k qudits, with its actual local basis labels.
  • transitionOps: PDF p.8 Eq.(18): allowed embeddings of the Hermitian partial swaps, not permutation swaps.
  • Redistributes: PDF p.8: R is invariant and acts transitively at the stated k-site scale.
  • czFamily: PDF pp.8,14: all named-site two-qudit controlled phases from Eq.(37).
  • phaseFamily: PDF p.8: the fixed pi/2 phase on each on-site basis vector, on every site.
  • synthesisFamily: PDF p.8 Corollary 5: exactly the three stated gate families.
  • liftOneQubitMatrix: PDF p.9: a one-qubit matrix expressed on the one-site register, without changing bit order.
  • twoSite: PDF p.9: a two-qubit matrix on the first and second named local sites.
  • sFamily: PDF pp.8-9: S on every named site, reusing the accepted phaseS matrix.
  • standardCZFamily: PDF p.9: the CZ gate on each pair of distinct sites.
  • rotationFamily: PDF p.9: continuous rotations of H on every embedding of its local sites.
  • exchangeHamiltonian: PDF p.9 Eq.(20): the full XX+YY generator, retaining the source's angular convention.
  • excitationFamily: PDF p.9: the explicit U(1) synthesis family, including all four gates of Eq.(19).
  • cyclicSynthesisGates: PDF p.9: add the simultaneous flip of p excitations, on any p named sites.
  • parityFamily: PDF p.9 Corollary 6: XX rotations, S, and all four controlled phases of Eq.(19).
  • DefiniteCharge: PDF p.9: an arbitrary normalized on-site state supported in one actually occurring charge.
  • appendAncilla: PDF pp.9-10: system tensor ancilla, the ancilla is the final wire.
  • ImplementsWithAncilla: PDF pp.9-10: exact returned-ancilla implementation, uniformly for every system vector.
  • divideByOnsiteCharacter: PDF p.20: divide by an actually occurring on-site character; invariant operators are unchanged.
  • characterProducts: PDF p.20: pointwise products of two finite sets of complete characters.
  • parityZ: PDF p.9 Eq.(22): tensor-product Pauli Z, with its standard computational-basis sign.
  • parityDet: PDF p.9 Eq.(23): determinant on the entire even or odd physical sector.
  • controlGroup: PDF pp.4,11: exact control by finite concatenations of local symmetric Hamiltonian pulses.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Gates
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P21

/-!
# Theory of quantum circuits with Abelian symmetries

Source: I. Marvian, arXiv:2302.12466v3. All page numbers below are PDF pages.
A finite nonempty alphabet is the chosen orthonormal on-site basis; its cardinality is d.
For alphabet Bool the register is definitionally the accepted QAlgorithms.Qubits register.
The phase functions specify the actual diagonal on-site representation; system actions are
its tensor powers. No closure is taken in the finite-product synthesis definitions.
-/

noncomputable section

open scoped BigOperators ComplexConjugate Matrix Kronecker Manifold ContDiff

attribute [local instance] Classical.propDecidable

open QAlgorithms.Papers.Independent.Information100.P21 (Op)

namespace QAlgorithms.Papers.Independent.Intake100.P83

abbrev Words (A : Type*) (n : ℕ) := Fin n → A

variable {A G : Type*} [Fintype A] [DecidableEq A]

/-- PDF p.6: the diagonal entries are unit-modulus characters of the same group. -/
def IsOnsite [Monoid G] (chi : A → G → ℂ) : Prop :=
  ∀ a, chi a 1 = 1 ∧ (∀ g h, chi a (g * h) = chi a g * chi a h) ∧
    ∀ g, ‖chi a g‖ = 1

/-- PDF pp.4,6: the character of an actual product basis vector, including the empty product. -/
def productCharacter (chi : A → G → ℂ) {n : ℕ} (r : Words A n) : G → ℂ :=
  fun g => ∏ j, chi (r j) g

/-- PDF p.4: the actual system representation u(g) tensor n in the chosen product basis. -/
def productSymmetryMatrix (chi : A → G → ℂ) (n : ℕ) (g : G) : Op (Words A n) :=
  Matrix.diagonal fun r => productCharacter chi r g

/-- PDF p.20: only characters actually occurring in this tensor power are counted. -/
def charges (chi : A → G → ℂ) (n : ℕ) : Finset (G → ℂ) := by
  classical
  exact Finset.univ.image (fun r : Words A n => productCharacter chi r)

/-- PDF p.20: the number of distinct occurring characters, not the number of basis strings. -/
def chargeCount (chi : A → G → ℂ) (n : ℕ) : ℕ := (charges chi n).card

/-- PDF p.4: embedding on any ordered list of distinct named sites, with identity outside it. -/
def embedOnSites {l n : ℕ} (f : Fin l ↪ Fin n) (B : Op (Words A l)) : Op (Words A n) := by
  classical
  exact fun r s =>
    if ∀ j, j ∉ Set.range f → r j = s j then B (r ∘ f) (s ∘ f) else 0

/-- PDF p.4: acts on at most k sites; zero-site scalar operators are allowed. -/
def IsSupportedOnAtMost {n : ℕ} (k : ℕ) (B : Op (Words A n)) : Prop :=
  ∃ l, l ≤ k ∧ ∃ f : Fin l ↪ Fin n, ∃ C : Op (Words A l), B = embedOnSites f C

/-- PDF p.4: symmetry means commutation with the specified tensor-power action at every g. -/
def CommutesWithSymmetry (chi : A → G → ℂ) {n : ℕ} (B : Op (Words A n)) : Prop :=
  ∀ g, B * productSymmetryMatrix chi n g = productSymmetryMatrix chi n g * B

/-- PDF p.4: exact finite products in temporal order; the empty word gives identity. -/
def finiteGateProducts {n : ℕ} (S : Set (Op (Words A n))) : Set (Op (Words A n)) :=
  {B | ∃ L : List (Op (Words A n)), (∀ C ∈ L, C ∈ S) ∧ L.reverse.prod = B}

/-- PDF p.4: the actual group generated by individually invariant local unitary gates. -/
def symmetricLocalGroup (chi : A → G → ℂ) (n k : ℕ) : Set (Op (Words A n)) :=
  finiteGateProducts {B | B ∈ Matrix.unitaryGroup (Words A n) ℂ ∧ IsSupportedOnAtMost k B ∧ CommutesWithSymmetry chi B}

/-- PDF pp.5,19: the derived subgroup, generated by actual multiplicative commutators. -/
def derived {n : ℕ} (V : Set (Op (Words A n))) : Set (Op (Words A n)) :=
  finiteGateProducts {C | ∃ U ∈ V, ∃ W ∈ V, C = U * W * U.conjTranspose * W.conjTranspose}

/-- PDF p.6 Eq.(6): the full complex operator commutant. -/
def symmetricCircuitCommutant {n : ℕ} (V : Set (Op (Words A n))) : Submodule ℂ (Op (Words A n)) where
  carrier := {B | ∀ U ∈ V, B * U = U * B}
  zero_mem' := by simp
  add_mem' := by
    intro B C hB hC U hU
    simp only [Matrix.add_mul, Matrix.mul_add, hB U hU, hC U hU]
  smul_mem' := by
    intro z B hB U hU
    simp only [Matrix.smul_mul, Matrix.mul_smul, hB U hU]

/-- PDF pp.5,6: block-diagonality for a relation on the physical product basis. -/
def blockPreservingUnitaries {n : ℕ} (R : Words A n → Words A n → Prop) : Set (Op (Words A n)) :=
  {U | U ∈ Matrix.unitaryGroup (Words A n) ℂ ∧ ∀ r s, ¬ R r s → U r s = 0}

/-- PDF pp.5,6: determinant one independently on every whole physical block.
Representatives may repeat a block; each determinant is taken on its full support. -/
def blockSpecial {n : ℕ} (R : Words A n → Words A n → Prop) : Set (Op (Words A n)) := by
  classical
  exact {U | U ∈ blockPreservingUnitaries R ∧ ∀ r,
    Matrix.det (U.submatrix (fun s : {s // R r s} => s.val)
      (fun s : {s // R r s} => s.val)) = 1}

/-- PDF p.6: equal charge means equality of complete character functions on all G. -/
def sameCharge (chi : A → G → ℂ) (n : ℕ) (r s : Words A n) : Prop :=
  productCharacter chi r = productCharacter chi s

/-- PDF p.5 Eq.(5): every independent charge-block special unitary is realizable. -/
def SemiUniversal (chi : A → G → ℂ) (n k : ℕ) : Prop :=
  blockSpecial (sameCharge chi n) ⊆ symmetricLocalGroup chi n k

/-- PDF p.6 Eq.(6), including the fixed second equality with the representation span. -/
def NoExtra (chi : A → G → ℂ) (n k : ℕ) : Prop :=
  symmetricCircuitCommutant (symmetricLocalGroup chi n k) = symmetricCircuitCommutant (symmetricLocalGroup chi n n) ∧
  symmetricCircuitCommutant (symmetricLocalGroup chi n n) = Submodule.span ℂ (Set.range (productSymmetryMatrix chi n))

/-- PDF p.6 Eq.(7): dimension of the complex commutant. -/
def CommDimension (chi : A → G → ℂ) (n k : ℕ) : Prop :=
  Module.finrank ℂ (symmetricCircuitCommutant (symmetricLocalGroup chi n k)) = chargeCount chi n

/-- PDF pp.7,12: a finite path with both endpoints, allowing a one-vertex path. -/
def basisPath {n : ℕ} (k : ℕ) (C : Words A n → Prop) (r s : Words A n) : Prop :=
  ∃ m : ℕ, ∃ v : Fin (m + 1) → Words A n,
    v 0 = r ∧ v (Fin.last m) = s ∧ (∀ j, C (v j)) ∧
    ∀ j : Fin m, hammingDist (v j.castSucc) (v j.succ) ≤ k

/-- PDF p.7 Theorem 2 prime, condition 3. -/
def TransitiveCharges (chi : A → G → ℂ) (n k : ℕ) : Prop :=
  ∀ r s : Words A n, sameCharge chi n r s →
    basisPath k (fun t => sameCharge chi n r t) r s

/-- PDF p.12 Eq.(28): canonical joint-eigenspace relation of the actual commutant.
This is defined from the generated group, not from the desired basis paths. -/
def component (chi : A → G → ℂ) (n k : ℕ) (r s : Words A n) : Prop :=
  ∀ B ∈ symmetricCircuitCommutant (symmetricLocalGroup chi n k), B r r = B s s

/-- PDF p.12: the full physical span of one commutant-defined basis block. -/
def componentSpace (chi : A → G → ℂ) (n k : ℕ) (r : Words A n) :
    Submodule ℂ (EuclideanSpace ℂ (Words A n)) :=
  Submodule.span ℂ {v | ∃ s, component chi n k r s ∧ v = QAlgorithms.ket s}

/-- PDF p.12: invariance under every actually generated unitary. -/
def InvariantSpace {n : ℕ} (V : Set (Op (Words A n)))
    (S : Submodule ℂ (EuclideanSpace ℂ (Words A n))) : Prop :=
  ∀ U ∈ V, ∀ v ∈ S, QAlgorithms.act U v ∈ S

/-- PDF pp.6,12: completeness, orthogonality, charge refinement and actual irreducibility. -/
def ComponentDecomposition (chi : A → G → ℂ) (n k : ℕ) : Prop :=
  Equivalence (component chi n k) ∧
  (⨆ r, componentSpace chi n k r) = ⊤ ∧
  (∀ r s, ¬ component chi n k r s →
    ∀ v ∈ componentSpace chi n k r, ∀ w ∈ componentSpace chi n k s,
      inner ℂ v w = 0) ∧
  (∀ r s, component chi n k r s → sameCharge chi n r s) ∧
  ∀ r, componentSpace chi n k r ≠ ⊥ ∧
    InvariantSpace (symmetricLocalGroup chi n k) (componentSpace chi n k r) ∧
    ∀ S : Submodule ℂ (EuclideanSpace ℂ (Words A n)),
      S ≤ componentSpace chi n k r → InvariantSpace (symmetricLocalGroup chi n k) S →
        S = ⊥ ∨ S = componentSpace chi n k r

/-- PDF p.7 Eq.(13): the least positive reservoir length attaining the n-site charge count.
For n positive the defining set contains n; no default infimum is used in a theorem. -/
def reservoirLength (chi : A → G → ℂ) (n : ℕ) : ℕ :=
  sInf {l : ℕ | 0 < l ∧ chargeCount chi l = chargeCount chi n}

/-- PDF p.7: left regular action, |h> maps to |g h>. -/
def leftRegularPermutationMatrix [Group G] [DecidableEq G] (g : G) : Matrix G G ℂ :=
  fun h j => if h = g * j then 1 else 0

/-- PDF p.7: the chosen diagonal representation is unitarily equivalent to the regular one. -/
def IsRegularOnsiteRepresentation [Group G] [Fintype G] [DecidableEq G] (chi : A → G → ℂ) : Prop :=
  ∃ T : Matrix A G ℂ, T * T.conjTranspose = 1 ∧ T.conjTranspose * T = 1 ∧
    ∀ g, Matrix.diagonal (fun a => chi a g) * T = T * leftRegularPermutationMatrix g

/-- PDF pp.7,18: the actual trace character of one qudit. -/
def traceCharacter (chi : A → G → ℂ) : G → ℂ := fun g => ∑ a, chi a g

/-- PDF pp.19-20: real span of the complete functions r^(n-k) f_mu on all G. -/
def localChargeSpan (chi : A → G → ℂ) (n k : ℕ) : Submodule ℝ (G → ℂ) :=
  Submodule.span ℝ {f | ∃ c ∈ charges chi k,
    f = fun g => traceCharacter chi g ^ (n - k) * c g}

/-- PDF p.19: the actual Lie algebra, characterized by one-parameter subgroups.
Its real linear span is used, never a freely supplied Lie-algebra dimension. -/
def lieSpace {n : ℕ} (V : Set (Op (Words A n))) : Submodule ℝ (Op (Words A n)) :=
  Submodule.span ℝ {B | B.conjTranspose = -B ∧
    ∀ t : ℝ, NormedSpace.exp (t • B) ∈ V}

/-- PDF p.19: real Lie dimension of the actual generated subgroup. -/
def groupDimension {n : ℕ} (V : Set (Op (Words A n))) : ℕ := Module.finrank ℝ (lieSpace V)

/-- PDF p.18: a compact finite-dimensional real Lie group, with its actual topology. -/
def CompactLie (G : Type*) [Group G] [TopologicalSpace G] : Prop :=
  CompactSpace G ∧ T2Space G ∧
  ∃ m : ℕ, ∃ atlas : ChartedSpace (EuclideanSpace ℝ (Fin m)) G,
    letI := atlas
    IsManifold (𝓘(ℝ, EuclideanSpace ℝ (Fin m))) ∞ G ∧
      LieGroup (𝓘(ℝ, EuclideanSpace ℝ (Fin m))) ∞ G

/-- PDF pp.5,8: the specified Z_p qubit representation, on its actual residues.
Only the values are needed to define commutation; no abstract charge labels are supplied. -/
def cyclicPhases (p : ℕ) : Bool → ZMod p → ℂ :=
  fun b a => if b then Complex.exp (Complex.I * (2 * Real.pi * (a.val : ℝ) / p)) else 1

/-- PDF p.7: diag(1,z) for z on the unit circle, equivalent for invariance to z rotations. -/
def excitationPhases : Bool → Circle → ℂ := fun b z => if b then (z : ℂ) else 1

/-- PDF p.8: total Z_p charge is excitation number modulo p. -/
def residueCharge (p : ℕ) {n : ℕ} (r : Words Bool n) : ZMod p :=
  (QAlgorithms.hammingWeight r : ZMod p)

/-- PDF p.13: the dyad |r><s| on the complete physical Hilbert space. -/
def basisMatrixUnit {n : ℕ} (r s : Words A n) : Op (Words A n) := by
  classical
  exact fun a b => if a = r ∧ b = s then 1 else 0

/-- PDF p.13: the two-level X operator, zero on every other basis vector. -/
def twoX {n : ℕ} (r s : Words A n) : Op (Words A n) := basisMatrixUnit r s + basisMatrixUnit s r

/-- PDF p.13: the paper's Y has +i on |r><s|, hence is minus the usual ordered Pauli Y. -/
def twoY {n : ℕ} (r s : Words A n) : Op (Words A n) := Complex.I • (basisMatrixUnit r s - basisMatrixUnit s r)

/-- PDF p.13: Z = (i/2)[X,Y] = |r><r| - |s><s|. -/
def twoZ {n : ℕ} (r s : Words A n) : Op (Words A n) := basisMatrixUnit r r - basisMatrixUnit s s

/-- PDF pp.8,13: the source's positive-sign exponential exp(i theta H). -/
def positiveImaginaryEvolution {n : ℕ} (H : Op (Words A n)) (theta : ℝ) : Op (Words A n) :=
  NormedSpace.exp ((Complex.I * (theta : ℂ)) • H)

/-- PDF p.8: a redistribution dyad on at most k qudits, with its actual local basis labels. -/
structure RedistributionTransition (A : Type*) (k : ℕ) where
  arity : ℕ
  bound : arity ≤ k
  left : Words A arity
  right : Words A arity

/-- PDF p.8 Eq.(18): allowed embeddings of the Hermitian partial swaps, not permutation swaps. -/
def transitionOps {k : ℕ} (R : Set (RedistributionTransition A k)) (n : ℕ) : Set (Op (Words A n)) :=
  {B | ∃ t ∈ R, ∃ f : Fin t.arity ↪ Fin n, B = embedOnSites f (twoX t.left t.right)}

/-- PDF p.8: R is invariant and acts transitively at the stated k-site scale. -/
def Redistributes (chi : A → G → ℂ) (k : ℕ) (R : Set (RedistributionTransition A k)) : Prop :=
  (∀ t ∈ R, CommutesWithSymmetry chi (twoX t.left t.right)) ∧
  ∀ r s : Words A k, sameCharge chi k r s →
    ∃ L : List (Op (Words A k)), (∀ B ∈ L, B ∈ transitionOps R k) ∧
      QAlgorithms.act L.reverse.prod (QAlgorithms.ket r) = QAlgorithms.ket s

/-- PDF pp.8,14: all named-site two-qudit controlled phases from Eq.(37). -/
def czFamily (A : Type*) [Fintype A] [DecidableEq A] (n : ℕ) : Set (Op (Words A n)) :=
  {B | ∃ f : Fin 2 ↪ Fin n, ∃ r : Words A 2,
    B = embedOnSites f (1 - (2 : ℂ) • basisMatrixUnit r r)}

/-- PDF p.8: the fixed pi/2 phase on each on-site basis vector, on every site. -/
def phaseFamily (A : Type*) [Fintype A] [DecidableEq A] (n : ℕ) : Set (Op (Words A n)) :=
  {B | ∃ f : Fin 1 ↪ Fin n, ∃ a : A,
    B = embedOnSites f (positiveImaginaryEvolution (basisMatrixUnit (fun _ => a) (fun _ => a)) (Real.pi / 2))}

/-- PDF p.8 Corollary 5: exactly the three stated gate families. -/
def synthesisFamily {k : ℕ} (R : Set (RedistributionTransition A k)) (n : ℕ) : Set (Op (Words A n)) :=
  phaseFamily A n ∪ czFamily A n ∪
    {B | ∃ t ∈ R, ∃ f : Fin t.arity ↪ Fin n, ∃ theta ∈ Set.Ico (0 : ℝ) (2 * Real.pi),
      B = embedOnSites f (positiveImaginaryEvolution (twoX t.left t.right) theta)}

/-- PDF p.9: a one-qubit matrix expressed on the one-site register, without changing bit order. -/
def liftOneQubitMatrix (B : Matrix Bool Bool ℂ) : Op (Words Bool 1) := fun r s => B (r 0) (s 0)

/-- PDF p.9: a two-qubit matrix on the first and second named local sites. -/
def twoSite (B : Matrix (Bool × Bool) (Bool × Bool) ℂ) : Op (Words Bool 2) :=
  fun r s => B (r 0, r 1) (s 0, s 1)

/-- PDF pp.8-9: S on every named site, reusing the accepted phaseS matrix. -/
def sFamily (n : ℕ) : Set (Op (Words Bool n)) :=
  {B | ∃ f : Fin 1 ↪ Fin n, B = embedOnSites f (liftOneQubitMatrix QAlgorithms.phaseS)}

/-- PDF p.9: the CZ gate on each pair of distinct sites. -/
def standardCZFamily (n : ℕ) : Set (Op (Words Bool n)) :=
  {B | ∃ f : Fin 2 ↪ Fin n, B = embedOnSites f
    (1 - (2 : ℂ) • basisMatrixUnit (fun _ => true) (fun _ => true))}

/-- PDF p.9: continuous rotations of H on every embedding of its local sites. -/
def rotationFamily {l : ℕ} (H : Op (Words Bool l)) (n : ℕ) : Set (Op (Words Bool n)) :=
  {B | ∃ f : Fin l ↪ Fin n, ∃ theta ∈ Set.Ico (0 : ℝ) (2 * Real.pi),
    B = embedOnSites f (positiveImaginaryEvolution H theta)}

/-- PDF p.9 Eq.(20): the full XX+YY generator, retaining the source's angular convention. -/
def exchangeHamiltonian : Op (Words Bool 2) :=
  twoSite (QAlgorithms.pauliX ⊗ₖ QAlgorithms.pauliX + QAlgorithms.pauliY ⊗ₖ QAlgorithms.pauliY)

/-- PDF p.9: the explicit U(1) synthesis family, including all four gates of Eq.(19). -/
def excitationFamily (n : ℕ) : Set (Op (Words Bool n)) :=
  sFamily n ∪ czFamily Bool n ∪ rotationFamily exchangeHamiltonian n

/-- PDF p.9: add the simultaneous flip of p excitations, on any p named sites. -/
def cyclicSynthesisGates (p n : ℕ) : Set (Op (Words Bool n)) :=
  excitationFamily n ∪ rotationFamily (twoX (fun _ : Fin p => false) (fun _ => true)) n

/-- PDF p.9 Corollary 6: XX rotations, S, and all four controlled phases of Eq.(19). -/
def parityFamily (n : ℕ) : Set (Op (Words Bool n)) :=
  sFamily n ∪ czFamily Bool n ∪
    rotationFamily (twoSite (QAlgorithms.pauliX ⊗ₖ QAlgorithms.pauliX)) n

/-- PDF p.9: an arbitrary normalized on-site state supported in one actually occurring charge. -/
def DefiniteCharge (chi : A → G → ℂ) (a : EuclideanSpace ℂ A) : Prop :=
  ∃ j : A, ∀ i, a i ≠ 0 → chi i = chi j

/-- PDF pp.9-10: system tensor ancilla, the ancilla is the final wire. -/
def appendAncilla {n : ℕ} (v : EuclideanSpace ℂ (Words A n)) (a : EuclideanSpace ℂ A) :
    EuclideanSpace ℂ (Words A (n + 1)) :=
  WithLp.toLp 2 (fun r => v (fun j => r j.castSucc) * a (r (Fin.last n)))

/-- PDF pp.9-10: exact returned-ancilla implementation, uniformly for every system vector. -/
def ImplementsWithAncilla (chi : A → G → ℂ) (n k : ℕ)
    (a : EuclideanSpace ℂ A) (V : Op (Words A n)) : Prop :=
  ∃ W ∈ symmetricLocalGroup chi (n + 1) k, ∀ v : EuclideanSpace ℂ (Words A n),
    QAlgorithms.act W (appendAncilla v a) = appendAncilla (QAlgorithms.act V v) a

/-- PDF p.20: divide by an actually occurring on-site character; invariant operators are unchanged. -/
def divideByOnsiteCharacter (chi : A → G → ℂ) (a : A) : A → G → ℂ :=
  fun b g => chi b g / chi a g

/-- PDF p.20: pointwise products of two finite sets of complete characters. -/
def characterProducts (S T : Finset (G → ℂ)) : Finset (G → ℂ) := by
  classical
  exact (S.product T).image (fun p => fun g => p.1 g * p.2 g)

/-! Sanity examples pin non-tautological boundaries and the finite-product convention.
They are definition checks, not proofs of the paper's targets. -/

example {n : ℕ} (S : Set (Op (Words A n))) : (1 : Op (Words A n)) ∈ finiteGateProducts S := by
  exact ⟨[], by simp, by simp⟩

example (chi : A → G → ℂ) (r : Words A 0) (g : G) : productCharacter chi r g = 1 := by
  simp [productCharacter]

example {n : ℕ} (r : Words A n) : hammingDist r r = 0 := by
  exact hammingDist_self r

example {n : ℕ} (k : ℕ) (r : Words A n) : basisPath k (fun _ => True) r r := by
  refine ⟨0, fun _ => r, rfl, rfl, ?_, ?_⟩
  · intro j; trivial
  · intro j; exact Fin.elim0 j

example {n : ℕ} (r s : Words A n) : basisMatrixUnit r s r s = 1 := by
  simp [basisMatrixUnit]

example [Group G] [DecidableEq G] (g h : G) : leftRegularPermutationMatrix g (g * h) h = 1 := by
  simp [leftRegularPermutationMatrix]

example : liftOneQubitMatrix QAlgorithms.phaseS (fun _ => true) (fun _ => true) = Complex.I := by
  simp [liftOneQubitMatrix, QAlgorithms.phaseS]

/-- PDF p.9 Eq.(22): tensor-product Pauli Z, with its standard computational-basis sign. -/
def parityZ (n : ℕ) : Op (Words Bool n) :=
  Matrix.diagonal fun r => (-1 : ℂ) ^ QAlgorithms.hammingWeight r

/-- PDF p.9 Eq.(23): determinant on the entire even or odd physical sector. -/
def parityDet {n : ℕ} (V : Op (Words Bool n)) (b : Bool) : ℂ := by
  classical
  let support := {r : Words Bool n // QAlgorithms.hammingWeight r % 2 = if b then 1 else 0}
  exact Matrix.det (V.submatrix (fun r : support => r.val) (fun r : support => r.val))

/-- PDF pp.4,11: exact control by finite concatenations of local symmetric Hamiltonian pulses. -/
def controlGroup (chi : A → G → ℂ) (n k : ℕ) : Set (Op (Words A n)) :=
  finiteGateProducts {U | ∃ H : Op (Words A n), H.IsHermitian ∧ IsSupportedOnAtMost k H ∧ CommutesWithSymmetry chi H ∧
    ∃ theta : ℝ, U = positiveImaginaryEvolution H theta}

end QAlgorithms.Papers.Independent.Intake100.P83
Source
Theory of Quantum Circuits with Abelian Symmetries, arXiv:2302.12466v3, https://arxiv.org/abs/2302.12466v3
Read-back

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

QAlgorithms.Papers.Independent.Intake100.P83.CommDimension

For a finite alphabet AAA with decidable equality, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and natural numbers n,kn,kn,k, put Ω=A{0,…,n−1}\Omega=A^{\{0,\ldots,n-1\}}Ω=A{0,…,n−1}, qr(g)=∏j=0n−1χ(rj,g)q_r(g)=\prod_{j=0}^{n-1}\chi(r_j,g)qr​(g)=∏j=0n−1​χ(rj​,g), and Dg=diag⁡(qr(g))r∈ΩD_g=\operatorname{diag}(q_r(g))_{r\in\Omega}Dg​=diag(qr​(g))r∈Ω​. Let KKK be the set of finite products Bt⋯B1B_t\cdots B_1Bt​⋯B1​ whose factors are unitary, commute with every DgD_gDg​, and have the following form: for some natural ℓ≤k\ell\le kℓ≤k, injection f:{0,…,ℓ−1}↪{0,…,n−1}f:\{0,\ldots,\ell-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,ℓ−1}↪{0,…,n−1}, and matrix CCC on length-ℓ\ellℓ words, Br,s=C(r∘f,s∘f)B_{r,s}=C(r\circ f,s\circ f)Br,s​=C(r∘f,s∘f) when r,sr,sr,s agree outside the image of fff, and Br,s=0B_{r,s}=0Br,s​=0 otherwise. This proposition asserts

dim⁡C{B:∀U∈K, BU=UB}=∣{qr:r∈Ω}∣,\dim_{\mathbb C}\{B:\forall U\in K,\ BU=UB\} = \bigl|\{q_r:r\in\Omega\}\bigr|,dimC​{B:∀U∈K, BU=UB}=​{qr​:r∈Ω}​,

where the right side counts distinct functions G→CG\to\mathbb CG→C, rather than words with multiplicity. Empty products give the identity, and n,kn,kn,k may be zero; at n=0n=0n=0 there is one product function, the constant function 111. No representation condition on χ\chiχ is assumed.

QAlgorithms.Papers.Independent.Intake100.P83.CommutesWithSymmetry

For a finite alphabet AAA with decidable equality, a type GGG, a function χ:A×G→C\chi:A\times G\to\mathbb Cχ:A×G→C, a natural number nnn, and a complex square matrix BBB indexed by length-nnn words, this predicate requires

BDg=DgBfor every g∈G,BD_g=D_gB\qquad\text{for every }g\in G,BDg​=Dg​Bfor every g∈G,

where DgD_gDg​ is diagonal with Dg(r,r)=∏j=0n−1χ(rj,g)D_g(r,r)=\prod_{j=0}^{n-1}\chi(r_j,g)Dg​(r,r)=∏j=0n−1​χ(rj​,g). Neither unitarity of BBB nor any condition on χ\chiχ is assumed. If GGG is empty, the requirement is vacuous; at n=0n=0n=0, each DgD_gDg​ is the identity.

QAlgorithms.Papers.Independent.Intake100.P83.CompactLie

For a type GGG equipped with a group structure and a topology, this predicate means that GGG is compact and Hausdorff, and that there exist a natural number mmm and a charted-space structure on GGG modeled on the real Euclidean space Rm\mathbb R^mRm such that, with that chosen structure and the standard smooth model on Rm\mathbb R^mRm, GGG is a smooth manifold and a smooth Lie group. Thus multiplication and inversion must be smooth for the chosen structure. The dimension m=0m=0m=0 is permitted, and the definition asserts existence of such a structure without specifying one uniquely.

QAlgorithms.Papers.Independent.Intake100.P83.ComponentDecomposition

For a finite alphabet AAA with decidable equality, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and natural numbers n,kn,kn,k, let HHH be the complex Euclidean space indexed by words r:{0,…,n−1}→Ar:\{0,\ldots,n-1\}\to Ar:{0,…,n−1}→A. Let U\mathcal UU consist of all finite products of unitary matrices on HHH that each act on at most kkk sites and commute, for every g∈Gg\in Gg∈G, with the diagonal matrix having entry ∏jχ(rj,g)\prod_j\chi(r_j,g)∏j​χ(rj​,g) at rrr. Here acting on at most kkk sites means having the form Br,s=Cr∘f,s∘fB_{r,s}=C_{r\circ f,s\circ f}Br,s​=Cr∘f,s∘f​ when r,sr,sr,s agree outside the image of an injection f:{0,…,ℓ−1}↪{0,…,n−1}f:\{0,\ldots,\ell-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,ℓ−1}↪{0,…,n−1}, and Br,s=0B_{r,s}=0Br,s​=0 otherwise, for some ℓ≤k\ell\le kℓ≤k and arbitrary local matrix CCC; empty products are allowed and equal the identity. Define r∼sr\sim sr∼s to mean that Br,r=Bs,sB_{r,r}=B_{s,s}Br,r​=Bs,s​ for every complex matrix BBB commuting with every member of U\mathcal UU, and let HrH_rHr​ be the complex span of the coordinate vectors ese_ses​ with r∼sr\sim sr∼s. The predicate holds exactly when ∼\sim∼ is an equivalence relation, the subspaces HrH_rHr​ together span HHH, vectors from HrH_rHr​ and HsH_sHs​ have zero inner product whenever r≁sr\not\sim sr∼s, and r∼sr\sim sr∼s implies equality of the functions g↦∏jχ(rj,g)g\mapsto\prod_j\chi(r_j,g)g↦∏j​χ(rj​,g) and g↦∏jχ(sj,g)g\mapsto\prod_j\chi(s_j,g)g↦∏j​χ(sj​,g); moreover, every HrH_rHr​ is nonzero and preserved by every U∈UU\in\mathcal UU∈U, and every complex linear subspace S⊆HrS\subseteq H_rS⊆Hr​ preserved by every U∈UU\in\mathcal UU∈U is either {0}\{0\}{0} or HrH_rHr​. The parameters n,kn,kn,k may be zero, and no multiplicativity or unit-modulus assumption on χ\chiχ is included.

QAlgorithms.Papers.Independent.Intake100.P83.DefiniteCharge

For types A,GA,GA,G, a function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and a complex Euclidean vector aaa indexed by AAA, this property means that there exists j∈Aj\in Aj∈A such that every i∈Ai\in Ai∈A with ai≠0a_i\ne0ai​=0 satisfies χi=χj\chi_i=\chi_jχi​=χj​ as functions on GGG, meaning χi(g)=χj(g)\chi_i(g)=\chi_j(g)χi​(g)=χj​(g) for every g∈Gg\in Gg∈G. Neither normalization of aaa nor any character property of χ\chiχ is required. For the zero vector, the property holds exactly when AAA is nonempty; if AAA is empty, the required jjj does not exist.

QAlgorithms.Papers.Independent.Intake100.P83.ImplementsWithAncilla

For an alphabet AAA, symmetry-label type GGG, function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, natural numbers n,kn,kn,k, vector a∈CAa\in\mathbb C^Aa∈CA, and complex matrix VVV on length-nnn words, this property asserts the existence of a matrix WWW on length-(n+1)(n+1)(n+1) words that is a finite product Um−1⋯U0U_{m-1}\cdots U_0Um−1​⋯U0​, possibly the empty product III. Each UjU_jUj​ must be unitary, commute with every diagonal matrix

(Dg)r,r=∏t=0nχ(rt,g),(D_g)_{r,r}=\prod_{t=0}^{n}\chi(r_t,g),(Dg​)r,r​=t=0∏n​χ(rt​,g),

and have the following form for some l≤kl\le kl≤k, injection f:{0,…,l−1}↪{0,…,n}f:\{0,\ldots,l-1\}\hookrightarrow\{0,\ldots,n\}f:{0,…,l−1}↪{0,…,n}, and local complex matrix CCC: its entry at r,sr,sr,s equals Cr∘f,s∘fC_{r\circ f,s\circ f}Cr∘f,s∘f​ if r,sr,sr,s agree outside im⁡f\operatorname{im}fimf, and zero otherwise. The required WWW must satisfy W(v⊗a)=(Vv)⊗aW(v\otimes a)=(Vv)\otimes aW(v⊗a)=(Vv)⊗a for every complex Euclidean vector vvv on length-nnn words, where (v⊗a)(r)=v(r0,…,rn−1)a(rn)(v\otimes a)(r)=v(r_0,\ldots,r_{n-1})a(r_n)(v⊗a)(r)=v(r0​,…,rn−1​)a(rn​). No normalization or definite-charge assumption on aaa, unitarity assumption on VVV, or character assumption on χ\chiχ is included. Both n=0n=0n=0 and k=0k=0k=0 are allowed; if a=0a=0a=0, the property holds for every VVV, using W=IW=IW=I.

QAlgorithms.Papers.Independent.Intake100.P83.InvariantSpace

For a finite alphabet AAA, a natural number nnn, any set VVV of complex matrices indexed by Ω=A{0,…,n−1}\Omega=A^{\{0,\ldots,n-1\}}Ω=A{0,…,n−1}, and any complex linear subspace SSS of the Euclidean space CΩ\mathbb C^\OmegaCΩ, this defines the proposition

∀U∈V, ∀v∈S,Uv∈S,(Uv)r=∑s∈ΩUr,svs.\forall U\in V,\ \forall v\in S,\qquad Uv\in S, \qquad (Uv)_r=\sum_{s\in\Omega}U_{r,s}v_s.∀U∈V, ∀v∈S,Uv∈S,(Uv)r​=s∈Ω∑​Ur,s​vs​.

No unitarity assumption on VVV or normalization assumption on vvv is imposed. If VVV is empty, the condition is vacuous; the zero subspace and the value n=0n=0n=0 are allowed.

QAlgorithms.Papers.Independent.Intake100.P83.IsOnsite

For a type AAA, a monoid GGG, and a function χ:A×G→C\chi:A\times G\to\mathbb Cχ:A×G→C, this predicate requires that, for every a∈Aa\in Aa∈A,

χ(a,1)=1,χ(a,gh)=χ(a,g)χ(a,h)for all g,h∈G,∣χ(a,g)∣=1for all g∈G.\chi(a,1)=1,\qquad \chi(a,gh)=\chi(a,g)\chi(a,h)\quad\text{for all }g,h\in G,\qquad |\chi(a,g)|=1\quad\text{for all }g\in G.χ(a,1)=1,χ(a,gh)=χ(a,g)χ(a,h)for all g,h∈G,∣χ(a,g)∣=1for all g∈G.

There is no continuity assumption. If AAA is empty, all these requirements hold vacuously.

QAlgorithms.Papers.Independent.Intake100.P83.IsRegularOnsiteRepresentation

For a finite alphabet AAA with decidable equality, a finite group GGG with decidable equality, and any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, this predicate means that there exists a complex matrix TTT with rows indexed by AAA and columns indexed by GGG such that TT∗=IATT^*=I_ATT∗=IA​, T∗T=IGT^*T=I_GT∗T=IG​, and, for every g∈Gg\in Gg∈G,

diag⁡(χ(a,g))a∈A T=TLg,Lg(h,j)={1,h=gj,0,h≠gj.\operatorname{diag}\bigl(\chi(a,g)\bigr)_{a\in A}\,T=T L_g, \qquad L_g(h,j)= \begin{cases} 1,&h=gj,\\ 0,&h\ne gj. \end{cases}diag(χ(a,g))a∈A​T=TLg​,Lg​(h,j)={1,0,​h=gj,h=gj.​

Here T∗T^*T∗ is the conjugate transpose. The definition includes no separate assumption that the functions χ(a,⋅)\chi(a,\cdot)χ(a,⋅) are homomorphisms or have unit modulus; if no such TTT exists, the predicate is false.

QAlgorithms.Papers.Independent.Intake100.P83.IsSupportedOnAtMost

For any type AAA, natural numbers n,kn,kn,k, and a complex square matrix BBB indexed by length-nnn words, this predicate means that there exist a natural number l≤kl\le kl≤k, an injection f:{0,…,l−1}↪{0,…,n−1}f:\{0,\ldots,l-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,l−1}↪{0,…,n−1}, and a complex square matrix CCC indexed by length-lll words such that

B(r,s)={C(r∘f,s∘f),rj=sj for every j∉range⁡(f),0,otherwise.B(r,s)= \begin{cases} C(r\circ f,s\circ f),& r_j=s_j\text{ for every }j\notin\operatorname{range}(f),\\ 0,&\text{otherwise}. \end{cases}B(r,s)={C(r∘f,s∘f),0,​rj​=sj​ for every j∈/range(f),otherwise.​

No unitarity or Hermitian condition is imposed. The choice l=0l=0l=0 is allowed; in particular, at k=0k=0k=0, the predicate requires BBB to be a scalar multiple of the identity.

QAlgorithms.Papers.Independent.Intake100.P83.NoExtra

For a finite alphabet AAA with decidable equality, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and natural numbers n,kn,kn,k, let Ω=A{0,…,n−1}\Omega=A^{\{0,\ldots,n-1\}}Ω=A{0,…,n−1} and Dg=diag⁡(∏j=0n−1χ(rj,g))r∈ΩD_g=\operatorname{diag}(\prod_{j=0}^{n-1}\chi(r_j,g))_{r\in\Omega}Dg​=diag(∏j=0n−1​χ(rj​,g))r∈Ω​. For each natural hhh, let KhK_hKh​ consist of all finite products Bt⋯B1B_t\cdots B_1Bt​⋯B1​ of unitary matrices commuting with every DgD_gDg​, where each factor has, for some ℓ≤h\ell\le hℓ≤h, an injection f:{0,…,ℓ−1}↪{0,…,n−1}f:\{0,\ldots,\ell-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,ℓ−1}↪{0,…,n−1} and a matrix CCC on length-ℓ\ellℓ words, entries Br,s=C(r∘f,s∘f)B_{r,s}=C(r\circ f,s\circ f)Br,s​=C(r∘f,s∘f) if r,sr,sr,s agree outside the image of fff, and zero otherwise. Define Ch={B:∀U∈Kh, BU=UB}\mathcal C_h=\{B:\forall U\in K_h,\ BU=UB\}Ch​={B:∀U∈Kh​, BU=UB}. The proposition is the conjunction

Ck=CnandCn=span⁡C{Dg:g∈G}.\mathcal C_k=\mathcal C_n \quad\text{and}\quad \mathcal C_n=\operatorname{span}_{\mathbb C}\{D_g:g\in G\}.Ck​=Cn​andCn​=spanC​{Dg​:g∈G}.

The span consists of finite complex linear combinations. The parameters may be zero, and the product defining KhK_hKh​ may be empty, yielding the identity. No representation properties of χ\chiχ are assumed.

QAlgorithms.Papers.Independent.Intake100.P83.Redistributes

For a finite alphabet AAA, a type GGG, a function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, a natural number kkk, and a set RRR of transitions of arity at most kkk, this predicate requires two conditions. First, for every transition t∈Rt\in Rt∈R, with arity ℓ\ellℓ and words u,vu,vu,v, the matrix Xt=Eu,v+Ev,uX_t=E_{u,v}+E_{v,u}Xt​=Eu,v​+Ev,u​ commutes, for every g∈Gg\in Gg∈G, with the diagonal matrix whose entry at a length-ℓ\ellℓ word aaa is ∏j<ℓχ(aj,g)\prod_{j<\ell}\chi(a_j,g)∏j<ℓ​χ(aj​,g). Second, whenever length-kkk words r,sr,sr,s satisfy ∏j<kχ(rj,g)=∏j<kχ(sj,g)\prod_{j<k}\chi(r_j,g)=\prod_{j<k}\chi(s_j,g)∏j<k​χ(rj​,g)=∏j<k​χ(sj​,g) for every g∈Gg\in Gg∈G, there is a finite list B0,…,Bm−1B_0,\ldots,B_{m-1}B0​,…,Bm−1​ such that Bm−1⋯B0 er=esB_{m-1}\cdots B_0\,e_r=e_sBm−1​⋯B0​er​=es​, where ere_rer​ is the coordinate vector at rrr. Each BjB_jBj​ must arise from some transition in RRR, placed on injectively selected sites: its entry at words a,ba,ba,b is the corresponding entry of Eu,v+Ev,uE_{u,v}+E_{v,u}Eu,v​+Ev,u​ on their selected coordinates if they agree on all unselected coordinates, and is zero otherwise. The list may be empty, with product III, so it already suffices when r=sr=sr=s. The definition does not require χ\chiχ to satisfy any character axioms, nor require these transition matrices to be unitary.

QAlgorithms.Papers.Independent.Intake100.P83.RedistributionTransition

For a type AAA and a natural number kkk, a redistribution transition consists of a natural number ℓ\ellℓ, a proof that ℓ≤k\ell\le kℓ≤k, and two words r,s:{0,…,ℓ−1}→Ar,s:\{0,\ldots,\ell-1\}\to Ar,s:{0,…,ℓ−1}→A, designated as its left and right words. No distinctness or charge condition is imposed on these words. The arity ℓ\ellℓ may be zero; when k=0k=0k=0, it must be zero, and both words are the unique empty word.

QAlgorithms.Papers.Independent.Intake100.P83.SemiUniversal

For a finite alphabet AAA with decidable equality, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and natural numbers n,kn,kn,k, write Ω=A{0,…,n−1}\Omega=A^{\{0,\ldots,n-1\}}Ω=A{0,…,n−1}, qr(g)=∏j=0n−1χ(rj,g)q_r(g)=\prod_{j=0}^{n-1}\chi(r_j,g)qr​(g)=∏j=0n−1​χ(rj​,g), and Dg=diag⁡(qr(g))r∈ΩD_g=\operatorname{diag}(q_r(g))_{r\in\Omega}Dg​=diag(qr​(g))r∈Ω​. This proposition says that every unitary matrix UUU satisfying Ur,s=0U_{r,s}=0Ur,s​=0 whenever qr≠qsq_r\ne q_sqr​=qs​, and det⁡U[Er,Er]=1\det U[E_r,E_r]=1detU[Er​,Er​]=1 for every rrr, where Er={s:qr=qs}E_r=\{s:q_r=q_s\}Er​={s:qr​=qs​}, can be expressed as Bt⋯B1B_t\cdots B_1Bt​⋯B1​ for some finite list of matrices B1,…,BtB_1,\ldots,B_tB1​,…,Bt​. Each BiB_iBi​ must be unitary, must commute with every DgD_gDg​, and must admit natural ℓi≤k\ell_i\le kℓi​≤k, an injection fi:{0,…,ℓi−1}↪{0,…,n−1}f_i:\{0,\ldots,\ell_i-1\}\hookrightarrow\{0,\ldots,n-1\}fi​:{0,…,ℓi​−1}↪{0,…,n−1}, and a matrix CiC_iCi​ indexed by length-ℓi\ell_iℓi​ words such that its entry at r,sr,sr,s is Ci(r∘fi,s∘fi)C_i(r\circ f_i,s\circ f_i)Ci​(r∘fi​,s∘fi​) when r,sr,sr,s agree outside the image of fif_ifi​, and is zero otherwise. Empty lists are allowed and give the identity; n,k,ℓin,k,\ell_in,k,ℓi​ may be zero. No onsite-representation condition on χ\chiχ is assumed.

QAlgorithms.Papers.Independent.Intake100.P83.TransitiveCharges

For an alphabet AAA with decidable equality, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and natural numbers n,kn,kn,k, define qr:G→Cq_r:G\to\mathbb Cqr​:G→C for each length-nnn word by qr(g)=∏j=0n−1χ(rj,g)q_r(g)=\prod_{j=0}^{n-1}\chi(r_j,g)qr​(g)=∏j=0n−1​χ(rj​,g). This proposition says that for every two words r,sr,sr,s with qr=qsq_r=q_sqr​=qs​, there exist a natural number mmm and words v0,…,vmv_0,\ldots,v_mv0​,…,vm​ with v0=rv_0=rv0​=r, vm=sv_m=svm​=s, qvj=qrq_{v_j}=q_rqvj​​=qr​ for every jjj, and at most kkk differing coordinates between each consecutive pair. The number mmm may be zero, so a word can be joined to itself without any steps. The values n=0n=0n=0 and k=0k=0k=0 are allowed, and no representation properties of χ\chiχ are assumed.

QAlgorithms.Papers.Independent.Intake100.P83.Words

For any type AAA and natural number nnn, Words(A,n)\mathrm{Words}(A,n)Words(A,n) denotes the functions {0,…,n−1}→A\{0,\ldots,n-1\}\to A{0,…,n−1}→A, that is, words of length nnn over AAA. For n=0n=0n=0, there is exactly one word, the empty function, even if AAA is empty.

QAlgorithms.Papers.Independent.Intake100.P83.appendAncilla

For any natural number nnn, alphabet AAA, complex Euclidean vector vvv indexed by length-nnn words over AAA, and complex Euclidean vector aaa indexed by AAA, this defines a vector on length-(n+1)(n+1)(n+1) words by

(appendAncilla⁡(v,a))(r)=v(r0,…,rn−1) a(rn).\bigl(\operatorname{appendAncilla}(v,a)\bigr)(r) =v(r_0,\ldots,r_{n-1})\,a(r_n).(appendAncilla(v,a))(r)=v(r0​,…,rn−1​)a(rn​).

Neither vector is required to be normalized or nonzero. For n=0n=0n=0, vvv has its single empty-word coordinate, which multiplies each coordinate of aaa.

QAlgorithms.Papers.Independent.Intake100.P83.basisMatrixUnit

For a type AAA, a natural number nnn, and words r,s:{0,…,n−1}→Ar,s:\{0,\ldots,n-1\}\to Ar,s:{0,…,n−1}→A, this defines the complex matrix Er,sE_{r,s}Er,s​, whose rows and columns are indexed by such words, by

(Er,s)a,b={1,a=r and b=s,0,otherwise.(E_{r,s})_{a,b}= \begin{cases} 1,&a=r\text{ and }b=s,\\ 0,&\text{otherwise}. \end{cases}(Er,s​)a,b​={1,0,​a=r and b=s,otherwise.​

The words rrr and sss need not be distinct. When n=0n=0n=0, there is one empty word, and this is the 1×11\times11×1 matrix with entry 111.

QAlgorithms.Papers.Independent.Intake100.P83.basisPath

For an alphabet AAA with decidable equality, natural numbers n,kn,kn,k, a predicate CCC on length-nnn words, and two such words r,sr,sr,s, this defines the proposition that there exist a natural number mmm and words v0,…,vmv_0,\ldots,v_mv0​,…,vm​ such that v0=rv_0=rv0​=r, vm=sv_m=svm​=s, every vjv_jvj​ satisfies CCC, and, for each 0≤j<m0\le j<m0≤j<m, the number of coordinates on which vjv_jvj​ and vj+1v_{j+1}vj+1​ differ is at most kkk. The path length m=0m=0m=0 is allowed; it requires r=sr=sr=s and C(r)C(r)C(r), with no adjacency conditions. When k=0k=0k=0, consecutive words must coincide. The value n=0n=0n=0 is also included.

QAlgorithms.Papers.Independent.Intake100.P83.blockPreservingUnitaries

For a finite alphabet AAA with decidable equality, a natural number nnn, and an arbitrary relation RRR on the length-nnn words Ω=A{0,…,n−1}\Omega=A^{\{0,\ldots,n-1\}}Ω=A{0,…,n−1}, this defines the set of unitary complex matrices UUU indexed by Ω\OmegaΩ such that, for every r,s∈Ωr,s\in\Omegar,s∈Ω, ¬R(r,s)\neg R(r,s)¬R(r,s) implies Ur,s=0U_{r,s}=0Ur,s​=0. There is no assumption that RRR is an equivalence relation, reflexive, or symmetric. The value n=0n=0n=0 is included, in which case there is one empty word.

QAlgorithms.Papers.Independent.Intake100.P83.blockSpecial

For a finite alphabet AAA, a natural number nnn, and an arbitrary relation RRR on Ω=A{0,…,n−1}\Omega=A^{\{0,\ldots,n-1\}}Ω=A{0,…,n−1}, this defines the set of unitary complex matrices UUU satisfying both Ur,s=0U_{r,s}=0Ur,s​=0 whenever ¬R(r,s)\neg R(r,s)¬R(r,s), and

∀r∈Ω,det⁡U[Er,Er]=1,Er={s∈Ω:R(r,s)}.\forall r\in\Omega,\qquad \det U[E_r,E_r]=1,\qquad E_r=\{s\in\Omega:R(r,s)\}.∀r∈Ω,detU[Er​,Er​]=1,Er​={s∈Ω:R(r,s)}.

Here U[Er,Er]U[E_r,E_r]U[Er​,Er​] is the principal submatrix with both indices restricted to ErE_rEr​. No equivalence-relation properties of RRR are assumed. If ErE_rEr​ is empty, its determinant is the empty determinant 111, so that particular determinant condition imposes no restriction. The natural number nnn may be zero.

QAlgorithms.Papers.Independent.Intake100.P83.characterProducts

For finite sets S,TS,TS,T of complex-valued functions on a type GGG, this defines the finite set of their pointwise products:

{ g↦s(g)t(g)∣s∈S, t∈T }.\{\,g\mapsto s(g)t(g)\mid s\in S,\ t\in T\,\}.{g↦s(g)t(g)∣s∈S, t∈T}.

Identical resulting functions occur only once. If either input set is empty, the result is empty. No character, continuity, or group-homomorphism condition is imposed on the functions.

QAlgorithms.Papers.Independent.Intake100.P83.chargeCount

For a finite alphabet AAA, a type GGG, a function χ:A×G→C\chi:A\times G\to\mathbb Cχ:A×G→C, and a natural number nnn, this defines the number of distinct functions G→CG\to\mathbb CG→C of the form

g⟼∏j=0n−1χ(rj,g),r:{0,…,n−1}→A.g\longmapsto\prod_{j=0}^{n-1}\chi(r_j,g), \qquad r:\{0,\ldots,n-1\}\to A.g⟼j=0∏n−1​χ(rj​,g),r:{0,…,n−1}→A.

Distinct words producing the same function contribute only once. The count is 111 when n=0n=0n=0, and is 000 when AAA is empty and n>0n>0n>0.

QAlgorithms.Papers.Independent.Intake100.P83.charges

For a finite alphabet AAA, a type GGG, an arbitrary function χ:A×G→C\chi:A\times G\to\mathbb Cχ:A×G→C, and a natural number nnn, this defines the finite set of functions

{ g⟼∏j=0n−1χ(rj,g) | r:{0,…,n−1}→A }.\left\{\,g\longmapsto\prod_{j=0}^{n-1}\chi(r_j,g)\ \middle|\ r:\{0,\ldots,n-1\}\to A\,\right\}.{g⟼j=0∏n−1​χ(rj​,g) ​ r:{0,…,n−1}→A}.

Repeated functions are included only once, and equality means equality at every g∈Gg\in Gg∈G. No condition making these functions characters is required. For n=0n=0n=0, the set consists of the constant function 111; if AAA is empty and n>0n>0n>0, it is empty.

QAlgorithms.Papers.Independent.Intake100.P83.component

For a finite alphabet AAA with decidable equality, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, natural numbers n,kn,kn,k, and words r,s∈Ω=A{0,…,n−1}r,s\in\Omega=A^{\{0,\ldots,n-1\}}r,s∈Ω=A{0,…,n−1}, let Dg=diag⁡(∏j=0n−1χ(tj,g))t∈ΩD_g=\operatorname{diag}(\prod_{j=0}^{n-1}\chi(t_j,g))_{t\in\Omega}Dg​=diag(∏j=0n−1​χ(tj​,g))t∈Ω​. Let KKK consist of all finite products Bt⋯B1B_t\cdots B_1Bt​⋯B1​ whose factors are unitary and commute with every DgD_gDg​, and where each factor has entries Bx,y=C(x∘f,y∘f)B_{x,y}=C(x\circ f,y\circ f)Bx,y​=C(x∘f,y∘f) when x,yx,yx,y agree outside the image of some injection f:{0,…,ℓ−1}↪{0,…,n−1}f:\{0,\ldots,\ell-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,ℓ−1}↪{0,…,n−1}, and zero otherwise, for some natural ℓ≤k\ell\le kℓ≤k and matrix CCC on length-ℓ\ellℓ words. This defines the proposition

∀B∈CΩ×Ω,(∀U∈K, BU=UB) ⟹ Br,r=Bs,s.\forall B\in\mathbb C^{\Omega\times\Omega},\qquad \bigl(\forall U\in K,\ BU=UB\bigr)\ \Longrightarrow\ B_{r,r}=B_{s,s}.∀B∈CΩ×Ω,(∀U∈K, BU=UB) ⟹ Br,r​=Bs,s​.

The quantified matrices BBB need not be Hermitian or unitary. Empty products are included in KKK, and zero values of n,k,ℓn,k,\elln,k,ℓ are allowed.

QAlgorithms.Papers.Independent.Intake100.P83.componentSpace

For a finite alphabet AAA with decidable equality, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, natural numbers n,kn,kn,k, and a word r∈Ω=A{0,…,n−1}r\in\Omega=A^{\{0,\ldots,n-1\}}r∈Ω=A{0,…,n−1}, put Dg=diag⁡(∏j=0n−1χ(tj,g))t∈ΩD_g=\operatorname{diag}(\prod_{j=0}^{n-1}\chi(t_j,g))_{t\in\Omega}Dg​=diag(∏j=0n−1​χ(tj​,g))t∈Ω​. Let KKK consist of all finite products Bt⋯B1B_t\cdots B_1Bt​⋯B1​ of unitary matrices commuting with every DgD_gDg​, each factor having, for some natural ℓ≤k\ell\le kℓ≤k, injection f:{0,…,ℓ−1}↪{0,…,n−1}f:\{0,\ldots,\ell-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,ℓ−1}↪{0,…,n−1}, and matrix CCC on length-ℓ\ellℓ words, entries Bx,y=C(x∘f,y∘f)B_{x,y}=C(x\circ f,y\circ f)Bx,y​=C(x∘f,y∘f) if x,yx,yx,y agree outside the image of fff, and zero otherwise. This defines the complex linear span in CΩ\mathbb C^\OmegaCΩ, equipped with its Euclidean inner product, of all coordinate vectors ese_ses​ such that every matrix commuting with every U∈KU\in KU∈K has equal diagonal entries at rrr and sss; here es(x)=1e_s(x)=1es​(x)=1 if x=sx=sx=s and 000 otherwise. Thus the span consists of finite complex linear combinations of exactly those specified coordinate vectors. Empty matrix products give the identity, and n,k,ℓn,k,\elln,k,ℓ may be zero.

QAlgorithms.Papers.Independent.Intake100.P83.controlGroup

For a finite alphabet AAA with decidable equality, a type GGG, an arbitrary function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and natural numbers n,kn,kn,k, this defines the following set of complex matrices on AnA^nAn. For g∈Gg\in Gg∈G, write Dn(g)D_n(g)Dn​(g) for the diagonal matrix with entry ∏j=0n−1χ(rj,g)\prod_{j=0}^{n-1}\chi(r_j,g)∏j=0n−1​χ(rj​,g) at a word rrr. A matrix belongs to the defined set exactly when it is a finite product, in reverse list order, of matrices exp⁡(iθH)\exp(i\theta H)exp(iθH), where each factor may use its own real number θ\thetaθ and Hermitian matrix HHH, subject to HDn(g)=Dn(g)HHD_n(g)=D_n(g)HHDn​(g)=Dn​(g)H for every ggg, and subject to the following support condition: there exist a natural number ℓ≤k\ell\le kℓ≤k, an injection f:{0,…,ℓ−1}↪{0,…,n−1}f:\{0,\ldots,\ell-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,ℓ−1}↪{0,…,n−1}, and a complex matrix CCC on AℓA^\ellAℓ such that

Hr,s={Cr∘f,s∘f,rj=sj for every j∉range⁡(f),0,otherwise.H_{r,s}= \begin{cases} C_{r\circ f,s\circ f},&r_j=s_j\text{ for every }j\notin\operatorname{range}(f),\\ 0,&\text{otherwise}. \end{cases}Hr,s​={Cr∘f,s∘f​,0,​rj​=sj​ for every j∈/range(f),otherwise.​

The empty product is included and equals the identity. The definition allows n=0n=0n=0, k=0k=0k=0, and ℓ=0\ell=0ℓ=0, and imposes no onsite-character condition on χ\chiχ.

QAlgorithms.Papers.Independent.Intake100.P83.cyclicPhases

For every natural number ppp, this defines a function on a Boolean bbb and an element aaa of Z/pZ\mathbb Z/p\mathbb ZZ/pZ by

χp(b,a)={exp⁡ ⁣(i 2π val⁡(a)p),b=true,1,b=false.\chi_p(b,a)= \begin{cases} \exp\!\left(i\,\dfrac{2\pi\,\operatorname{val}(a)}{p}\right),&b=\mathrm{true},\\ 1,&b=\mathrm{false}. \end{cases}χp​(b,a)=⎩⎨⎧​exp(ip2πval(a)​),1,​b=true,b=false.​

For p>0p>0p>0, val⁡(a)\operatorname{val}(a)val(a) is the representative in {0,…,p−1}\{0,\ldots,p-1\}{0,…,p−1}. No positivity assumption on ppp is imposed: when p=0p=0p=0, the domain is Z\mathbb ZZ, and division by zero is defined as zero, so the function is identically 111.

QAlgorithms.Papers.Independent.Intake100.P83.cyclicSynthesisGates

For all natural numbers p,np,np,n, this defines the union of four sets of matrices on length-nnn Boolean words: single-site diagonal operations with entries 1,i1,i1,i; two-site operations I−2∣a⟩⟨a∣I-2|a\rangle\langle a|I−2∣a⟩⟨a∣ for any two-bit word aaa; rotations exp⁡(iθHex)\exp(i\theta H_{\mathrm{ex}})exp(iθHex​), where Hex=2(∣01⟩⟨10∣+∣10⟩⟨01∣)H_{\mathrm{ex}}=2(|01\rangle\langle10|+|10\rangle\langle01|)Hex​=2(∣01⟩⟨10∣+∣10⟩⟨01∣); and rotations

exp⁡(iθHp),Hp=∣0p⟩⟨1p∣+∣1p⟩⟨0p∣,\exp(i\theta H_p),\qquad H_p=|0^p\rangle\langle1^p|+|1^p\rangle\langle0^p|,exp(iθHp​),Hp​=∣0p⟩⟨1p∣+∣1p⟩⟨0p∣,

where 000 means false\mathrm{false}false, 111 means true\mathrm{true}true, and every rotation angle satisfies 0≤θ<2π0\le\theta<2\pi0≤θ<2π. Each operation is embedded on an injectively chosen ordered set of sites, with entry Cr∘f,s∘fC_{r\circ f,s\circ f}Cr∘f,s∘f​ when the global words agree outside those sites and zero otherwise. The ppp-site rotation set is empty if p>np>np>n. For p=0p=0p=0, the two empty words coincide, so H0=2IH_0=2IH0​=2I on the one-dimensional empty-word space, and these embeddings give e2iθIe^{2i\theta}Ie2iθI. No primality or positivity assumption on ppp is imposed.

QAlgorithms.Papers.Independent.Intake100.P83.czFamily

For a finite type AAA with decidable equality and a natural number nnn, this defines the set of complex matrices indexed by length-nnn words obtained by choosing two distinct sites, in an ordered injection f:{0,1}↪{0,…,n−1}f:\{0,1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,1}↪{0,…,n−1}, and a word r:{0,1}→Ar:\{0,1\}\to Ar:{0,1}→A, then embedding I−2Er,rI-2E_{r,r}I−2Er,r​ on those sites. Equivalently, the resulting matrix is diagonal: its entry at a word aaa is −1-1−1 if a∘f=ra\circ f=ra∘f=r, and 111 otherwise. Here Er,rE_{r,r}Er,r​ is the matrix with its sole nonzero entry 111 at (r,r)(r,r)(r,r). For n<2n<2n<2, or for empty AAA, this family is empty.

QAlgorithms.Papers.Independent.Intake100.P83.derived

For a finite alphabet AAA with decidable equality, a natural number nnn, and an arbitrary set VVV of complex square matrices indexed by length-nnn words, this defines the set of finite reversed products Cm−1⋯C0C_{m-1}\cdots C_0Cm−1​⋯C0​, where each factor has the form

Ci=UiWiUi†Wi†for some Ui,Wi∈V,C_i=U_iW_iU_i^\dagger W_i^\dagger \qquad\text{for some }U_i,W_i\in V,Ci​=Ui​Wi​Ui†​Wi†​for some Ui​,Wi​∈V,

and †\dagger† denotes conjugate transpose. The empty product is the identity. The matrices in VVV are not required to be unitary, so the conjugate transposes here are not assumed to be inverses; no closure under limits is taken.

QAlgorithms.Papers.Independent.Intake100.P83.divideByOnsiteCharacter

For types A,GA,GA,G, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and any selected a∈Aa\in Aa∈A, this defines a new function by

χ~(b,g)=χ(b,g)χ(a,g)(b∈A, g∈G).\widetilde\chi(b,g)=\frac{\chi(b,g)}{\chi(a,g)} \qquad(b\in A,\ g\in G).χ​(b,g)=χ(a,g)χ(b,g)​(b∈A, g∈G).

No character, unit-modulus, or nonzero-denominator condition is imposed. Complex division is total: whenever χ(a,g)=0\chi(a,g)=0χ(a,g)=0, the defined value is 000 for every bbb.

QAlgorithms.Papers.Independent.Intake100.P83.embedOnSites

For any type AAA, natural numbers l,nl,nl,n, an injection f:{0,…,l−1}↪{0,…,n−1}f:\{0,\ldots,l-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,l−1}↪{0,…,n−1}, and a complex square matrix BBB indexed by length-lll words, this defines a matrix indexed by length-nnn words by

embed⁡f(B)(r,s)={B(r∘f,s∘f),rj=sj for every j∉range⁡(f),0,otherwise.\operatorname{embed}_f(B)(r,s)= \begin{cases} B(r\circ f,s\circ f),& r_j=s_j\text{ for every }j\notin\operatorname{range}(f),\\ 0,&\text{otherwise}. \end{cases}embedf​(B)(r,s)={B(r∘f,s∘f),0,​rj​=sj​ for every j∈/range(f),otherwise.​

The injection requires l≤nl\le nl≤n and specifies the ordering of the selected sites. When l=0l=0l=0, BBB has a single entry, and the resulting matrix is that scalar times the identity.

QAlgorithms.Papers.Independent.Intake100.P83.exchangeHamiltonian

This defines a complex matrix on length-two Boolean words by identifying each word with its ordered pair of bits and using X⊗X+Y⊗YX\otimes X+Y\otimes YX⊗X+Y⊗Y, where

X=(0110),Y=(0−ii0)X=\begin{pmatrix}0&1\\1&0\end{pmatrix}, \qquad Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}X=(01​10​),Y=(0i​−i0​)

in the order false,true\mathrm{false},\mathrm{true}false,true. Explicitly, the matrix has entry 222 from (false,true)(\mathrm{false},\mathrm{true})(false,true) to (true,false)(\mathrm{true},\mathrm{false})(true,false) and in the reverse direction, and every other entry is zero.

QAlgorithms.Papers.Independent.Intake100.P83.excitationFamily

For every natural number nnn, this defines a set of complex matrices on length-nnn Boolean words as the union of three sets: the single-site diagonal operations with entries 1,i1,i1,i; the two-site diagonal operations I−2∣a⟩⟨a∣I-2|a\rangle\langle a|I−2∣a⟩⟨a∣, where aaa is any of the four two-bit words; and the operations exp⁡(iθHex)\exp(i\theta H_{\mathrm{ex}})exp(iθHex​) for 0≤θ<2π0\le\theta<2\pi0≤θ<2π, where HexH_{\mathrm{ex}}Hex​ has entry 222 between the two words false true\mathrm{false}\,\mathrm{true}falsetrue and true false\mathrm{true}\,\mathrm{false}truefalse in both directions and zero elsewhere. Each local matrix CCC is placed on an injectively chosen ordered set of sites: its global entry at r,sr,sr,s is Cr∘f,s∘fC_{r\circ f,s\circ f}Cr∘f,s∘f​ if r,sr,sr,s agree outside those sites, and zero otherwise. The two-site sets are empty for n<2n<2n<2, and the entire union is empty for n=0n=0n=0.

QAlgorithms.Papers.Independent.Intake100.P83.excitationPhases

This defines a function on a Boolean bbb and an element zzz of the unit circle {z∈C:∣z∣=1}\{z\in\mathbb C:|z|=1\}{z∈C:∣z∣=1}, with value equal to the underlying complex number zzz when b=trueb=\mathrm{true}b=true, and equal to 111 when b=falseb=\mathrm{false}b=false.

QAlgorithms.Papers.Independent.Intake100.P83.finiteGateProducts

For a finite alphabet AAA with decidable equality, a natural number nnn, and any set SSS of complex square matrices indexed by length-nnn words, this defines the set of matrices BBB for which there is a finite list [C0,…,Cm−1][C_0,\ldots,C_{m-1}][C0​,…,Cm−1​], every entry of which belongs to SSS, such that

B=Cm−1⋯C1C0.B=C_{m-1}\cdots C_1C_0.B=Cm−1​⋯C1​C0​.

The empty list is permitted and has product equal to the identity, so the identity belongs to this set even when SSS is empty. No unitarity, inverse closure, or limiting operation is required.

QAlgorithms.Papers.Independent.Intake100.P83.groupDimension

For a finite alphabet AAA, a natural number nnn, and any set VVV of complex square matrices indexed by length-nnn words in AAA, this defines a natural number: the dimension over R\mathbb RR of the real linear span of all matrices BBB such that B∗=−BB^*=-BB∗=−B and exp⁡(tB)∈V\exp(tB)\in Vexp(tB)∈V for every real ttt. The set VVV is not assumed to be a group. If there are no such matrices BBB, this dimension is zero; n=0n=0n=0 is included.

QAlgorithms.Papers.Independent.Intake100.P83.leftRegularPermutationMatrix

For any group GGG equipped with decidable equality and any g∈Gg\in Gg∈G, this defines the complex matrix indexed by G×GG\times GG×G whose entries are

Lg(h,j)={1,h=gj,0,h≠gj.L_g(h,j)= \begin{cases} 1,&h=gj,\\ 0,&h\ne gj. \end{cases}Lg​(h,j)={1,0,​h=gj,h=gj.​

No finiteness assumption on GGG is imposed.

QAlgorithms.Papers.Independent.Intake100.P83.lieSpace

For a finite alphabet AAA, a natural number nnn, and any set VVV of complex square matrices indexed by length-nnn words in AAA, this defines the real linear span of all matrices BBB satisfying

B∗=−Bandexp⁡(tB)∈V for every t∈R.B^*=-B \quad\text{and}\quad \exp(tB)\in V\ \text{for every }t\in\mathbb R.B∗=−Bandexp(tB)∈V for every t∈R.

Here B∗B^*B∗ is the conjugate transpose and exp⁡\expexp is the matrix exponential. No group, closure, or regularity assumption on VVV is made. In particular, every generator requires I=exp⁡(0B)∈VI=\exp(0B)\in VI=exp(0B)∈V; if I∉VI\notin VI∈/V, the span is zero. The length n=0n=0n=0 is allowed and gives a single empty word as the matrix index.

QAlgorithms.Papers.Independent.Intake100.P83.liftOneQubitMatrix

For any complex matrix BBB with Boolean row and column indices, this defines a complex matrix indexed by one-bit words r,s:{0}→{false,true}r,s:\{0\}\to\{\mathrm{false},\mathrm{true}\}r,s:{0}→{false,true}, with entry Br(0),s(0)B_{r(0),s(0)}Br(0),s(0)​. Thus it reindexes BBB by one-bit words. No unitarity or Hermiticity assumption is imposed on BBB.

QAlgorithms.Papers.Independent.Intake100.P83.localChargeSpan

For a finite alphabet AAA, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and n,k∈Nn,k\in\mathbb Nn,k∈N, this is the real linear subspace of all functions G→CG\to\mathbb CG→C spanned by the functions

g⟼(∑a∈Aχ(a,g)) n−˙k∏j=0k−1χ(rj,g),g\longmapsto \left(\sum_{a\in A}\chi(a,g)\right)^{\,n\mathbin{\dot-}k} \prod_{j=0}^{k-1}\chi(r_j,g),g⟼(a∈A∑​χ(a,g))n−˙​kj=0∏k−1​χ(rj​,g),

where rrr ranges over all length-kkk words in AAA, and n−˙k=max⁡(n−k,0)n\mathbin{\dot-}k=\max(n-k,0)n−˙​k=max(n−k,0) is truncated natural-number subtraction. Thus kkk need not be at most nnn; when k≥nk\ge nk≥n, the power factor is 111, even if its base is zero. When k=0k=0k=0, the word product is 111. If there are no length-kkk words, the generating set is empty and its span is the zero subspace.

QAlgorithms.Papers.Independent.Intake100.P83.parityDet

For every natural number nnn, every complex matrix VVV indexed by Boolean words of length nnn, and every Boolean bbb, this defines the determinant of the principal submatrix indexed by words rrr satisfying ∣r∣ mod 2=1|r|\bmod2=1∣r∣mod2=1 when bbb is true and ∣r∣ mod 2=0|r|\bmod2=0∣r∣mod2=0 when bbb is false, where ∣r∣|r|∣r∣ counts the true coordinates. No unitarity or preservation of these index sets is assumed for VVV. An empty principal submatrix has determinant 111; in particular, for n=0n=0n=0, the true branch gives 111, while the false branch gives the sole entry of VVV.

QAlgorithms.Papers.Independent.Intake100.P83.parityFamily

For every natural number nnn, this defines the union of the single-site diagonal operations with entries 1,i1,i1,i, the two-site diagonal operations I−2∣a⟩⟨a∣I-2|a\rangle\langle a|I−2∣a⟩⟨a∣ for any two-bit word aaa, and the rotations exp⁡(iθ(X⊗X))\exp(i\theta(X\otimes X))exp(iθ(X⊗X)) for 0≤θ<2π0\le\theta<2\pi0≤θ<2π, where XXX exchanges false\mathrm{false}false and true\mathrm{true}true. Thus X⊗XX\otimes XX⊗X exchanges each two-bit word with the word obtained by flipping both bits. Each local matrix CCC is embedded on injectively chosen ordered sites, giving entry Cr∘f,s∘fC_{r\circ f,s\circ f}Cr∘f,s∘f​ when r,sr,sr,s agree outside those sites and zero otherwise. The two-site sets are empty for n<2n<2n<2, and the entire set is empty for n=0n=0n=0.

QAlgorithms.Papers.Independent.Intake100.P83.parityZ

For every natural number nnn, let the basis labels be Boolean words r:{0,…,n−1}→{false,true}r:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}r:{0,…,n−1}→{false,true}, and let ∣r∣|r|∣r∣ count the positions at which rrr is true. This defines the complex diagonal matrix ZnZ_nZn​ whose diagonal entry at rrr is (−1)∣r∣(-1)^{|r|}(−1)∣r∣ and whose off-diagonal entries are zero. Thus its diagonal entry is 111 on words of even weight and −1-1−1 on words of odd weight. For n=0n=0n=0, there is one empty word, and the matrix is the 1×11\times11×1 identity.

QAlgorithms.Papers.Independent.Intake100.P83.phaseFamily

For a finite type AAA with decidable equality and a natural number nnn, this defines the set of complex matrices indexed by length-nnn words obtained by choosing a site through an injection f:{0}↪{0,…,n−1}f:\{0\}\hookrightarrow\{0,\ldots,n-1\}f:{0}↪{0,…,n−1} and a symbol a∈Aa\in Aa∈A, then embedding exp⁡(iπEa,a/2)\exp(i\pi E_{a,a}/2)exp(iπEa,a​/2) on that site, where Ea,aE_{a,a}Ea,a​ projects onto the one-site word with value aaa. Equivalently, the resulting matrix is diagonal, with entry iii at each word whose selected symbol is aaa, and entry 111 at every other word. For n=0n=0n=0, or for empty AAA, the family is empty.

QAlgorithms.Papers.Independent.Intake100.P83.positiveImaginaryEvolution

For a natural number nnn, a finite alphabet AAA, an arbitrary complex matrix HHH indexed by words {0,…,n−1}→A\{0,\ldots,n-1\}\to A{0,…,n−1}→A, and any real number θ\thetaθ, this defines the matrix exponential

exp⁡(iθH).\exp(i\theta H).exp(iθH).

There is no hypothesis that HHH is Hermitian or that θ\thetaθ is nonnegative. The definition includes n=0n=0n=0, when the matrix is indexed by the single empty word.

QAlgorithms.Papers.Independent.Intake100.P83.productCharacter

For types A,GA,GA,G, an arbitrary function χ:A×G→C\chi:A\times G\to\mathbb Cχ:A×G→C, a natural number nnn, and a word r:{0,…,n−1}→Ar:\{0,\ldots,n-1\}\to Ar:{0,…,n−1}→A, this defines the function

g⟼∏j=0n−1χ(rj,g).g\longmapsto\prod_{j=0}^{n-1}\chi(r_j,g).g⟼j=0∏n−1​χ(rj​,g).

No monoid structure on GGG or condition on χ\chiχ is required. When n=0n=0n=0, this is the constant function 111.

QAlgorithms.Papers.Independent.Intake100.P83.productSymmetryMatrix

For an alphabet AAA with decidable equality, a type GGG, a function χ:A×G→C\chi:A\times G\to\mathbb Cχ:A×G→C, a natural number nnn, and g∈Gg\in Gg∈G, this defines the complex square matrix indexed by length-nnn words whose entries are

Dg(r,s)={∏j=0n−1χ(rj,g),r=s,0,r≠s.D_g(r,s)= \begin{cases} \displaystyle\prod_{j=0}^{n-1}\chi(r_j,g),&r=s,\\ 0,&r\ne s. \end{cases}Dg​(r,s)=⎩⎨⎧​j=0∏n−1​χ(rj​,g),0,​r=s,r=s.​

No condition on χ\chiχ, including unit modulus, is imposed. At n=0n=0n=0, the matrix has one entry, equal to 111.

QAlgorithms.Papers.Independent.Intake100.P83.reservoirLength

For a finite alphabet AAA, a type GGG, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, and n∈Nn\in\mathbb Nn∈N, define cℓc_\ellcℓ​ as the number of distinct functions G→CG\to\mathbb CG→C of the form g↦∏j=0ℓ−1χ(rj,g)g\mapsto\prod_{j=0}^{\ell-1}\chi(r_j,g)g↦∏j=0ℓ−1​χ(rj​,g), as rrr ranges over all length-ℓ\ellℓ words in AAA. The reservoir length is the least positive integer ℓ\ellℓ satisfying cℓ=cnc_\ell=c_ncℓ​=cn​, with value 000 if no such positive integer exists. For n>0n>0n>0, the admissible set contains nnn; for n=0n=0n=0, existence of a positive admissible length is not required. The length-zero product is the constant function 111, so c0=1c_0=1c0​=1, including when AAA is empty.

QAlgorithms.Papers.Independent.Intake100.P83.residueCharge

For any natural numbers p,np,np,n and any Boolean word rrr of length nnn, this defines the element of Z/pZ\mathbb Z/p\mathbb ZZ/pZ obtained by casting the number of positions at which rrr is true into that ring:

∣{j∈{0,…,n−1}:rj=true}∣viewed in Z/pZ.\left|\{j\in\{0,\ldots,n-1\}:r_j=\mathrm{true}\}\right| \quad\text{viewed in }\mathbb Z/p\mathbb Z.∣{j∈{0,…,n−1}:rj​=true}∣viewed in Z/pZ.

The parameters may be zero: for n=0n=0n=0 the value is zero, while for p=0p=0p=0 the target ring is Z\mathbb ZZ and the value is the integer Hamming weight without modular reduction.

QAlgorithms.Papers.Independent.Intake100.P83.rotationFamily

For natural numbers l,nl,nl,n and any complex matrix HHH on length-lll Boolean words, this defines the set of matrices BBB for which there exist an injection f:{0,…,l−1}↪{0,…,n−1}f:\{0,\ldots,l-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,l−1}↪{0,…,n−1} and a real angle 0≤θ<2π0\le\theta<2\pi0≤θ<2π such that

Br,s={(exp⁡(iθH))r∘f,s∘f,rj=sj for every j∉im⁡f,0,otherwise.B_{r,s}= \begin{cases} \bigl(\exp(i\theta H)\bigr)_{r\circ f,s\circ f}, & r_j=s_j\text{ for every }j\notin\operatorname{im}f,\\ 0,&\text{otherwise}. \end{cases}Br,s​={(exp(iθH))r∘f,s∘f​,0,​rj​=sj​ for every j∈/imf,otherwise.​

No Hermitian assumption on HHH is imposed, so the definition does not require these matrices to be unitary. If l>nl>nl>n, the set is empty. The case l=0l=0l=0 is included: HHH then has one entry hhh, and the resulting matrices are eiθhIe^{i\theta h}IeiθhI.

QAlgorithms.Papers.Independent.Intake100.P83.sFamily

For every natural number nnn, this defines the set of complex matrices on length-nnn Boolean words obtained by choosing one site q<nq<nq<n and applying the diagonal matrix with entries 111 on false\mathrm{false}false and iii on true\mathrm{true}true at that site. Explicitly, its members are precisely the matrices

Br,s={i,r=s and rq=true,1,r=s and rq=false,0,r≠s,B_{r,s}= \begin{cases} i,&r=s\text{ and }r_q=\mathrm{true},\\ 1,&r=s\text{ and }r_q=\mathrm{false},\\ 0,&r\ne s, \end{cases}Br,s​=⎩⎨⎧​i,1,0,​r=s and rq​=true,r=s and rq​=false,r=s,​

for some q<nq<nq<n. For n=0n=0n=0, the set is empty.

QAlgorithms.Papers.Independent.Intake100.P83.sameCharge

For types A,GA,GA,G, any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, a natural number nnn, and words r,s:{0,…,n−1}→Ar,s:\{0,\ldots,n-1\}\to Ar,s:{0,…,n−1}→A, this defines the proposition that their product functions on GGG are equal:

∀g∈G,∏j=0n−1χ(rj,g)=∏j=0n−1χ(sj,g).\forall g\in G,\qquad \prod_{j=0}^{n-1}\chi(r_j,g)=\prod_{j=0}^{n-1}\chi(s_j,g).∀g∈G,j=0∏n−1​χ(rj​,g)=j=0∏n−1​χ(sj​,g).

No multiplicativity, normalization, or unit-modulus condition on χ\chiχ is required. When n=0n=0n=0, both products are 111, so the condition holds for the empty words; when GGG is empty, equality of the functions is vacuous.

QAlgorithms.Papers.Independent.Intake100.P83.standardCZFamily

For every natural number nnn, this defines the set of complex matrices on length-nnn Boolean words obtained by choosing two distinct sites and multiplying a basis word by −1-1−1 exactly when both chosen bits are true\mathrm{true}true, and by 111 otherwise. All off-diagonal entries are zero. The two sites are specified by an injection from the two-element index set into the nnn sites; consequently, this set is empty when n<2n<2n<2.

QAlgorithms.Papers.Independent.Intake100.P83.symmetricCircuitCommutant

For a finite alphabet AAA, a natural number nnn, and any set VVV of complex matrices indexed by the words Ω=A{0,…,n−1}\Omega=A^{\{0,\ldots,n-1\}}Ω=A{0,…,n−1}, this defines the complex vector subspace

{B∈CΩ×Ω: ∀U∈V, BU=UB}.\{B\in\mathbb C^{\Omega\times\Omega}:\ \forall U\in V,\ BU=UB\}.{B∈CΩ×Ω: ∀U∈V, BU=UB}.

The matrices in VVV need not be unitary. If VVV is empty, the condition is vacuous and this is the entire matrix space. The value n=0n=0n=0 is allowed; then Ω\OmegaΩ consists of the single empty word.

QAlgorithms.Papers.Independent.Intake100.P83.symmetricLocalGroup

For a finite alphabet AAA with decidable equality, a type GGG, a function χ:A×G→C\chi:A\times G\to\mathbb Cχ:A×G→C, and natural numbers n,kn,kn,k, this defines the set of finite reversed products Bm−1⋯B0B_{m-1}\cdots B_0Bm−1​⋯B0​ in which every factor BiB_iBi​ is unitary, commutes with every diagonal matrix Dg(r,r)=∏j=0n−1χ(rj,g)D_g(r,r)=\prod_{j=0}^{n-1}\chi(r_j,g)Dg​(r,r)=∏j=0n−1​χ(rj​,g), and has the following form for some li≤kl_i\le kli​≤k, injection fi:{0,…,li−1}↪{0,…,n−1}f_i:\{0,\ldots,l_i-1\}\hookrightarrow\{0,\ldots,n-1\}fi​:{0,…,li​−1}↪{0,…,n−1}, and matrix CiC_iCi​:

Bi(r,s)={Ci(r∘fi,s∘fi),rj=sj for all j∉range⁡(fi),0,otherwise.B_i(r,s)= \begin{cases} C_i(r\circ f_i,s\circ f_i),& r_j=s_j\text{ for all }j\notin\operatorname{range}(f_i),\\ 0,&\text{otherwise}. \end{cases}Bi​(r,s)={Ci​(r∘fi​,s∘fi​),0,​rj​=sj​ for all j∈/range(fi​),otherwise.​

The number of factors may be zero, giving the identity, and li=0l_i=0li​=0 is allowed. No condition on χ\chiχ or closure under limits is imposed.

QAlgorithms.Papers.Independent.Intake100.P83.synthesisFamily

For a finite alphabet AAA with decidable equality, natural numbers k,nk,nk,n, and a set RRR of transitions of arity at most kkk, this defines a union of three sets of complex matrices indexed by length-nnn words: matrices that multiply a word by iii when a chosen site has a chosen symbol and by 111 otherwise; matrices that multiply a word by −1-1−1 when two chosen distinct sites have a chosen ordered pair of symbols and by 111 otherwise; and matrices obtained by choosing t∈Rt\in Rt∈R, an injection fff from its ℓ\ellℓ sites into the nnn sites, and a real angle 0≤θ<2π0\le\theta<2\pi0≤θ<2π, then embedding exp⁡(iθ(Er,s+Es,r))\exp(i\theta(E_{r,s}+E_{s,r}))exp(iθ(Er,s​+Es,r​)), where r,sr,sr,s are its left and right words and Eu,vE_{u,v}Eu,v​ has its sole nonzero entry 111 at (u,v)(u,v)(u,v). For this embedding, an entry at words a,ba,ba,b is the local matrix entry at a∘f,b∘fa\circ f,b\circ fa∘f,b∘f if a,ba,ba,b agree outside the selected sites, and is zero otherwise. Zero angles and zero-arity transitions are allowed; a zero-arity transition contributes e2iθIe^{2i\theta}Ie2iθI. Membership is in this union itself, without taking products or a closure.

QAlgorithms.Papers.Independent.Intake100.P83.traceCharacter

For a finite alphabet AAA, a type GGG, and any function χ:A→G→C\chi:A\to G\to\mathbb Cχ:A→G→C, this defines the function

g⟼∑a∈Aχ(a,g).g\longmapsto \sum_{a\in A}\chi(a,g).g⟼a∈A∑​χ(a,g).

The sum is zero when AAA is empty. No group structure on GGG or character property of χ\chiχ is required by this formula.

QAlgorithms.Papers.Independent.Intake100.P83.transitionOps

For a type AAA, natural numbers k,nk,nk,n, and a set RRR of transitions, each consisting of an arity ℓ≤k\ell\le kℓ≤k and left and right words r,sr,sr,s of length ℓ\ellℓ, this defines the following set of complex matrices indexed by length-nnn words: choose a transition in RRR and an injection f:{0,…,ℓ−1}↪{0,…,n−1}f:\{0,\ldots,\ell-1\}\hookrightarrow\{0,\ldots,n-1\}f:{0,…,ℓ−1}↪{0,…,n−1}; the resulting matrix has entry

Ba,b={(Er,s+Es,r)a∘f,b∘f,aj=bj for every j∉range⁡(f),0,otherwise,B_{a,b}= \begin{cases} (E_{r,s}+E_{s,r})_{a\circ f,b\circ f}, & a_j=b_j\text{ for every }j\notin\operatorname{range}(f),\\ 0,&\text{otherwise}, \end{cases}Ba,b​={(Er,s​+Es,r​)a∘f,b∘f​,0,​aj​=bj​ for every j∈/range(f),otherwise,​

where Eu,vE_{u,v}Eu,v​ has a single entry 111 at (u,v)(u,v)(u,v). Membership requires some such choices. Transitions with ℓ>n\ell>nℓ>n admit no injection; a zero-arity transition gives 2I2I2I. If RRR is empty, the set is empty.

QAlgorithms.Papers.Independent.Intake100.P83.twoSite

For every complex matrix BBB indexed by pairs of Boolean values, this defines a complex matrix on length-two Boolean words by

twoSite⁡(B)r,s=B(r0,r1),(s0,s1).\operatorname{twoSite}(B)_{r,s}=B_{(r_0,r_1),(s_0,s_1)}.twoSite(B)r,s​=B(r0​,r1​),(s0​,s1​)​.

Here r,s:{0,1}→{false,true}r,s:\{0,1\}\to\{\mathrm{false},\mathrm{true}\}r,s:{0,1}→{false,true}. No unitarity or other condition on BBB is required.

QAlgorithms.Papers.Independent.Intake100.P83.twoX

For a type AAA, a natural number nnn, and words r,s:{0,…,n−1}→Ar,s:\{0,\ldots,n-1\}\to Ar,s:{0,…,n−1}→A, this defines the complex matrix Er,s+Es,rE_{r,s}+E_{s,r}Er,s​+Es,r​, where Eu,vE_{u,v}Eu,v​ has entry 111 at row uuu, column vvv, and 000 elsewhere. If r≠sr\ne sr=s, its only nonzero entries are 111 at (r,s)(r,s)(r,s) and (s,r)(s,r)(s,r). If r=sr=sr=s, it is 2Er,r2E_{r,r}2Er,r​; in particular, for n=0n=0n=0, it is the scalar matrix 222.

QAlgorithms.Papers.Independent.Intake100.P83.twoY

For a type AAA, a natural number nnn, and words r,s:{0,…,n−1}→Ar,s:\{0,\ldots,n-1\}\to Ar,s:{0,…,n−1}→A, this defines the complex matrix i(Er,s−Es,r)i(E_{r,s}-E_{s,r})i(Er,s​−Es,r​), where Eu,vE_{u,v}Eu,v​ has entry 111 at row uuu, column vvv, and 000 elsewhere. For distinct r,sr,sr,s, its entries at (r,s)(r,s)(r,s) and (s,r)(s,r)(s,r) are respectively iii and −i-i−i, with all other entries zero. If r=sr=sr=s, including necessarily when n=0n=0n=0, the matrix is zero.

QAlgorithms.Papers.Independent.Intake100.P83.twoZ

For a type AAA, a natural number nnn, and words r,s:{0,…,n−1}→Ar,s:\{0,\ldots,n-1\}\to Ar,s:{0,…,n−1}→A, this defines the complex matrix Er,r−Es,sE_{r,r}-E_{s,s}Er,r​−Es,s​, where Eu,uE_{u,u}Eu,u​ has a single entry 111 at (u,u)(u,u)(u,u). For distinct r,sr,sr,s, this is diagonal with entries 111 at rrr, −1-1−1 at sss, and zero elsewhere. If r=sr=sr=s, including necessarily when n=0n=0n=0, it is zero.

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

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 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