Definitions for Speeding up Learning Quantum States through Group Equivariant Convolutional Quantum Ansätze
DefinitionQAlgorithms_Papers_Independent_Extend50_P10The objects the formalized statements of Speeding up Learning Quantum States through Group Equivariant Convolutional Quantum Ansätze (arXiv:2112.07611) are stated in. Each was checked against the paper by a blind read-back and a moderator.
complexDiagonals: PDF pp.6,19: the full complex diagonal Cartan, in the specified basis. Matrix units below reuse the accepted Information100.P44.matrixUnit.imaginaryRealDiagonals: PDF pp.6,21: i times every real diagonal matrix.generatedLie: PDF pp.19–21: the Lie subalgebra generated over K, with bracket AB−BA. The intersection is over all K-submodules containing S and closed under that bracket; it is not a linear span or a topological closure.indexGraph: PDF p.20, Definition II.2: adjacency of distinct indices, made symmetric so that the graph is defined even before Hermiticity is imposed. For Hermitian matrices either direction is equivalent to H_ij ≠ 0.PathConnectedHamiltonian: PDF p.20: a Hamiltonian is Hermitian, and its basis-index graph is connected. In particular, a singleton zero Hamiltonian is allowed.augmentedZLabel: PDF p.26: augmented Pauli Z eigenvalue labels; none is Z_0=I and some i is Z_(i+1). The frozen pauliLabel instead selects Pauli matrices and cannot represent this eigenvalue map. The extra identity coordinate does not change ordinary bit-string indexing.quadraticPauliLabel: PDF p.26: all second-order augmented labels, including identity and first-order labels as the entries with an index 0.qaoaControls: PDF pp.7,26: every independently variable real quadratic Z Hamiltonian. This is a control family, not a fixed cost Hamiltonian.evolutionGroup: PDF pp.6,21,26: finite products of the listed matrix exponentials. Submonoid.closure is algebraic: its elements have finite words. When the Hamiltonian set is real-linear, negative controls supply all inverses.generalizedQaoaGroup: PDF pp.7,26: the fixed mixer has arbitrary real evolution times.quditSiteMatrix: PDF pp.12,18: lift a one-site operator to a named qudit, fixing other sites. The alphabet is Fin d, matching the frozen physical tensor-permutation action. The accepted qubit-only siteOperator uses integer bit indices and is not this general-qudit named-wire matrix.spinOperator: PDF p.12: one-half of the specified Pauli operator on a named site. finTwoEquiv identifies Fin 2 symbols 0,1 with false,true.spinDot: PDF pp.12,18: the actual three-component spin-half exchange product.pairAmplitude: PDF pp.9–10: normalized antisymmetric pair, embedded in any alphabet.singletInitialization: PDF p.9, Eq.(5): k zeros followed by b disjoint singlets; n=k+2b.twoRowDiagram: PDF pp.9–10: the unique two-row shape, with no truncated division.physicalShapeProjector: A total adapter to the frozen full physical isotypic projector. On an invalid size/height diagram it is zero; every initialization statement below uses a size-correct, height-bounded diagram. It never selects an embedded Specht copy. The frozen cellular-JM shapeProjector is a different abstract algebra object.occupationModule: PDF pp.3,9: M^mu is the coordinate subspace spanned by all words with occupation vector mu. This is not one chosen irreducible summand of that space.tripleAmplitude: PDF p.10: the normalized SU(3) determinant singlet, in the exact printed order uds−usd+dsu−dus+sud−sdu.su3Initialization: PDF p.10: a singles, b normalized pairs, c normalized determinant triples, on a+2b+3c physical sites.threeRowDiagram: PDF p.10 with the forced site-count correction: (a+b+c,b+c,c). Printed (n+k+l,n−k+l,l) must read ((n+k)/2+l,(n−k)/2+l,l) when n=a+2b and k=a. The printed shape has too many boxes.columnInitialization: PDF pp.2,9–10: tensor normalized antisymmetric states on the columns of lambda. The frozen cell numbering determines placement. Column permutations act on the frozen row-word; distinct permutations give distinct basis words.PreparationGate: A named-wire qudit gate in the continuous one- and two-qudit model used for the constant-depth claim, PDF pp.2,9–10. Arbitrary wire pairs are allowed.liftSupported: Lift an operator on a fixed subset, acting identically elsewhere.PreparationCircuit: PDF pp.2,9–10: layers have pairwise disjoint supports; depth is their count. The gate matrices carry their own unitarity, not an unrelated cost witness.preparationMatrix: Layers are listed in chronological order and multiply on the left.collectiveAction: PDF p.3: the collective action g tensor n, computed in the physical basis.CollectivelyInvariant: PDF pp.23–24: SU(d) symmetry refers to the actual collective group action. The frozen rational-permutation-submodule IsInvariant is a different predicate.localInvariantHamiltonians: PDF p.24: each Hamiltonian is supported on one fixed subset of at most k sites. Different Hamiltonians may choose different subsets.invariantLocalGroup: PDF p.24: V_k, exact finite products of fixed-support invariant evolutions.invariantLocalSumGroup: PDF p.24: V'_k allows finite real sums with different supports before exponentiation. This is a real span of the concrete local Hermitian operators.physicalAlgebraMatrix: PDF p.3: the actual linear extension of the physical permutation action.spechtAlgebraMatrix: PDF pp.3,19,24: the matrix of the actual regular-ideal Specht action. Any fixed orthonormal coordinates suffice for a determinant: these coordinates are deliberately not claimed to be Young or sequential CG coordinates.specialInvariantLocalGroup: PDF p.24: SV_k imposes determinant one on each nonrepeated Specht block. The coefficient function represents U through the concrete physical action and also computes all Specht blocks; no arbitrary unrelated block matrices occur. Only physical height-bounded shapes are tested.originalYjm: PDF pp.4–5: the original physical X_(k+1), with X_1=0.cqaYjm: PDF pp.6,23: only in the CQA control family, replace X_1 by I.quadraticPhysicalControls: PDF pp.6,23: real independently variable augmented quadratic controls.adjacentSwapHamiltonian: PDF p.24: the open-chain adjacent-SWAP Hamiltonian, with no (1,n) term.physicalCqaGroup: PDF pp.7,24: the simultaneous-sector CQA group used in four-locality, with its fixed open-chain mixer H_S, not an arbitrary H_P.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Gates
import Definitions.Def_QAlgorithms_Defs_SchurWeylDecomposition
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P44
/-!
Statements from arXiv:2112.07611v3. Deferred nodes and the missing canonical
physical Young/CG interfaces are recorded in the assigned chunk's HARD.md.
Only algebraic finite generation is used below; `closure` occurs only in the
supplement's explicitly weaker density statement. Compilation is pending the
batch handoff. All local definitions have complete bodies.
-/
noncomputable section
open scoped Matrix
open QAlgorithms
open QAlgorithms.Schur
open QAlgorithms.Papers.Independent.Information100.P44 (matrixUnit)
namespace QAlgorithms.Papers.Independent.Extend50.P10
attribute [local instance] Classical.propDecidable
/-- PDF pp.6,19: the full complex diagonal Cartan, in the specified basis.
Matrix units below reuse the accepted Information100.P44.matrixUnit. -/
def complexDiagonals (D : ℕ) : Set (Matrix (Fin D) (Fin D) ℂ) :=
Set.range (fun v : Fin D → ℂ => Matrix.diagonal v)
/-- PDF pp.6,21: i times every real diagonal matrix. -/
def imaginaryRealDiagonals (D : ℕ) : Set (Matrix (Fin D) (Fin D) ℂ) :=
Set.range (fun v : Fin D → ℝ =>
Complex.I • Matrix.diagonal (fun j => (v j : ℂ)))
/-- PDF pp.19–21: the Lie subalgebra generated over K, with bracket AB−BA.
The intersection is over all K-submodules containing S and closed under that
bracket; it is not a linear span or a topological closure. -/
def generatedLie (K : Type*) [Field K] {A : Type*} [Ring A] [Module K A]
(S : Set A) : Submodule K A :=
sInf {V : Submodule K A | S ⊆ V ∧
∀ a ∈ V, ∀ b ∈ V, a * b - b * a ∈ V}
/-- PDF p.20, Definition II.2: adjacency of distinct indices, made symmetric
so that the graph is defined even before Hermiticity is imposed. For Hermitian
matrices either direction is equivalent to H_ij ≠ 0. -/
def indexGraph {ι : Type*} (H : Matrix ι ι ℂ) : SimpleGraph ι where
Adj i j := i ≠ j ∧ (H i j ≠ 0 ∨ H j i ≠ 0)
symm := ⟨fun i j h => ⟨h.1.symm, h.2.symm⟩⟩
loopless := ⟨fun i h => h.1 rfl⟩
/-- PDF p.20: a Hamiltonian is Hermitian, and its basis-index graph is connected.
In particular, a singleton zero Hamiltonian is allowed. -/
def PathConnectedHamiltonian {ι : Type*} [Fintype ι]
(H : Matrix ι ι ℂ) : Prop :=
H.IsHermitian ∧ (indexGraph H).Connected
/-- PDF p.26: augmented Pauli Z eigenvalue labels; none is Z_0=I and
some i is Z_(i+1). The frozen pauliLabel instead selects Pauli matrices and
cannot represent this eigenvalue map.
The extra identity coordinate does not change ordinary bit-string indexing. -/
def augmentedZLabel {n : ℕ} (x : Qubits n) : Option (Fin n) → ℝ
| none => 1
| some i => if x i then -1 else 1
/-- PDF p.26: all second-order augmented labels, including identity and
first-order labels as the entries with an index 0. -/
def quadraticPauliLabel {n : ℕ} (x : Qubits n) :
Option (Fin n) × Option (Fin n) → ℝ :=
fun p => augmentedZLabel x p.1 * augmentedZLabel x p.2
/-- PDF pp.7,26: every independently variable real quadratic Z Hamiltonian.
This is a control family, not a fixed cost Hamiltonian. -/
def qaoaControls (n : ℕ) : Set (Matrix (Qubits n) (Qubits n) ℂ) :=
Set.range (fun beta : Option (Fin n) × Option (Fin n) → ℝ =>
Matrix.diagonal (fun x =>
((∑ p, beta p * quadraticPauliLabel x p : ℝ) : ℂ)))
/-- PDF pp.6,21,26: finite products of the listed matrix exponentials.
Submonoid.closure is algebraic: its elements have finite words. When the
Hamiltonian set is real-linear, negative controls supply all inverses. -/
def evolutionGroup {ι : Type*} [Fintype ι] [DecidableEq ι]
(S : Set (Matrix ι ι ℂ)) : Submonoid (Matrix ι ι ℂ) :=
Submonoid.closure {U | ∃ H ∈ S, U = NormedSpace.exp (-Complex.I • H)}
/-- PDF pp.7,26: the fixed mixer has arbitrary real evolution times. -/
def generalizedQaoaGroup {n : ℕ} (H : Matrix (Qubits n) (Qubits n) ℂ) :
Submonoid (Matrix (Qubits n) (Qubits n) ℂ) :=
evolutionGroup (qaoaControls n ∪ Set.range (fun t : ℝ => t • H))
example {n : ℕ} (x : Qubits n) : augmentedZLabel x none = 1 := rfl
example {n : ℕ} (x : Qubits n) (j : Option (Fin n)) :
quadraticPauliLabel x (none, j) = augmentedZLabel x j := by
simp [quadraticPauliLabel, augmentedZLabel]
example {ι : Type*} [Fintype ι] [DecidableEq ι]
(S : Set (Matrix ι ι ℂ)) : 1 ∈ evolutionGroup S :=
(evolutionGroup S).one_mem
/-- PDF pp.12,18: lift a one-site operator to a named qudit, fixing other sites.
The alphabet is Fin d, matching the frozen physical tensor-permutation action.
The accepted qubit-only siteOperator uses integer bit indices and is not this
general-qudit named-wire matrix. -/
def quditSiteMatrix {d n : ℕ} (i : Fin n) (A : Matrix (Fin d) (Fin d) ℂ) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
Matrix.of (fun x y => if ∀ j, j ≠ i → x j = y j then A (x i) (y i) else 0)
/-- PDF p.12: one-half of the specified Pauli operator on a named site.
finTwoEquiv identifies Fin 2 symbols 0,1 with false,true. -/
def spinOperator {n : ℕ} (i : Fin n) (A : Matrix Bool Bool ℂ) :
Matrix (Fin n → Fin 2) (Fin n → Fin 2) ℂ :=
(1 / 2 : ℂ) • quditSiteMatrix i (Matrix.of (fun a b => A (finTwoEquiv a) (finTwoEquiv b)))
/-- PDF pp.12,18: the actual three-component spin-half exchange product. -/
def spinDot {n : ℕ} (i j : Fin n) : Matrix (Fin n → Fin 2) (Fin n → Fin 2) ℂ :=
spinOperator i pauliX * spinOperator j pauliX +
spinOperator i pauliY * spinOperator j pauliY +
spinOperator i pauliZ * spinOperator j pauliZ
/-- PDF pp.9–10: normalized antisymmetric pair, embedded in any alphabet. -/
def pairAmplitude {d : ℕ} (x y : Fin d) : ℂ :=
if x.val = 0 ∧ y.val = 1 then ((Real.sqrt 2)⁻¹ : ℂ)
else if x.val = 1 ∧ y.val = 0 then -((Real.sqrt 2)⁻¹ : ℂ) else 0
/-- PDF p.9, Eq.(5): k zeros followed by b disjoint singlets; n=k+2b. -/
def singletInitialization (k b : ℕ) : EuclideanSpace ℂ (Fin (k + 2*b) → Fin 2) :=
WithLp.toLp 2 (fun x =>
(if ∀ i : Fin k, x ⟨i.val, by omega⟩ = 0 then 1 else 0) *
∏ j : Fin b,
pairAmplitude (x ⟨k + 2*j.val, by omega⟩) (x ⟨k + 2*j.val + 1, by omega⟩))
/-- PDF pp.9–10: the unique two-row shape, with no truncated division. -/
def twoRowDiagram (k b : ℕ) : YoungDiagram :=
YoungDiagram.ofRowLens [k+b, b] (by simp [List.sortedGE_iff_pairwise] <;> omega)
/-- A total adapter to the frozen full physical isotypic projector. On an invalid
size/height diagram it is zero; every initialization statement below uses a
size-correct, height-bounded diagram. It never selects an embedded Specht copy.
The frozen cellular-JM shapeProjector is a different abstract algebra object. -/
def physicalShapeProjector (d n : ℕ) (lambda : YoungDiagram) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
if h : lambda.card = n ∧ lambda.colLen 0 ≤ d then isotypicProjector ⟨lambda, h⟩
else 0
/-- PDF pp.3,9: M^mu is the coordinate subspace spanned by all words with
occupation vector mu. This is not one chosen irreducible summand of that space. -/
def occupationModule {d n : ℕ} (mu : Fin d → ℕ) :
Submodule ℂ (EuclideanSpace ℂ (Fin n → Fin d)) :=
Submodule.span ℂ {v | ∃ x : Fin n → Fin d,
(∀ a, (Finset.univ.filter (fun i => x i = a)).card = mu a) ∧ v = ket x}
/-- PDF p.10: the normalized SU(3) determinant singlet, in the exact printed
order uds−usd+dsu−dus+sud−sdu. -/
def tripleAmplitude (x y z : Fin 3) : ℂ :=
((Real.sqrt 6)⁻¹ : ℂ) *
((if (x,y,z) = (0,1,2) then 1 else 0) -
(if (x,y,z) = (0,2,1) then 1 else 0) +
(if (x,y,z) = (1,2,0) then 1 else 0) -
(if (x,y,z) = (1,0,2) then 1 else 0) +
(if (x,y,z) = (2,0,1) then 1 else 0) -
(if (x,y,z) = (2,1,0) then 1 else 0))
/-- PDF p.10: a singles, b normalized pairs, c normalized determinant triples,
on a+2b+3c physical sites. -/
def su3Initialization (a b c : ℕ) :
EuclideanSpace ℂ (Fin (a+2*b+3*c) → Fin 3) :=
WithLp.toLp 2 (fun x =>
(if ∀ i : Fin a, x ⟨i.val, by omega⟩ = 0 then 1 else 0) *
(∏ j : Fin b,
pairAmplitude (x ⟨a+2*j.val, by omega⟩) (x ⟨a+2*j.val+1, by omega⟩)) *
∏ j : Fin c,
tripleAmplitude (x ⟨a+2*b+3*j.val, by omega⟩)
(x ⟨a+2*b+3*j.val+1, by omega⟩) (x ⟨a+2*b+3*j.val+2, by omega⟩))
/-- PDF p.10 with the forced site-count correction: (a+b+c,b+c,c).
Printed (n+k+l,n−k+l,l) must read ((n+k)/2+l,(n−k)/2+l,l)
when n=a+2b and k=a. The printed shape has too many boxes. -/
def threeRowDiagram (a b c : ℕ) : YoungDiagram :=
YoungDiagram.ofRowLens [a+b+c, b+c, c] (by simp [List.sortedGE_iff_pairwise] <;> omega)
/-- PDF pp.2,9–10: tensor normalized antisymmetric states on the columns of
lambda. The frozen cell numbering determines placement. Column permutations
act on the frozen row-word; distinct permutations give distinct basis words. -/
def columnInitialization {d n : ℕ} (lambda : Partition d n) :
EuclideanSpace ℂ (Fin n → Fin d) :=
((Real.sqrt ((columnPermutations lambda).card : ℝ))⁻¹ : ℂ) •
∑ pi ∈ columnPermutations lambda,
((((Equiv.Perm.sign pi : ℤˣ) : ℤ) : ℂ)) •
act (tensorPermutation d n pi) (ket (highestWeightWord lambda))
/-- A named-wire qudit gate in the continuous one- and two-qudit model used for the
constant-depth claim, PDF pp.2,9–10. Arbitrary wire pairs are allowed. -/
structure PreparationGate (d n : ℕ) where
support : Finset (Fin n)
arity : support.card ≤ 2
unitary : Matrix.unitaryGroup (support → Fin d) ℂ
/-- Lift an operator on a fixed subset, acting identically elsewhere. -/
def liftSupported {d n : ℕ} (S : Finset (Fin n))
(A : Matrix (S → Fin d) (S → Fin d) ℂ) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
Matrix.of (fun x y => if ∀ i, i ∉ S → x i = y i
then A (fun i => x i.val) (fun i => y i.val) else 0)
/-- PDF pp.2,9–10: layers have pairwise disjoint supports; depth is their count.
The gate matrices carry their own unitarity, not an unrelated cost witness. -/
structure PreparationCircuit (d n : ℕ) where
layers : List (List (PreparationGate d n))
disjoint : ∀ layer ∈ layers,
layer.Pairwise (fun g h => Disjoint g.support h.support)
/-- Layers are listed in chronological order and multiply on the left. -/
def preparationMatrix {d n : ℕ} (C : PreparationCircuit d n) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
C.layers.foldl (fun U layer =>
(layer.map (fun g => liftSupported g.support (g.unitary : Matrix _ _ ℂ))).prod * U) 1
example : pairAmplitude (0 : Fin 2) 0 = 0 := by simp [pairAmplitude]
example : pairAmplitude (0 : Fin 2) 1 = ((Real.sqrt 2)⁻¹ : ℂ) := by
simp [pairAmplitude]
example : tripleAmplitude 0 0 0 = 0 := by simp [tripleAmplitude]
example (n : ℕ) : preparationMatrix
({ layers := [], disjoint := by simp } : PreparationCircuit 2 n) = 1 := rfl
/-- PDF p.3: the collective action g tensor n, computed in the physical basis. -/
def collectiveAction (d n : ℕ) (g : Matrix.specialUnitaryGroup (Fin d) ℂ) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
Matrix.of (fun x y => ∏ i, (g : Matrix (Fin d) (Fin d) ℂ) (x i) (y i))
/-- PDF pp.23–24: SU(d) symmetry refers to the actual collective group action.
The frozen rational-permutation-submodule IsInvariant is a different predicate. -/
def CollectivelyInvariant {d n : ℕ} (H : Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ) : Prop :=
∀ g : Matrix.specialUnitaryGroup (Fin d) ℂ,
H * collectiveAction d n g = collectiveAction d n g * H
/-- PDF p.24: each Hamiltonian is supported on one fixed subset of at most k
sites. Different Hamiltonians may choose different subsets. -/
def localInvariantHamiltonians (d n k : ℕ) :
Set (Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ) :=
{H | H.IsHermitian ∧ CollectivelyInvariant H ∧
∃ S : Finset (Fin n), S.card ≤ k ∧
∃ A : Matrix (S → Fin d) (S → Fin d) ℂ, H = liftSupported S A}
/-- PDF p.24: V_k, exact finite products of fixed-support invariant evolutions. -/
def invariantLocalGroup (d n k : ℕ) :
Submonoid (Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ) :=
evolutionGroup (localInvariantHamiltonians d n k)
/-- PDF p.24: V'_k allows finite real sums with different supports before
exponentiation. This is a real span of the concrete local Hermitian operators. -/
def invariantLocalSumGroup (d n k : ℕ) :
Submonoid (Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ) :=
evolutionGroup (Submodule.span ℝ (localInvariantHamiltonians d n k) :
Set (Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ))
example (d : ℕ) (g : Matrix.specialUnitaryGroup (Fin d) ℂ) :
collectiveAction d 0 g = 1 := by
ext x y
simp [collectiveAction, Matrix.one_apply, Subsingleton.elim x y]
/-- PDF p.3: the actual linear extension of the physical permutation action. -/
def physicalAlgebraMatrix (d n : ℕ) (f : Equiv.Perm (Fin n) → ℂ) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
∑ g, f g • tensorPermutation d n g
/-- PDF pp.3,19,24: the matrix of the actual regular-ideal Specht action.
Any fixed orthonormal coordinates suffice for a determinant: these coordinates
are deliberately not claimed to be Young or sequential CG coordinates. -/
def spechtAlgebraMatrix {d n : ℕ} (lambda : Partition d n)
(f : Equiv.Perm (Fin n) → ℂ) :
Matrix (Fin (Module.finrank ℂ (spechtSpace lambda)))
(Fin (Module.finrank ℂ (spechtSpace lambda))) ℂ :=
let b := stdOrthonormalBasis ℂ (spechtSpace lambda)
∑ g, f g • LinearMap.toMatrix b.toBasis b.toBasis (spechtRepresentation lambda g)
/-- PDF p.24: SV_k imposes determinant one on each nonrepeated Specht block.
The coefficient function represents U through the concrete physical action and
also computes all Specht blocks; no arbitrary unrelated block matrices occur.
Only physical height-bounded shapes are tested. -/
def specialInvariantLocalGroup (d n k : ℕ) :
Set (Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ) :=
{U | U ∈ invariantLocalGroup d n k ∧
∃ f : Equiv.Perm (Fin n) → ℂ, physicalAlgebraMatrix d n f = U ∧
∀ lambda : Partition d n, (spechtAlgebraMatrix lambda f).det = 1}
/-- PDF pp.4–5: the original physical X_(k+1), with X_1=0. -/
def originalYjm (d n : ℕ) (k : Fin n) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
∑ j ∈ Finset.univ.filter (fun j : Fin n => j < k),
tensorPermutation d n (Equiv.swap j k)
/-- PDF pp.6,23: only in the CQA control family, replace X_1 by I. -/
def cqaYjm (d n : ℕ) (k : Fin n) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
if k.val = 0 then 1 else originalYjm d n k
/-- PDF pp.6,23: real independently variable augmented quadratic controls. -/
def quadraticPhysicalControls (d n : ℕ) :
Set (Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ) :=
Set.range (fun beta : Fin n × Fin n → ℝ =>
∑ p, (beta p : ℂ) • (cqaYjm d n p.1 * cqaYjm d n p.2))
/-- PDF p.24: the open-chain adjacent-SWAP Hamiltonian, with no (1,n) term. -/
def adjacentSwapHamiltonian (d n : ℕ) :
Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ :=
∑ i : Fin n, if h : i.val + 1 < n then
tensorPermutation d n (Equiv.swap i ⟨i.val+1, h⟩) else 0
/-- PDF pp.7,24: the simultaneous-sector CQA group used in four-locality,
with its fixed open-chain mixer H_S, not an arbitrary H_P. -/
def physicalCqaGroup (d n : ℕ) :
Submonoid (Matrix (Fin n → Fin d) (Fin n → Fin d) ℂ) :=
evolutionGroup (quadraticPhysicalControls d n ∪
Set.range (fun t : ℝ => t • adjacentSwapHamiltonian d n))
example (d : ℕ) : cqaYjm d 1 0 = 1 := by simp [cqaYjm]
example (d : ℕ) : originalYjm d 1 0 = 0 := by simp [originalYjm]
example (d : ℕ) : adjacentSwapHamiltonian d 1 = 0 := by
simp [adjacentSwapHamiltonian]
end QAlgorithms.Papers.Independent.Extend50.P10
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Extend50.P10.CollectivelyInvariant
For any natural numbers and any complex matrix indexed by configurations in , this predicate means that, for every ,
No Hermiticity condition is part of this predicate. Zero values of and are included: for , is the identity and every satisfies the predicate; for , the matrices have empty index set.
QAlgorithms.Papers.Independent.Extend50.P10.PathConnectedHamiltonian
For any finite type , equipped with a finite enumeration, and any complex matrix indexed by , this property means that and that the following graph is connected: its vertices are the elements of , and distinct are adjacent exactly when or . Connectedness requires a nonempty vertex set and a finite path between every pair of vertices. Consequently, the property fails for an empty index type; for a singleton index type, the graph condition holds without any edges.
QAlgorithms.Papers.Independent.Extend50.P10.PreparationCircuit
For arbitrary natural numbers , a value of this structure consists of a finite ordered list of layers, each itself a finite ordered list of gates, where every gate has a support of cardinality at most two and a complex unitary matrix indexed by functions . It also includes the requirement that, within every layer, the supports of any two distinct list positions are disjoint. The layer list and individual layers may be empty, gates may have empty support, and there is no restriction on overlap between different layers or on the number of layers. No positivity assumption on is made.
QAlgorithms.Papers.Independent.Extend50.P10.PreparationGate
For arbitrary natural numbers , a value of this structure consists of a finite set , a proof that , and a complex unitary matrix whose rows and columns are indexed by functions ; explicitly, . Supports of size zero, one, or two are allowed. For empty support there is one indexing function, so is a scalar of modulus one; no positivity assumption on or is imposed.
QAlgorithms.Papers.Independent.Extend50.P10.adjacentSwapHamiltonian
For arbitrary natural numbers , let be the set of functions from the positions to , and let be the matrix with entry at exactly when , and entry otherwise. The declaration defines the complex matrix
Precisely, its defining sum runs over all , contributing the adjacent transposition matrix when and the zero matrix otherwise. Thus for or ; is also permitted.
QAlgorithms.Papers.Independent.Extend50.P10.augmentedZLabel
For every natural number and every Boolean string , this defines a real-valued function on the set consisting of a distinguished extra element and the indices . Its value at is , and its value at an index is when and when . When , its domain consists only of .
QAlgorithms.Papers.Independent.Extend50.P10.collectiveAction
For natural numbers and a matrix , this defines a complex matrix indexed by configurations , with entries
When , there is one empty configuration and the empty product is , so the resulting matrix is the identity, including when . When , there are no configurations and the resulting matrix has empty index set.
QAlgorithms.Papers.Independent.Extend50.P10.columnInitialization
For arbitrary natural numbers and a Young diagram with exactly cells and at most rows, use the definition’s chosen bijection from its cells to . Let consist of permutations that preserve the column of each numbered cell, and define the word by taking to be the zero-based row number of the cell numbered . This defines the vector
where is the coordinate vector at . The identity belongs to , so its cardinality is positive. The definition includes , when the vector is the coordinate vector at the unique empty word; is permitted only when such a diagram exists, which forces .
QAlgorithms.Papers.Independent.Extend50.P10.complexDiagonals
For every natural number , this defines the set of complex diagonal matrices: a matrix belongs to this set exactly when it equals for some function . Its diagonal entries are unrestricted complex numbers, and all off-diagonal entries are zero. When , the set consists of the unique empty matrix.
QAlgorithms.Papers.Independent.Extend50.P10.cqaYjm
For any natural numbers and any index , this defines a complex matrix on configurations in by
where is the identity matrix and swaps the indicated sites. There is no admissible index when . The value is permitted, in which case the matrices have empty index set whenever exists.
QAlgorithms.Papers.Independent.Extend50.P10.evolutionGroup
For any finite index type with decidable equality and any set of complex matrices, this defines the smallest multiplicative submonoid containing every matrix with . Its elements are exactly finite products of such exponentials, including the empty product, which is the identity matrix. This is algebraic submonoid generation; no topological closure is taken. No Hermitian assumption is imposed on the matrices in . The index type and may be empty.
QAlgorithms.Papers.Independent.Extend50.P10.generalizedQaoaGroup
For any natural number and any complex matrix indexed by the bit strings , define , , and if and if . This defines the multiplicative submonoid consisting of all finite products of matrices of the forms and , where , is arbitrary, and is diagonal with
The sum uses ordered pairs, including repeated indices and the auxiliary index . The empty product is included, and no topological closure or Hermitian assumption on is required. The definition includes , when has one element.
QAlgorithms.Papers.Independent.Extend50.P10.generatedLie
Let be any field, let be any ring equipped with a -module structure, and let . This defines the -submodule obtained by intersecting all -submodules that contain and satisfy for every . Equivalently, it is the smallest -linear subspace containing and closed under the ring commutator . No compatibility between scalar multiplication and ring multiplication beyond the stated module and ring structures is assumed. The set may be empty; in that case the defined submodule is .
QAlgorithms.Papers.Independent.Extend50.P10.imaginaryRealDiagonals
For every natural number , this defines the set of matrices , where and is arbitrary, with its entries regarded as complex numbers. Thus these are precisely the complex diagonal matrices whose diagonal entries are purely imaginary, including zero entries. When , the set consists of the unique empty matrix.
QAlgorithms.Papers.Independent.Extend50.P10.indexGraph
For any type and any complex matrix with rows and columns indexed by , this defines a simple undirected graph with vertex set . Two vertices are adjacent exactly when and at least one of and is nonzero. Diagonal entries do not create edges. Neither finiteness of nor Hermiticity of is required, and the vertex set may be empty.
QAlgorithms.Papers.Independent.Extend50.P10.invariantLocalGroup
For any natural numbers , this defines the submonoid of complex matrices on configurations in consisting of all finite products
where each is Hermitian, commutes with every matrix whose entries are for , and has some support with : there is a matrix on configurations of such that when agree outside , and zero otherwise. The product with is the identity. This is algebraic generation by finite products; the definition does not take a topological closure. Zero parameters and empty supports are allowed, and products over an empty site set equal .
QAlgorithms.Papers.Independent.Extend50.P10.invariantLocalSumGroup
For any natural numbers , let be the set of Hermitian complex matrices on configurations in that commute with every , where for , and that can each be written using some support with as when agree outside , and zero otherwise. This definition gives the submonoid consisting of all finite products of matrices , where is any finite real linear combination of elements of . Both the linear combination and the product may be empty, giving and the identity matrix respectively. Zero values of and empty supports are permitted, and the site product defining is when . The generated submonoid uses finite products without a topological closure.
QAlgorithms.Papers.Independent.Extend50.P10.liftSupported
For arbitrary natural numbers , a finite set , and any complex matrix indexed by functions , this defines the matrix on full words by
There is no assumption that is unitary or Hermitian, and no bound on . For empty , this is the unique entry of times the identity matrix; zero values of are also included.
QAlgorithms.Papers.Independent.Extend50.P10.localInvariantHamiltonians
For any natural numbers , this defines the set of complex matrices indexed by configurations in satisfying all three conditions: is Hermitian; commutes with every matrix having entries for ; and there exist a subset with and a complex matrix indexed by functions such that
All three parameters may be zero, and may be empty; an empty support gives a scalar multiple of the identity. The existential condition requires one such support and one such matrix.
QAlgorithms.Papers.Independent.Extend50.P10.occupationModule
For arbitrary natural numbers and a function , this defines the complex linear subspace of spanned by the coordinate vectors for words satisfying
Here has coordinate at and elsewhere. No condition such as is assumed; if no word satisfies these counts, the span is the zero subspace. In particular, when , the unique empty word qualifies exactly when every ; when , there are no words.
QAlgorithms.Papers.Independent.Extend50.P10.originalYjm
For any natural numbers and any index , this defines the complex matrix on configurations in
where exchanges the two site indices and fixes all others. The index is zero-based, so by the empty-sum convention. There is no admissible when ; is allowed, yielding matrices with empty index set whenever exists.
QAlgorithms.Papers.Independent.Extend50.P10.pairAmplitude
For every natural number and every , this defines the complex number
The definition applies to arbitrary , rather than requiring . For its only value is zero, and for there are no possible arguments.
QAlgorithms.Papers.Independent.Extend50.P10.physicalAlgebraMatrix
For any natural numbers and any function , this defines the complex matrix on configurations in given by
There are no restrictions on the coefficients . If , both the permutation set and the configuration set are singletons, and is the matrix with entry , including when . If , the matrix has empty index set.
QAlgorithms.Papers.Independent.Extend50.P10.physicalCqaGroup
For arbitrary natural numbers , let be the set of functions from positions to symbols, and define when , and otherwise. Set if , for , and . The declaration defines the submonoid of complex matrices indexed by consisting of all finite products of matrices , where each factor independently uses either
The empty product is included and equals the identity; the closure used here is generation as a submonoid, without taking any topological closure. Zero values of are allowed. In particular, when , both kinds of are zero, so the submonoid contains only the identity matrix.
QAlgorithms.Papers.Independent.Extend50.P10.physicalShapeProjector
For arbitrary natural numbers and a Young diagram , this defines a complex matrix indexed by words . If does not have exactly cells and at most rows, the matrix is zero. Otherwise, use the definition’s chosen numbering of the cells by , and let be the permutations preserving, respectively, the row and column of every numbered cell. On , define matrices
Let , let be its orthogonal projection, and put . The defined matrix is
There are no positivity assumptions on ; zero values are included, with the same condition and formulas.
QAlgorithms.Papers.Independent.Extend50.P10.preparationMatrix
For arbitrary natural numbers and a circuit consisting of ordered layers of gates with supports of size at most two, unitary local matrices, and pairwise disjoint supports within each layer, this defines a matrix on words . For each gate with support and local matrix , put
If the layers in list order are , with , the defined matrix is
Thus gate matrices are multiplied in list order within each layer, and successive layer products multiply on the left. An empty layer contributes the identity, and a circuit with no layers gives the identity; zero values of are included.
QAlgorithms.Papers.Independent.Extend50.P10.qaoaControls
For every natural number , this defines a set of complex matrices indexed by Boolean strings of length . Write , where is an extra element, and put and , interpreting false as and true as . A matrix belongs to the defined set exactly when, for some arbitrary real coefficient function , it is diagonal with entry at the Boolean string , regarded as a complex number. The sum includes all ordered pairs, including repeated indices and , and no symmetry condition is imposed on . When , there is one Boolean string and the set consists of all matrices with a real entry.
QAlgorithms.Papers.Independent.Extend50.P10.quadraticPauliLabel
For every natural number and every Boolean string of length , define and if is true, otherwise, where is an extra element distinct from all indices. This defines the real-valued function on ordered pairs of such augmented indices by . In particular, its value is when both entries are or when both entries are the same ordinary index, and it equals when one entry is and the other is . When , the only pair is , with value .
QAlgorithms.Papers.Independent.Extend50.P10.quadraticPhysicalControls
For natural numbers , let . For a permutation of the positions, define the complex matrix , indexed by , by if , and otherwise. Put when , and for , where exchanges positions . The declaration defines the set of matrices
with the real coefficients regarded as complex scalars. The coefficients are arbitrary and need not be symmetric in . Both and are allowed; when , the sum is empty and the defined set is the singleton containing the zero matrix.
QAlgorithms.Papers.Independent.Extend50.P10.quditSiteMatrix
For natural numbers , a site , and any complex matrix , this defines a matrix indexed by configurations , whose entries are
No Hermitian or unitary assumption is imposed on . The supplied site requires ; is allowed, in which case there are no configurations and the resulting matrix has empty index sets.
QAlgorithms.Papers.Independent.Extend50.P10.singletInitialization
For every pair of natural numbers , this defines a vector in the complex Euclidean space indexed by configurations , with amplitudes
where , , and . When , the condition in the indicator is vacuous; when , the product is . In particular, for , the unique empty configuration has amplitude .
QAlgorithms.Papers.Independent.Extend50.P10.spechtAlgebraMatrix
For any natural numbers , any Young diagram with cells and at most nonempty rows, and any function , fix the cell numbering supplied by a bijection between the cells of and . Let be the permutations preserving, respectively, the row and column of each numbered cell. On , define
Let be orthogonal projection onto , let be its chosen standard orthonormal basis, and set . The declaration defines the matrix
where the matrix of each map uses for both domain and codomain. Zero values of are permitted whenever such a diagram exists; if , the resulting matrix has empty index set.
QAlgorithms.Papers.Independent.Extend50.P10.specialInvariantLocalGroup
For any natural numbers , this defines the set of complex matrices on configurations in satisfying two conditions. First, is a finite product of , where each is Hermitian, commutes with every having entries for , and admits a support with and entries when agree outside , and zero otherwise. Second, there exists one function such that
and the following determinant equals for every Young diagram with cells and at most nonempty rows:
Here a fixed cell numbering defines row-preserving permutations and column-preserving permutations ; is the range of the operator on ; ; is orthogonal projection onto ; and is its chosen standard orthonormal basis. Zero parameters, empty supports, and empty products are included; the latter give the identity. The site product is for , a determinant on a zero-dimensional space is , and the universal diagram condition is vacuous if there are no such diagrams.
QAlgorithms.Papers.Independent.Extend50.P10.spinDot
For any natural number and sites , this defines the matrix
on configurations in , where, in the order ,
and when and agree at every site other than , and is zero otherwise. Products are ordinary matrix products in the displayed order. The sites may coincide; their existence excludes .
QAlgorithms.Papers.Independent.Extend50.P10.spinOperator
For any natural number , any site , and any complex matrix indexed by the two Boolean values, this defines a matrix indexed by configurations . Identifying with false and with true, its entries are
No Hermitian or unitary assumption on is required, and the existence of excludes .
QAlgorithms.Papers.Independent.Extend50.P10.su3Initialization
For arbitrary natural numbers , put . This defines a vector whose coordinate at a word is
where , , and is zero on all other pairs from ; is on , is on , and is zero otherwise. Zero values of any parameter are allowed, with empty products equal to ; when all three are zero, the coordinate at the unique empty word is .
QAlgorithms.Papers.Independent.Extend50.P10.threeRowDiagram
For arbitrary natural numbers , this defines the Young diagram with successive row lengths
and all later row lengths zero. These lengths are weakly decreasing, and their sum is . Zero parameters are allowed; zero-length rows contribute no cells, and gives the empty diagram.
QAlgorithms.Papers.Independent.Extend50.P10.tripleAmplitude
For any , this defines the complex number
Thus every triple with a repeated entry has amplitude zero.
QAlgorithms.Papers.Independent.Extend50.P10.twoRowDiagram
For every pair of natural numbers , this defines the Young diagram with prescribed row lengths and , which are weakly decreasing because . Explicitly, using row and column indices starting at zero, its cells are exactly
Zero-length rows contribute no cells: if , only a row of length remains, and if , the diagram is empty.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.