Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Restrictions on realizable unitary operations imposed by symmetry and locality

Definition
QAlgorithms_Papers_Independent_Extend50_P14

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

prove2quantum

The objects the formalized statements of Restrictions on realizable unitary operations imposed by symmetry and locality (arXiv:2003.05524) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • SiteBasis
  • TensorSupported: PDF pp.1,13: support means an operator on the selected tensor factors, with the identity on every complementary factor.
  • SiteLocal: PDF p.1: a single k-local operator, as opposed to a sum of local terms.
  • OnSite: PDF p.13, A1–A2: on-site unitary representations, allowing heterogeneous sites.
  • OnSite.total: PDF p.13, A2: the specified tensor product representation.
  • CommutesWithAction: PDF pp.1,13: the commutant of a representation.
  • localGates: PDF p.13, A4: the actual generator set.
  • symmetricLocalGroup: PDF p.13, A4: algebraic submonoid closure consists of finite gate products. The generators contain their inverses, so it is the generated group.
  • symmetricLocalLie: PDF p.13, A5: real Lie closure, with the ordinary matrix commutator.
  • localTermSpan: PDF p.2: a sum of local terms need not have individually invariant terms.
  • schrodingerEvolution: PDF p.13: Schrödinger sign convention.
  • Propagator: PDF pp.14–15,31: entrywise integral Schrödinger equation from I. Integrability on the closed interval and the integral equation include finite pulses; unitarity is an invariant of the stipulated physical propagator.
  • QMat
  • qubitWeight: PDF p.23: Hamming weight.
  • zString: PDF p.23, C2: unnormalized Pauli Z string on a bit mask.
  • chargeSector: PDF p.23: full physical charge-sector projector, including the end sectors.
  • u1Central: PDF p.23, C2: sum of all Z strings of weight l, with no normalization.
  • phaseWeight: PDF p.23, C3: integer Krawtchouk coefficient; the s≤l guard prevents natural subtraction from counting spurious terms when s>l.
  • totalZ: PDF p.23, C1: total Z; commuting with it is exactly U(1) invariance.
  • U1Invariant: PDF p.23: this definition is used for Hermitian and skew-Hermitian operators.
  • U1Unitary: PDF p.1: a physical U(1)-invariant unitary.
  • rotations: PDF p.23, C1: all rotations, not one selected group element.
  • u1Lie: PDF p.24, C7.
  • u1Group: PDF p.2: finite local symmetric circuits on the actual qubit register.
  • xyExchange: PDF p.26, C23: R=(XX+YY)/2, for distinct sites.
  • exchangeControls: PDF pp.24,32, C9/D8: all exchange and single-site Z Hamiltonians.
  • xyZLie: PDF p.24, C10: real Lie algebra with the source's factor 1/2.
  • controlGenerated: PDF pp.24,32: finite exchange/Z circuits. All real angles give exactly the same gates as [0,2π), since R and Z have integer spectra.
  • xyZGroup: PDF p.32, D8.
  • chargeSectorDet: PDF pp.31–32: determinant of the full physical sector, by identity extension.
  • u1BodyPhase: PDF p.32, D7: l-body phase in ℝ/(2πℤ), including l=0.
  • u1DualCentral: PDF p.33, D11: dual central element; only l≤n is used in theorems.
  • u1FinitePhaseGroup: PDF p.33, D15: integer powers of the prescribed generators.
  • u1PhaseFactor: PDF p.33, D16: principal representatives are chosen before exponentiation.
  • initialString: PDF p.33, D17: one fixed initial string per weight; l=0 is I.
  • stringPhaseFactor: PDF p.33, D17: includes the displayed factor i missing in the preceding prose.
  • lowerBit: PDF pp.35–36: remove the occupied input bit participating in the Bell pair.
  • bellInterference: PDF p.35, E5: the actual Bell-input/interference-outcome probability.
  • restrictedInterference: PDF p.36, E12: probability from the restricted one-exchange circuit.
  • withZero: PDF pp.5,41: ground-state ancilla embedding, in the fixed wire order.
  • Catalyzes: PDF pp.5,41: exact coherent action with the same returned ancilla for all inputs.
  • qubitCatalystControls: PDF p.41: only the ancilla has a single-site Z control.
  • geometricCatalystControls: PDF p.42: chain system edges, with either all ancilla spokes or one endpoint. The endpoint scheme also has ZZ on every chain edge and the ancilla edge.
  • diagonalChainControls: PDF p.28, C34: diagonal controls and adjacent exchanges, with j<n.
  • geometricGroup: PDF p.2: connected-support k-local gates on a specified graph.
  • CompactConnectedMatrixLieGroup: PDF p.14: finite-dimensional embedded matrix Lie structure can be specified by its local exponential chart: small skew-Hermitian logarithms belong precisely to the indicated real Lie algebra. Ambient matrix exponential is a chart near zero.
  • EnergyBasis
  • EMat
  • intrinsicEnergy: PDF p.43, G8–G9: additive intrinsic energy with a strictly positive gap in every theorem that uses energy conservation.
  • lowerLevel: PDF p.44, G10: local adjacent-level lowering; level index l.val+1≥1.
  • energyOnWire: PDF p.44: insert a local matrix on a named qudit.
  • energyExchange: PDF p.44, G10b: energy transfer with no extraneous factor 1/2.
  • ancillaExchange: PDF p.44, G10a: system/ancilla transfer with the same energy gap.
  • ancillaZ: PDF p.44: the sole single-site ancilla control.
  • energyControls: PDF p.44, G12/G15: chain edges j<n, ancilla couplings to every j≤n.
  • energyLie: PDF p.44, G12: the actual generated real Lie algebra.
  • energyDrift: PDF pp.43–46: additive system-plus-ancilla drift, with no energy shift.
  • PulseReachable: PDF p.45, G17–G18: finite piecewise-constant control pulses, including drift. Nonnegative durations and span coefficients are free. A finite list automatically has compact time support; list order is the matrix product order.
  • groundEmbed: PDF p.44, G13: append the exact ground-state ancillary vector.
  • HamiltonianLift: PDF p.44, G13: one Hamiltonian lift acts correctly on the entire ground slice.
  • secondAncillaExchange: PDF p.46, G25: second-ancilla transfer, identity on ancilla a.
  • twoAncillaControls: PDF p.46, G26 corrected using G22–G23/G27: both local ancilla Z controls, and no direct system/system interaction. Printed G26 repeats an a-exchange in place of Z_b; this correction is subject to independent moderation.
  • twoAncillaDrift: PDF p.46, G27: both ancillas have energy gap gap, retaining the drift.
  • energyDiagonalControls: PDF p.49, G52: arbitrary real diagonal controls and adjacent transfers.
  • energyDiagonalMonomial: PDF pp.47–48, G36–G40: each site is I or a nonzero adjacent-level difference. Option.none is I, while Option.some l denotes Z^(l.val+1), never Z^(0).
  • EquispacedLevels: PDF pp.40,43: heterogeneous, possibly degenerate, equally spaced levels. Every integer level 0,...,last j occurs; eigenvectors sharing a level give degeneracy. The offsets are arbitrary and the common positive gap is supplied in the theorem.
  • EquispacedLevels.energy: PDF pp.5–6,40,43: intrinsic energy is additive before and after the protocol.
  • attachEnergy: PDF p.40: the ancilla has gap ΔE and no system/ancilla interaction at endpoints.
  • heterogeneousEnergyGates: PDF p.40, Theorem 14: all two-local energy-conserving gates on the systems and one ancilla, either system/system or a single system with the ancilla.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Gates
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P60
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P49

/-!
Marvian, arXiv:2003.05524v3. PDF pages are used throughout.
Paper-specific definitions are distinguished from unrelated accepted names.
Equivalent accepted matrix, wire-insertion and SWAP definitions are imported. Reachability is finite composition,
without topological closure, ancillary systems, or quotienting out global phases.
Compilation and independent moderation are pending the batch handoff.
-/

noncomputable section

namespace QAlgorithms.Papers.Independent.Extend50.P14

open scoped Classical Matrix ComplexConjugate Matrix.Norms.Frobenius
open MeasureTheory

-- Exact accepted aliases and physical operators, without local redeclarations.
open QAlgorithms.Papers.Independent.Information100.P60 (Mat)
open QAlgorithms.Papers.Independent.Advance50.P49 (onWire multiSwap)

attribute [local instance 100] LieRing.ofAssociativeRing

abbrev SiteBasis {n : ℕ} (D : Fin n → Type*) := (j : Fin n) → D j

/-- PDF pp.1,13: support means an operator on the selected tensor factors,
with the identity on every complementary factor. -/
def TensorSupported {n : ℕ} {D : Fin n → Type*} [∀ j, Fintype (D j)]
    [∀ j, DecidableEq (D j)] (s : Finset (Fin n)) (A : Mat (SiteBasis D)) : Prop :=
  ∃ B : Mat ((j : {j // j ∈ s}) → D j.val), ∀ x y,
    A x y = B (fun j => x j.val) (fun j => y j.val) *
      ∏ j ∈ Finset.univ \ s, if x j = y j then 1 else 0

/-- PDF p.1: a single k-local operator, as opposed to a sum of local terms. -/
def SiteLocal {n : ℕ} {D : Fin n → Type*} [∀ j, Fintype (D j)]
    [∀ j, DecidableEq (D j)] (k : ℕ) (A : Mat (SiteBasis D)) : Prop :=
  ∃ s : Finset (Fin n), s.card ≤ k ∧ TensorSupported s A

/-- PDF p.13, A1–A2: on-site unitary representations, allowing heterogeneous sites. -/
structure OnSite (G : Type*) [Group G] {n : ℕ} (D : Fin n → Type*)
    [∀ j, Fintype (D j)] [∀ j, DecidableEq (D j)] where
  u : (j : Fin n) → G → Mat (D j)
  unitary : ∀ j g, u j g ∈ Matrix.unitaryGroup (D j) ℂ
  one : ∀ j, u j 1 = 1
  mul : ∀ j g h, u j (g * h) = u j g * u j h

/-- PDF p.13, A2: the specified tensor product representation. -/
def OnSite.total {G : Type*} [Group G] {n : ℕ} {D : Fin n → Type*}
    [∀ j, Fintype (D j)] [∀ j, DecidableEq (D j)] (r : OnSite G D)
    (g : G) : Mat (SiteBasis D) := fun x y => ∏ j, r.u j g (x j) (y j)

/-- PDF pp.1,13: the commutant of a representation. -/
def CommutesWithAction {G I : Type*} [Fintype I] (U : G → Mat I) (A : Mat I) : Prop :=
  ∀ g, A * U g = U g * A

/-- PDF p.13, A4: the actual generator set. -/
def localGates {G : Type*} {n : ℕ} {D : Fin n → Type*}
    [∀ j, Fintype (D j)] [∀ j, DecidableEq (D j)]
    (U : G → Mat (SiteBasis D)) (k : ℕ) : Set (Mat (SiteBasis D)) :=
  {V | V ∈ Matrix.unitaryGroup (SiteBasis D) ℂ ∧ CommutesWithAction U V ∧ SiteLocal k V}

/-- PDF p.13, A4: algebraic submonoid closure consists of finite gate products.
The generators contain their inverses, so it is the generated group. -/
def symmetricLocalGroup {G : Type*} {n : ℕ} {D : Fin n → Type*}
    [∀ j, Fintype (D j)] [∀ j, DecidableEq (D j)]
    (U : G → Mat (SiteBasis D)) (k : ℕ) : Submonoid (Mat (SiteBasis D)) :=
  Submonoid.closure (localGates U k)

/-- PDF p.13, A5: real Lie closure, with the ordinary matrix commutator. -/
def symmetricLocalLie {G : Type*} {n : ℕ} {D : Fin n → Type*}
    [∀ j, Fintype (D j)] [∀ j, DecidableEq (D j)]
    (U : G → Mat (SiteBasis D)) (k : ℕ) : LieSubalgebra ℝ (Mat (SiteBasis D)) :=
  LieSubalgebra.lieSpan ℝ (Mat (SiteBasis D))
    {A | A + Aᴴ = 0 ∧ CommutesWithAction U A ∧ SiteLocal k A}

/-- PDF p.2: a sum of local terms need not have individually invariant terms. -/
def localTermSpan {n : ℕ} {D : Fin n → Type*}
    [∀ j, Fintype (D j)] [∀ j, DecidableEq (D j)] (k : ℕ) : Submodule ℂ (Mat (SiteBasis D)) :=
  Submodule.span ℂ {A | SiteLocal k A}

/-- PDF p.13: Schrödinger sign convention. -/
def schrodingerEvolution {I : Type*} [Fintype I] [DecidableEq I] (H : Mat I) (t : ℝ) : Mat I :=
  NormedSpace.exp ((-Complex.I * (t : ℂ)) • H)

/-- PDF pp.14–15,31: entrywise integral Schrödinger equation from I.
Integrability on the closed interval and the integral equation include finite pulses;
unitarity is an invariant of the stipulated physical propagator. -/
def Propagator {I : Type*} [Fintype I] [DecidableEq I]
    (H V : ℝ → Mat I) (T : ℝ) : Prop :=
  0 ≤ T ∧
  (∀ x y, IntegrableOn (fun t => H t x y) (Set.Icc 0 T)) ∧
  (∀ x y, IntegrableOn (fun t => ((-Complex.I) • (H t * V t)) x y) (Set.Icc 0 T)) ∧
  (∀ t ∈ Set.Icc 0 T, (H t).IsHermitian ∧ V t ∈ Matrix.unitaryGroup I ℂ) ∧
  ∀ t ∈ Set.Icc 0 T, ∀ x y,
    V t x y = (1 : Mat I) x y + ∫ s in (0 : ℝ)..t, ((-Complex.I) • (H s * V s)) x y

abbrev QMat (n : ℕ) := Mat (Qubits n)

/-- PDF p.23: Hamming weight. -/
def qubitWeight {n : ℕ} (x : Qubits n) : ℕ :=
  (Finset.univ.filter fun j => x j = true).card

/-- PDF p.23, C2: unnormalized Pauli Z string on a bit mask. -/
def zString {n : ℕ} (b : Qubits n) : QMat n :=
  Matrix.diagonal fun x => ∏ j, if b j ∧ x j then -1 else 1

/-- PDF p.23: full physical charge-sector projector, including the end sectors. -/
def chargeSector (n m : ℕ) : QMat n := Matrix.diagonal fun x => if qubitWeight x = m then 1 else 0

/-- PDF p.23, C2: sum of all Z strings of weight l, with no normalization. -/
def u1Central (n l : ℕ) : QMat n := ∑ b ∈ Finset.univ.filter (fun b => qubitWeight b = l), zString b

/-- PDF p.23, C3: integer Krawtchouk coefficient; the s≤l guard prevents
natural subtraction from counting spurious terms when s>l. -/
def phaseWeight (n l m : ℕ) : ℤ :=
  ∑ s ∈ (Finset.range (m+1)).filter (fun s => s ≤ l),
    (-1 : ℤ)^s * (Nat.choose m s : ℤ) * (Nat.choose (n-m) (l-s) : ℤ)

/-- PDF p.23, C1: total Z; commuting with it is exactly U(1) invariance. -/
def totalZ (n : ℕ) : QMat n := Matrix.diagonal fun x => (n : ℂ) - 2 * (qubitWeight x : ℂ)

/-- PDF p.23: this definition is used for Hermitian and skew-Hermitian operators. -/
def U1Invariant {n : ℕ} (A : QMat n) : Prop := A * totalZ n = totalZ n * A

/-- PDF p.1: a physical U(1)-invariant unitary. -/
def U1Unitary {n : ℕ} (V : QMat n) : Prop :=
  V ∈ Matrix.unitaryGroup (Qubits n) ℂ ∧ U1Invariant V

/-- PDF p.23, C1: all rotations, not one selected group element. -/
def rotations (n : ℕ) (theta : ℝ) : QMat n := schrodingerEvolution (totalZ n) (-theta)

/-- PDF p.24, C7. -/
def u1Lie (n k : ℕ) := symmetricLocalLie (rotations n) k

/-- PDF p.2: finite local symmetric circuits on the actual qubit register. -/
def u1Group (n k : ℕ) := symmetricLocalGroup (rotations n) k

/-- PDF p.26, C23: R=(XX+YY)/2, for distinct sites. -/
def xyExchange {n : ℕ} (a b : Fin n) : QMat n :=
  (1/2 : ℂ) • (onWire a pauliX * onWire b pauliX + onWire a pauliY * onWire b pauliY)

/-- PDF pp.24,32, C9/D8: all exchange and single-site Z Hamiltonians. -/
def exchangeControls (n : ℕ) : Set (QMat n) :=
  {H | (∃ a : Fin n, H = onWire a pauliZ) ∨
    ∃ a b : Fin n, a ≠ b ∧ H = xyExchange a b}

/-- PDF p.24, C10: real Lie algebra with the source's factor 1/2. -/
def xyZLie (n : ℕ) : LieSubalgebra ℝ (QMat n) :=
  LieSubalgebra.lieSpan ℝ (QMat n) ((fun H => Complex.I • H) '' exchangeControls n)

/-- PDF pp.24,32: finite exchange/Z circuits. All real angles give exactly the
same gates as [0,2π), since R and Z have integer spectra. -/
def controlGenerated {I : Type*} [Fintype I] [DecidableEq I] (controls : Set (Mat I)) : Submonoid (Mat I) :=
  Submonoid.closure {V | ∃ H ∈ controls, ∃ theta : ℝ, V = schrodingerEvolution H (-theta)}

/-- PDF p.32, D8. -/
def xyZGroup (n : ℕ) := controlGenerated (exchangeControls n)

/-- PDF pp.31–32: determinant of the full physical sector, by identity extension. -/
def chargeSectorDet {n : ℕ} (V : QMat n) (m : Fin (n+1)) : ℂ :=
  Matrix.det (V * chargeSector n m.val + (1 - chargeSector n m.val))

/-- PDF p.32, D7: l-body phase in ℝ/(2πℤ), including l=0. -/
def u1BodyPhase {n : ℕ} (V : QMat n) (l : ℕ) : Real.Angle :=
  ∑ m : Fin (n+1), phaseWeight n l m.val • ((Complex.arg (chargeSectorDet V m) : ℝ) : Real.Angle)

/-- PDF p.33, D11: dual central element; only l≤n is used in theorems. -/
def u1DualCentral (n l : ℕ) : QMat n :=
  ((2 : ℂ)^n * (Nat.choose n l : ℂ))⁻¹ • u1Central n l

/-- PDF p.33, D15: integer powers of the prescribed generators. -/
def u1FinitePhaseGroup (n : ℕ) : Submonoid (QMat n) :=
  Submonoid.closure {V | ∃ l : Fin (n+1), ∃ z : ℤ,
    V = NormedSpace.exp ((Complex.I * (2*Real.pi : ℝ) * (z : ℂ)) • u1DualCentral n l.val)}

/-- PDF p.33, D16: principal representatives are chosen before exponentiation. -/
def u1PhaseFactor {n : ℕ} (V : QMat n) : QMat n :=
  (List.ofFn fun l : Fin (n+1) =>
    NormedSpace.exp ((Complex.I * ((u1BodyPhase V l.val).toReal : ℂ)) • u1DualCentral n l.val)).prod

/-- PDF p.33, D17: one fixed initial string per weight; l=0 is I. -/
def initialString (n l : ℕ) : QMat n := zString (fun j => decide (j.val < l))

/-- PDF p.33, D17: includes the displayed factor i missing in the preceding prose. -/
def stringPhaseFactor {n : ℕ} (V : QMat n) : QMat n :=
  (List.ofFn fun l : Fin (n+1) => NormedSpace.exp
    ((Complex.I * ((u1BodyPhase V l.val).toReal : ℂ) / (2 : ℂ)^n) • initialString n l.val)).prod

/-- PDF pp.35–36: remove the occupied input bit participating in the Bell pair. -/
def lowerBit {n : ℕ} (x : Qubits n) (r : Fin n) : Qubits n := Function.update x r false

/-- PDF p.35, E5: the actual Bell-input/interference-outcome probability. -/
def bellInterference {n : ℕ} (V : QMat n) (x : Qubits n) (r : Fin n)
    (y z : Qubits n) (theta : ℝ) : ℝ :=
  (1/4 : ℝ) * Complex.normSq (V y x + Complex.exp (-Complex.I * theta) * V z (lowerBit x r))

/-- PDF p.36, E12: probability from the restricted one-exchange circuit. -/
def restrictedInterference (V : QMat 3) (x y : Qubits 3) (r s : Fin 3) (alpha : ℝ) : ℝ :=
  (1/4 : ℝ) * Complex.normSq (V y x + Complex.I * Complex.exp (-2*Complex.I*alpha) *
    V (lowerBit y s) (lowerBit x r))

/-- PDF pp.5,41: ground-state ancilla embedding, in the fixed wire order. -/
def withZero {n : ℕ} (psi : EuclideanSpace ℂ (Qubits n)) : EuclideanSpace ℂ (Qubits (n+1)) :=
  WithLp.toLp 2 fun x => if x (Fin.last n) then 0 else psi (x ∘ Fin.castSucc)

/-- PDF pp.5,41: exact coherent action with the same returned ancilla for all inputs. -/
def Catalyzes {n : ℕ} (W : QMat (n+1)) (V : QMat n) : Prop :=
  ∀ psi : EuclideanSpace ℂ (Qubits n), act W (withZero psi) = withZero (act V psi)

/-- PDF p.41: only the ancilla has a single-site Z control. -/
def qubitCatalystControls (n : ℕ) : Set (QMat (n+1)) :=
  {H | H = onWire (Fin.last n) pauliZ ∨
    ∃ a b : Fin (n+1), a ≠ b ∧ H = xyExchange a b}

/-- PDF p.42: chain system edges, with either all ancilla spokes or one endpoint.
The endpoint scheme also has ZZ on every chain edge and the ancilla edge. -/
def geometricCatalystControls (n : ℕ) (endpoint : Bool) : Set (QMat (n+1)) :=
  {H | H = onWire (Fin.last n) pauliZ ∨
    ∃ a b : Fin (n+1), a ≠ b ∧
      ((a.val < n ∧ b.val < n ∧ a.val + 1 = b.val) ∨
        (b = Fin.last n ∧ a.val < n ∧ (endpoint = true → a.val = 0))) ∧
      (H = xyExchange a b ∨ (endpoint = true ∧ H = onWire a pauliZ * onWire b pauliZ))}

/-- PDF p.28, C34: diagonal controls and adjacent exchanges, with j<n. -/
def diagonalChainControls (n : ℕ) : Set (QMat n) :=
  {H | (H.IsHermitian ∧ Matrix.IsDiag H) ∨
    ∃ a b : Fin n, a.val + 1 = b.val ∧ H = xyExchange a b}

/-- A sanity check on the physical one-qubit conventions. -/
example : zString (fun _ : Fin 1 => true) (fun _ => true) (fun _ => true) = -1 := by
  simp [zString, Matrix.diagonal, Matrix.of_apply]

/-- The binomial sign and the guarded natural subtraction agree at l=0. -/
example : phaseWeight 1 0 1 = 1 := by
  norm_num [phaseWeight, Finset.sum_filter, Finset.sum_range_succ]

/-- The two one-qubit charge weights for Φ₁ have opposite signs. -/
example : phaseWeight 1 1 0 = 1 ∧ phaseWeight 1 1 1 = -1 := by
  norm_num [phaseWeight, Finset.sum_filter, Finset.sum_range_succ]

section General

variable {G : Type*} [Group G] {n : ℕ} {D : Fin n → Type*}
variable [∀ j, Fintype (D j)] [∀ j, DecidableEq (D j)] [hD : ∀ j, Nonempty (D j)]

-- Positive local dimensions are a physical standing assumption even when unused
-- in the displayed formula; include it in each theorem's elaborated binders.
include hD

end General

/-- PDF p.2: connected-support k-local gates on a specified graph. -/
def geometricGroup {G A : Type*} [Fintype A] [DecidableEq A] {n : ℕ}
    (U : G → Mat (Fin n → A)) (graph : SimpleGraph (Fin n)) (k : ℕ) : Submonoid (Mat (Fin n → A)) :=
  Submonoid.closure {V | V ∈ localGates U k ∧ ∃ s : Finset (Fin n),
    s.card ≤ k ∧ TensorSupported s V ∧ (graph.induce (s : Set (Fin n))).Connected}

/-- PDF p.14: finite-dimensional embedded matrix Lie structure can be specified
by its local exponential chart: small skew-Hermitian logarithms belong precisely
to the indicated real Lie algebra. Ambient matrix exponential is a chart near zero. -/
def CompactConnectedMatrixLieGroup {I : Type*} [Fintype I] [DecidableEq I]
    (S : Submonoid (Mat I)) (L : LieSubalgebra ℝ (Mat I)) : Prop :=
  IsCompact (S : Set (Mat I)) ∧ IsConnected (S : Set (Mat I)) ∧
  (∀ V ∈ S, V ∈ Matrix.unitaryGroup I ℂ ∧ Vᴴ ∈ S) ∧
  ∃ epsilon : ℝ, 0 < epsilon ∧ ∀ C : Mat I,
    C + Cᴴ = 0 → ‖C‖ < epsilon → (NormedSpace.exp C ∈ S ↔ C ∈ L)

abbrev EnergyBasis (n d : ℕ) := Fin n → Fin d

abbrev EMat (n d : ℕ) := Mat (EnergyBasis n d)

/-- PDF p.43, G8–G9: additive intrinsic energy with a strictly positive gap
in every theorem that uses energy conservation. -/
def intrinsicEnergy (n d : ℕ) (gap : ℝ) : EMat n d :=
  Matrix.diagonal fun x => ((gap * ∑ j : Fin n, (x j).val : ℝ) : ℂ)

/-- PDF p.44, G10: local adjacent-level lowering; level index l.val+1≥1. -/
def lowerLevel (d : ℕ) (l : Fin (d-1)) : Mat (Fin d) :=
  Matrix.single ⟨l.val, by omega⟩ ⟨l.val+1, by omega⟩ 1

/-- PDF p.44: insert a local matrix on a named qudit. -/
def energyOnWire {n d : ℕ} (j : Fin n) (A : Mat (Fin d)) : EMat n d :=
  fun x y => A (x j) (y j) * ∏ q ∈ Finset.univ.erase j, if x q = y q then 1 else 0

/-- PDF p.44, G10b: energy transfer with no extraneous factor 1/2. -/
def energyExchange {n d : ℕ} (j q : Fin n) (l m : Fin (d-1)) : EMat n d :=
  let A := energyOnWire j (lowerLevel d l) * energyOnWire q (lowerLevel d m)ᴴ
  A + Aᴴ

/-- PDF p.44, G10a: system/ancilla transfer with the same energy gap. -/
def ancillaExchange {n d : ℕ} (j : Fin n) (l : Fin (d-1)) : Mat (EnergyBasis n d × Bool) :=
  let A := Matrix.kronecker (energyOnWire j (lowerLevel d l)) (Matrix.single true false (1 : ℂ))
  A + Aᴴ

/-- PDF p.44: the sole single-site ancilla control. -/
def ancillaZ (n d : ℕ) : Mat (EnergyBasis n d × Bool) :=
  Matrix.kronecker (1 : EMat n d) pauliZ

/-- PDF p.44, G12/G15: chain edges j<n, ancilla couplings to every j≤n. -/
def energyControls (n d : ℕ) : Set (Mat (EnergyBasis n d × Bool)) :=
  {H | H = ancillaZ n d ∨
    (∃ j : Fin n, ∃ l : Fin (d-1), H = ancillaExchange j l) ∨
    ∃ j q : Fin n, j.val+1 = q.val ∧ ∃ l m : Fin (d-1),
      H = Matrix.kronecker (energyExchange j q l m) (1 : Mat Bool)}

/-- PDF p.44, G12: the actual generated real Lie algebra. -/
def energyLie (n d : ℕ) : LieSubalgebra ℝ (Mat (EnergyBasis n d × Bool)) :=
  LieSubalgebra.lieSpan ℝ _ ((fun H => Complex.I • H) '' energyControls n d)

/-- PDF pp.43–46: additive system-plus-ancilla drift, with no energy shift. -/
def energyDrift (n d : ℕ) (gap : ℝ) : Mat (EnergyBasis n d × Bool) :=
  Matrix.kronecker (intrinsicEnergy n d gap) (1 : Mat Bool) +
    Matrix.kronecker (1 : EMat n d) ((gap : ℂ) • Matrix.single true true 1)

/-- PDF p.45, G17–G18: finite piecewise-constant control pulses, including drift.
Nonnegative durations and span coefficients are free. A finite list automatically
has compact time support; list order is the matrix product order. -/
def PulseReachable {I : Type*} [Fintype I] [DecidableEq I]
    (drift : Mat I) (controls : Set (Mat I)) (V : Mat I) : Prop :=
  ∃ pulses : List (ℝ × Mat I),
    (∀ p ∈ pulses, 0 ≤ p.1 ∧ p.2 - drift ∈ Submodule.span ℝ controls) ∧
    (pulses.map fun p => schrodingerEvolution p.2 p.1).prod = V

/-- PDF p.44, G13: append the exact ground-state ancillary vector. -/
def groundEmbed {I : Type*} (psi : EuclideanSpace ℂ I) : EuclideanSpace ℂ (I × Bool) :=
  WithLp.toLp 2 fun x => if x.2 then 0 else psi x.1

/-- PDF p.44, G13: one Hamiltonian lift acts correctly on the entire ground slice. -/
def HamiltonianLift {I : Type*} [Fintype I] (K : Mat (I × Bool)) (H : Mat I) : Prop :=
  ∀ psi : EuclideanSpace ℂ I, act K (groundEmbed psi) = groundEmbed (act H psi)

/-- PDF p.46, G25: second-ancilla transfer, identity on ancilla a. -/
def secondAncillaExchange {n d : ℕ} (j : Fin n) (l : Fin (d-1)) :
    Mat ((EnergyBasis n d × Bool) × Bool) :=
  let A : Mat ((EnergyBasis n d × Bool) × Bool) := fun x y =>
    energyOnWire j (lowerLevel d l) x.1.1 y.1.1 *
      (if x.1.2 = y.1.2 then 1 else 0) * Matrix.single true false (1 : ℂ) x.2 y.2
  A + Aᴴ

/-- PDF p.46, G26 corrected using G22–G23/G27: both local ancilla Z controls,
and no direct system/system interaction. Printed G26 repeats an a-exchange in
place of Z_b; this correction is subject to independent moderation. -/
def twoAncillaControls (n d : ℕ) : Set (Mat ((EnergyBasis n d × Bool) × Bool)) :=
  {H | H = Matrix.kronecker (ancillaZ n d) (1 : Mat Bool) ∨
    H = Matrix.kronecker (1 : Mat (EnergyBasis n d × Bool)) pauliZ ∨
    (∃ j : Fin n, ∃ l : Fin (d-1), H = Matrix.kronecker (ancillaExchange j l) (1 : Mat Bool)) ∨
    ∃ j : Fin n, ∃ l : Fin (d-1), H = secondAncillaExchange j l}

/-- PDF p.46, G27: both ancillas have energy gap gap, retaining the drift. -/
def twoAncillaDrift (n d : ℕ) (gap : ℝ) : Mat ((EnergyBasis n d × Bool) × Bool) :=
  Matrix.kronecker (energyDrift n d gap) (1 : Mat Bool) +
    Matrix.kronecker (1 : Mat (EnergyBasis n d × Bool)) ((gap : ℂ) • Matrix.single true true 1)

/-- PDF p.49, G52: arbitrary real diagonal controls and adjacent transfers. -/
def energyDiagonalControls (n d : ℕ) : Set (EMat n d) :=
  {H | (H.IsHermitian ∧ Matrix.IsDiag H) ∨
    ∃ j q : Fin n, j.val+1 = q.val ∧ ∃ l m : Fin (d-1), H = energyExchange j q l m}

/-- PDF pp.47–48, G36–G40: each site is I or a nonzero adjacent-level difference.
Option.none is I, while Option.some l denotes Z^(l.val+1), never Z^(0). -/
def energyDiagonalMonomial (n d : ℕ) (a : Fin n → Option (Fin (d-1))) : EMat n d :=
  Matrix.diagonal fun x => ∏ j, match a j with
    | none => 1
    | some l => if (x j).val = l.val then 1 else if (x j).val = l.val+1 then -1 else 0

/-- At d=1 the identity monomial still acts on the full one-dimensional register. -/
example (n d : ℕ) : energyDiagonalMonomial n d (fun _ => none) = 1 := by
  ext x y
  simp [energyDiagonalMonomial, Matrix.one_apply]

/-- The ground embedding suppresses the excited ancilla component exactly. -/
example {I : Type*} (psi : EuclideanSpace ℂ I) (x : I) : groundEmbed psi (x, true) = 0 := by rfl

/-- PDF pp.40,43: heterogeneous, possibly degenerate, equally spaced levels.
Every integer level 0,...,last j occurs; eigenvectors sharing a level give degeneracy.
The offsets are arbitrary and the common positive gap is supplied in the theorem. -/
structure EquispacedLevels {n : ℕ} (D : Fin n → Type*) where
  last : Fin n → ℕ
  level : (j : Fin n) → D j → ℕ
  bounded : ∀ j x, level j x ≤ last j
  complete : ∀ j m, m ≤ last j → ∃ x, level j x = m
  offset : Fin n → ℝ

/-- PDF pp.5–6,40,43: intrinsic energy is additive before and after the protocol. -/
def EquispacedLevels.energy {n : ℕ} {D : Fin n → Type*}
    [∀ j, DecidableEq (D j)] (e : EquispacedLevels D) (gap : ℝ) : Mat (SiteBasis D) :=
  Matrix.diagonal fun x => ((∑ j, (e.offset j + gap * (e.level j (x j) : ℝ)) : ℝ) : ℂ)

/-- PDF p.40: the ancilla has gap ΔE and no system/ancilla interaction at endpoints. -/
def attachEnergy {I : Type*} [DecidableEq I] (H : Mat I) (gap : ℝ) : Mat (I × Bool) :=
  Matrix.kronecker H (1 : Mat Bool) +
    Matrix.kronecker (1 : Mat I) ((gap : ℂ) • Matrix.single true true 1)

/-- PDF p.40, Theorem 14: all two-local energy-conserving gates on the systems
and one ancilla, either system/system or a single system with the ancilla. -/
def heterogeneousEnergyGates {n : ℕ} {D : Fin n → Type*}
    [∀ j, Fintype (D j)] [∀ j, DecidableEq (D j)]
    (Htot : Mat (SiteBasis D × Bool)) : Set (Mat (SiteBasis D × Bool)) :=
  {V | V ∈ Matrix.unitaryGroup (SiteBasis D × Bool) ℂ ∧ V*Htot = Htot*V ∧
    ((∃ A : Mat (SiteBasis D), SiteLocal 2 A ∧ V = Matrix.kronecker A (1 : Mat Bool)) ∨
      ∃ j : Fin n, ∃ B : Mat (D j × Bool), ∀ x y,
        V x y = B (x.1 j, x.2) (y.1 j, y.2) *
          ∏ q ∈ Finset.univ.erase j, if x.1 q = y.1 q then 1 else 0)}

end QAlgorithms.Papers.Independent.Extend50.P14

end
Source
Restrictions on realizable unitary operations imposed by symmetry and locality, arXiv:2003.05524v3, https://arxiv.org/abs/2003.05524v3
Read-back

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

QAlgorithms.Papers.Independent.Extend50.P14.Catalyzes

For every natural number nnn, every complex matrix WWW indexed by (n+1)(n+1)(n+1)-bit strings, and every complex matrix VVV indexed by nnn-bit strings, this property means that, for every complex vector ψ\psiψ indexed by nnn-bit strings, Wψ~=Vψ~W\widetilde\psi=\widetilde{V\psi}Wψ​=Vψ​, where matrix action is ordinary matrix-vector multiplication and ψ~(x,b)\widetilde\psi(x,b)ψ​(x,b) equals ψ(x)\psi(x)ψ(x) when the appended bit bbb is false and equals zero when it is true. The quantifier covers all vectors, including zero and unnormalized vectors; neither matrix is assumed unitary. The definition also applies when n=0n=0n=0.

QAlgorithms.Papers.Independent.Extend50.P14.CommutesWithAction

For any types G,IG,IG,I, with III finite, any family U(g)U(g)U(g) of complex matrices indexed by III and labelled by g∈Gg\in Gg∈G, and any complex matrix AAA indexed by III, this predicate means

AU(g)=U(g)Afor every g∈G.AU(g)=U(g)A\qquad\text{for every }g\in G.AU(g)=U(g)Afor every g∈G.

There is no group structure assumed on GGG and no representation, unitarity, or continuity assumption on UUU. If GGG is empty, the condition is vacuous; if III is empty, all the matrix equalities hold automatically.

QAlgorithms.Papers.Independent.Extend50.P14.CompactConnectedMatrixLieGroup

For any finite index type III with decidable equality, any submonoid SSS of complex I×II\times II×I matrices, and any real Lie subalgebra LLL of those matrices, this predicate asserts that SSS is compact and connected in the ambient matrix topology, that every V∈SV\in SV∈S is unitary and has its conjugate transpose V†V^\daggerV† in SSS, and that there exists a real ϵ>0\epsilon>0ϵ>0 such that, for every complex matrix CCC,

C+C†=0,∥C∥<ϵ⟹(eC∈S  ⟺  C∈L).C+C^\dagger=0,\quad \|C\|<\epsilon \quad\Longrightarrow\quad \bigl(e^C\in S\iff C\in L\bigr).C+C†=0,∥C∥<ϵ⟹(eC∈S⟺C∈L).

The norm here is the ambient matrix norm appearing in the declaration. The equivalence is asserted only for skew-Hermitian matrices satisfying the strict norm bound. No nonemptiness assumption on III is made, so the empty index type is included.

QAlgorithms.Papers.Independent.Extend50.P14.EMat

For natural numbers n,dn,dn,d, this abbreviation denotes all complex square matrices indexed by assignments of one label from {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1} to each of nnn sites. For n=0n=0n=0 these are 1×11\times11×1 matrices, including when d=0d=0d=0; for n>0n>0n>0 and d=0d=0d=0 the index set is empty and there is a unique empty matrix.

QAlgorithms.Papers.Independent.Extend50.P14.EnergyBasis

For natural numbers n,dn,dn,d, this abbreviation denotes the set of all assignments x:{0,…,n−1}→{0,…,d−1}x:\{0,\ldots,n-1\}\to\{0,\ldots,d-1\}x:{0,…,n−1}→{0,…,d−1}, so that each of the nnn sites receives one of ddd labels. For n=0n=0n=0 there is exactly one assignment, including when d=0d=0d=0; for n>0n>0n>0 and d=0d=0d=0 there are no assignments.

QAlgorithms.Papers.Independent.Extend50.P14.EquispacedLevels.energy

For any natural number nnn, any family of types DjD_jDj​ indexed by j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, each with decidable equality, let X=∏j=0n−1Dj\mathcal X=\prod_{j=0}^{n-1}D_jX=∏j=0n−1​Dj​. Let eee specify, for each site jjj, a natural number LjL_jLj​, a level function ℓj:Dj→N\ell_j:D_j\to\mathbb Nℓj​:Dj​→N, and a real offset ojo_joj​, with ℓj(a)≤Lj\ell_j(a)\le L_jℓj​(a)≤Lj​ for every a∈Dja\in D_ja∈Dj​ and with every integer from 000 through LjL_jLj​ attained by ℓj\ell_jℓj​. For any real number gap\mathrm{gap}gap, this definition gives the complex matrix indexed by X\mathcal XX whose entries are

Hx,y={∑j=0n−1(oj+gap ℓj(xj)),x=y,0,x≠y.H_{x,y}= \begin{cases} \displaystyle\sum_{j=0}^{n-1}\bigl(o_j+\mathrm{gap}\,\ell_j(x_j)\bigr),&x=y,\\ 0,&x\ne y. \end{cases}Hx,y​=⎩⎨⎧​j=0∑n−1​(oj​+gapℓj​(xj​)),0,​x=y,x=y.​

The real diagonal entries are regarded as complex numbers. The types DjD_jDj​ need not be finite, distinct elements may have the same level, and gap\mathrm{gap}gap may be zero or negative. When n=0n=0n=0, X\mathcal XX has one element and the empty sum gives the zero matrix.

QAlgorithms.Papers.Independent.Extend50.P14.EquispacedLevels

For any natural number nnn and any family of types DjD_jDj​, indexed by 0≤j<n0\le j<n0≤j<n, this structure consists of a natural number LjL_jLj​ for each site, a function λj:Dj→N\lambda_j:D_j\to\mathbb Nλj​:Dj​→N for each site, proofs that λj(x)≤Lj\lambda_j(x)\le L_jλj​(x)≤Lj​ for every jjj and x∈Djx\in D_jx∈Dj​, proofs that for every jjj and natural number m≤Ljm\le L_jm≤Lj​ there exists x∈Djx\in D_jx∈Dj​ with λj(x)=m\lambda_j(x)=mλj​(x)=m, and an arbitrary real offset ojo_joj​ for each site. Thus each level from 000 through LjL_jLj​ occurs, and no larger level occurs; distinct elements may have the same level. No finiteness, decidable-equality, or injectivity assumption is imposed on the types or level functions, and the offsets satisfy no further conditions. When n=0n=0n=0, all site-indexed requirements are vacuous.

QAlgorithms.Papers.Independent.Extend50.P14.HamiltonianLift

For every finite index type III, complex matrix KKK indexed by I×{false,true}I\times\{\mathrm{false},\mathrm{true}\}I×{false,true}, and complex matrix HHH indexed by III, this predicate means that for every vector ψ∈CI\psi\in\mathbb C^Iψ∈CI, including unnormalized and zero vectors,

Kψ~=Hψ~,ψ~(i,false)=ψi,ψ~(i,true)=0.K\widetilde\psi=\widetilde{H\psi}, \qquad \widetilde\psi_{(i,\mathrm{false})}=\psi_i,\quad \widetilde\psi_{(i,\mathrm{true})}=0.Kψ​=Hψ​,ψ​(i,false)​=ψi​,ψ​(i,true)​=0.

Matrix action is ordinary matrix–vector multiplication. Equivalently, K(i,false),(j,false)=HijK_{(i,\mathrm{false}),(j,\mathrm{false})}=H_{ij}K(i,false),(j,false)​=Hij​ and K(i,true),(j,false)=0K_{(i,\mathrm{true}),(j,\mathrm{false})}=0K(i,true),(j,false)​=0 for all i,j∈Ii,j\in Ii,j∈I, with no restrictions on columns having Boolean label true\mathrm{true}true. Neither matrix is assumed Hermitian. The index type may be empty, in which case the condition is vacuous.

QAlgorithms.Papers.Independent.Extend50.P14.OnSite

Given a group GGG, a natural number nnn, and finite types DjD_jDj​ with decidable equality for every j<nj<nj<n, an object of this structure consists of complex matrices uj(g)u_j(g)uj​(g) indexed by DjD_jDj​, for every site jjj and every g∈Gg\in Gg∈G, satisfying

uj(g)∗uj(g)=uj(g)uj(g)∗=I,uj(1G)=I,uj(gh)=uj(g)uj(h)u_j(g)^*u_j(g)=u_j(g)u_j(g)^*=I,\qquad u_j(1_G)=I,\qquad u_j(gh)=u_j(g)u_j(h)uj​(g)∗uj​(g)=uj​(g)uj​(g)∗=I,uj​(1G​)=I,uj​(gh)=uj​(g)uj​(h)

for every j<nj<nj<n and g,h∈Gg,h\in Gg,h∈G, where ∗^*∗ denotes conjugate transpose. Thus each site carries a unitary representation of GGG. No topology or continuity condition on GGG or these representations is specified. There are no site data or conditions when n=0n=0n=0, and the types DjD_jDj​ need not be nonempty.

QAlgorithms.Papers.Independent.Extend50.P14.OnSite.total

For any group GGG, natural number nnn, finite types DjD_jDj​ with decidable equality, and a family rrr of site matrices uj(g)u_j(g)uj​(g) satisfying unitarity, uj(1G)=Iu_j(1_G)=Iuj​(1G​)=I, and uj(gh)=uj(g)uj(h)u_j(gh)=u_j(g)u_j(h)uj​(gh)=uj​(g)uj​(h) for every site and every g,h∈Gg,h\in Gg,h∈G, the total matrix assigned to g∈Gg\in Gg∈G is the complex matrix indexed by X=∏j<nDj\mathcal X=\prod_{j<n}D_jX=∏j<n​Dj​ whose entries are

U(g)x,y=∏j<nuj(g)xj,yj.U(g)_{x,y}=\prod_{j<n}u_j(g)_{x_j,y_j}.U(g)x,y​=j<n∏​uj​(g)xj​,yj​​.

For n=0n=0n=0, the configuration basis has one element and this entry is the empty product 111. If any DjD_jDj​ is empty, the total matrix has an empty index set.

QAlgorithms.Papers.Independent.Extend50.P14.Propagator

For any finite type III with decidable equality, functions H,V:R→CI×IH,V:\mathbb R\to\mathbb C^{I\times I}H,V:R→CI×I, and real number TTT, this predicate requires T≥0T\ge0T≥0; Lebesgue integrability on [0,T][0,T][0,T] of every entry t↦H(t)x,yt\mapsto H(t)_{x,y}t↦H(t)x,y​ and every entry t↦(−iH(t)V(t))x,yt\mapsto(-iH(t)V(t))_{x,y}t↦(−iH(t)V(t))x,y​; Hermiticity of H(t)H(t)H(t) and unitarity of V(t)V(t)V(t) for every t∈[0,T]t\in[0,T]t∈[0,T]; and, for every such ttt and every x,y∈Ix,y\in Ix,y∈I,

V(t)x,y=δx,y+∫0t(−iH(s)V(s))x,y ds,V(t)_{x,y}=\delta_{x,y}+\int_0^t\bigl(-iH(s)V(s)\bigr)_{x,y}\,ds,V(t)x,y​=δx,y​+∫0t​(−iH(s)V(s))x,y​ds,

where δx,y\delta_{x,y}δx,y​ is the identity matrix entry. In particular, V(0)=IV(0)=IV(0)=I. No condition is imposed on HHH or VVV outside [0,T][0,T][0,T]. The case T=0T=0T=0 is included: it requires H(0)H(0)H(0) to be Hermitian and V(0)=IV(0)=IV(0)=I, while the integrability requirements are automatic on the singleton interval. If III is empty, the matrix and entry conditions are automatic, leaving only T≥0T\ge0T≥0.

QAlgorithms.Papers.Independent.Extend50.P14.PulseReachable

For every finite index type III with decidable equality, complex matrices D,VD,VD,V indexed by I×II\times II×I, and set C\mathcal CC of such matrices, this predicate means that there exists a finite ordered list (t1,H1),…,(ts,Hs)(t_1,H_1),\ldots,(t_s,H_s)(t1​,H1​),…,(ts​,Hs​) such that every ta≥0t_a\ge0ta​≥0, every Ha−DH_a-DHa​−D belongs to the real linear span of C\mathcal CC, and

e−it1H1e−it2H2⋯e−itsHs=V.e^{-it_1H_1}e^{-it_2H_2}\cdots e^{-it_sH_s}=V.e−it1​H1​e−it2​H2​⋯e−its​Hs​=V.

The exponentials are matrix exponentials and the product follows the displayed list order. The list may be empty, in which case its product is the identity, and zero durations are allowed. No Hermiticity assumptions are imposed on DDD, the controls, or the pulse matrices, and III may be empty.

QAlgorithms.Papers.Independent.Extend50.P14.QMat

For every natural number nnn, QMat(n)\mathrm{QMat}(n)QMat(n) denotes the space of complex square matrices whose rows and columns are indexed by all Boolean strings x:{0,…,n−1}→{false,true}x:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}x:{0,…,n−1}→{false,true}; thus these are 2n×2n2^n\times2^n2n×2n matrices. This includes n=0n=0n=0, when there is one empty string and the matrices are 1×11\times11×1.

QAlgorithms.Papers.Independent.Extend50.P14.SiteBasis

For any natural number nnn and any family of types (Dj)j=0n−1(D_j)_{j=0}^{n-1}(Dj​)j=0n−1​, the site basis is the set X=∏j=0n−1Dj\mathcal X=\prod_{j=0}^{n-1}D_jX=∏j=0n−1​Dj​ of assignments xxx choosing an element xj∈Djx_j\in D_jxj​∈Dj​ at every site. No finiteness or nonemptiness assumption is imposed on the DjD_jDj​. When n=0n=0n=0, there is exactly one assignment, the empty assignment; if any DjD_jDj​ is empty, there are no assignments.

QAlgorithms.Papers.Independent.Extend50.P14.SiteLocal

For any natural numbers n,kn,kn,k, finite types DjD_jDj​ with decidable equality for every j<nj<nj<n, and a complex matrix AAA indexed by X=∏j<nDj\mathcal X=\prod_{j<n}D_jX=∏j<n​Dj​, this predicate means that there exist a site set s⊆{0,…,n−1}s\subseteq\{0,\ldots,n-1\}s⊆{0,…,n−1} with ∣s∣≤k|s|\le k∣s∣≤k and a complex matrix BBB indexed by ∏j∈sDj\prod_{j\in s}D_j∏j∈s​Dj​ such that

Ax,y=Bx∣s,y∣s∏j∉s1{xj=yj}for every x,y∈X.A_{x,y}=B_{x|_s,y|_s}\prod_{j\notin s}\mathbf 1_{\{x_j=y_j\}} \qquad\text{for every }x,y\in\mathcal X.Ax,y​=Bx∣s​,y∣s​​j∈/s∏​1{xj​=yj​}​for every x,y∈X.

It requires one such support set for AAA, rather than a decomposition into a sum of supported matrices. The case k=0k=0k=0 allows exactly scalar multiples of the identity, and k≥nk\ge nk≥n allows every matrix. The case n=0n=0n=0 is included, with a singleton configuration basis; empty local types are also permitted.

QAlgorithms.Papers.Independent.Extend50.P14.TensorSupported

For any natural number nnn, finite types DjD_jDj​ equipped with decidable equality for every j<nj<nj<n, a set of sites s⊆{0,…,n−1}s\subseteq\{0,\ldots,n-1\}s⊆{0,…,n−1}, and a complex matrix AAA indexed by X=∏j<nDj\mathcal X=\prod_{j<n}D_jX=∏j<n​Dj​, this predicate means that there exists a complex matrix BBB indexed by ∏j∈sDj\prod_{j\in s}D_j∏j∈s​Dj​ such that, for every x,y∈Xx,y\in\mathcal Xx,y∈X,

Ax,y=Bx∣s,y∣s∏j∉s1{xj=yj}.A_{x,y}=B_{x|_s,y|_s}\prod_{j\notin s}\mathbf 1_{\{x_j=y_j\}}.Ax,y​=Bx∣s​,y∣s​​j∈/s∏​1{xj​=yj​}​.

Thus the entries are those of BBB on the selected sites, multiplied by identity matrix entries on all other sites. The matrix BBB has no additional restrictions. Empty products equal 111; in particular, s=∅s=\varnothings=∅ gives precisely scalar multiples of the identity, and choosing every site allows every AAA. The local types may be empty, in which case X\mathcal XX is empty and the universally quantified entry equalities are vacuous.

QAlgorithms.Papers.Independent.Extend50.P14.U1Invariant

For every natural number nnn and every complex matrix AAA indexed by Boolean strings of length nnn, U1Invariant⁡(A)\operatorname{U1Invariant}(A)U1Invariant(A) means precisely AD=DAAD=DAAD=DA, where DDD is diagonal with Dx,x=n−2 #{j:xj=true}D_{x,x}=n-2\,\#\{j:x_j=\mathrm{true}\}Dx,x​=n−2#{j:xj​=true}. No Hermiticity or unitarity condition on AAA is included. When n=0n=0n=0, D=0D=0D=0, so the condition holds for every such AAA.

QAlgorithms.Papers.Independent.Extend50.P14.U1Unitary

For every natural number nnn and every complex matrix VVV indexed by Boolean strings of length nnn, U1Unitary⁡(V)\operatorname{U1Unitary}(V)U1Unitary(V) means that VVV is unitary, so V†V=VV†=IV^\dagger V=VV^\dagger=IV†V=VV†=I, and that VD=DVVD=DVVD=DV, where DDD is diagonal with Dx,x=n−2 #{j:xj=true}D_{x,x}=n-2\,\#\{j:x_j=\mathrm{true}\}Dx,x​=n−2#{j:xj​=true}. For n=0n=0n=0, the commutation condition is automatic, while unitarity still requires the single complex entry of VVV to have modulus 111.

QAlgorithms.Papers.Independent.Extend50.P14.ancillaExchange

For natural numbers n,dn,dn,d, a site j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, and a level 0≤l<d−10\le l<d-10≤l<d−1, this defines a matrix on {0,…,d−1}n×{false,true}\{0,\ldots,d-1\}^n\times\{\mathrm{false},\mathrm{true}\}{0,…,d−1}n×{false,true} by

Lj,l⊗∣true⟩⟨false∣+Lj,l†⊗∣false⟩⟨true∣,L_{j,l}\otimes|\mathrm{true}\rangle\langle\mathrm{false}| + L_{j,l}^\dagger\otimes|\mathrm{false}\rangle\langle\mathrm{true}|,Lj,l​⊗∣true⟩⟨false∣+Lj,l†​⊗∣false⟩⟨true∣,

where Lj,lL_{j,l}Lj,l​ sends a coordinate basis configuration with value l+1l+1l+1 at site jjj to the configuration with that value replaced by lll, annihilates configurations with any other value there, and acts identically on the other sites. There is no permissible site when n=0n=0n=0, and no permissible level when d≤1d\le1d≤1.

QAlgorithms.Papers.Independent.Extend50.P14.ancillaZ

For all natural numbers n,dn,dn,d, this defines I⊗ZI\otimes ZI⊗Z on the complex coordinate space indexed by {0,…,d−1}n×{false,true}\{0,\ldots,d-1\}^n\times\{\mathrm{false},\mathrm{true}\}{0,…,d−1}n×{false,true}, where III is the identity on the configuration register and Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1) in the order false,true\mathrm{false},\mathrm{true}false,true. Equivalently, its entry at (x,b),(y,c)(x,b),(y,c)(x,b),(y,c) is zero unless x=yx=yx=y and b=cb=cb=c, and its diagonal entry is 111 for b=falseb=\mathrm{false}b=false and −1-1−1 for b=trueb=\mathrm{true}b=true. This includes n=0n=0n=0, when there is one configuration, and d=0d=0d=0, when there are no configurations if n>0n>0n>0.

QAlgorithms.Papers.Independent.Extend50.P14.attachEnergy

For any type III with decidable equality, any complex matrix HHH indexed by I×II\times II×I, and any real number gap\mathrm{gap}gap, this definition gives the complex matrix on I×{false,true}I\times\{\mathrm{false},\mathrm{true}\}I×{false,true}

K=H⊗I2+gap II⊗∣true⟩⟨true∣.K=H\otimes I_2+\mathrm{gap}\,I_I\otimes|\mathrm{true}\rangle\langle\mathrm{true}|.K=H⊗I2​+gapII​⊗∣true⟩⟨true∣.

Explicitly, writing δ\deltaδ for the equality indicator,

K(i,b),(j,c)=Hi,jδb,c+gap δi,j 1{b=true, c=true}.K_{(i,b),(j,c)} =H_{i,j}\delta_{b,c} +\mathrm{gap}\,\delta_{i,j}\, \mathbf 1_{\{b=\mathrm{true},\,c=\mathrm{true}\}}.K(i,b),(j,c)​=Hi,j​δb,c​+gapδi,j​1{b=true,c=true}​.

No finiteness or nonemptiness assumption is imposed on III, no Hermiticity assumption is imposed on HHH, and gap\mathrm{gap}gap is unrestricted.

QAlgorithms.Papers.Independent.Extend50.P14.bellInterference

For every natural number nnn, every complex matrix VVV whose rows and columns are indexed by nnn-bit strings, all nnn-bit strings x,y,zx,y,zx,y,z, every index r<nr<nr<n, and every real number θ\thetaθ, this defines the real number

14∣Vy,x+e−iθVz,xr←0∣2,\frac14\left|V_{y,x}+e^{-i\theta}V_{z,x^{r\leftarrow0}}\right|^2,41​​Vy,x​+e−iθVz,xr←0​​2,

where xr←0x^{r\leftarrow0}xr←0 agrees with xxx except that its bit at rrr is false, and ∣⋅∣2|\cdot|^2∣⋅∣2 is the squared complex modulus. No unitarity assumption on VVV, distinctness assumption on the strings, or requirement that xrx_rxr​ be true is imposed. For n=0n=0n=0, there is no admissible rrr.

QAlgorithms.Papers.Independent.Extend50.P14.chargeSector

For any natural numbers n,mn,mn,m, chargeSector⁡(n,m)\operatorname{chargeSector}(n,m)chargeSector(n,m) is the complex diagonal matrix indexed by Boolean strings of length nnn, whose entry at (x,x)(x,x)(x,x) is 111 if exactly mmm coordinates of xxx are true, and 000 otherwise. All off-diagonal entries are zero. No restriction m≤nm\le nm≤n is imposed; if m>nm>nm>n, the matrix is zero. For n=0n=0n=0, it is the 1×11\times11×1 identity when m=0m=0m=0, and zero otherwise.

QAlgorithms.Papers.Independent.Extend50.P14.chargeSectorDet

For every natural number nnn, every complex matrix VVV indexed by nnn-bit strings, and every integer m∈{0,…,n}m\in\{0,\ldots,n\}m∈{0,…,n}, this defines

Dm(V)=det⁡(VPm+I−Pm),(Pm)xy=δxy 1{∣x∣=m},D_m(V)=\det(VP_m+I-P_m), \qquad (P_m)_{xy}=\delta_{xy}\,\mathbf1_{\{|x|=m\}},Dm​(V)=det(VPm​+I−Pm​),(Pm​)xy​=δxy​1{∣x∣=m}​,

where ∣x∣|x|∣x∣ is the number of true bits in xxx. No unitarity or commutation assumption is imposed on VVV, and the determinant may be zero. For n=0n=0n=0, the bit-string index set is a singleton, m=0m=0m=0, and P0=IP_0=IP0​=I.

QAlgorithms.Papers.Independent.Extend50.P14.controlGenerated

For every finite index type III equipped with decidable equality and every set C\mathcal CC of complex I×II\times II×I matrices, this defines the smallest multiplicative submonoid containing

{exp⁡(iθH):H∈C, θ∈R}.\{\exp(i\theta H):H\in\mathcal C,\ \theta\in\mathbb R\}.{exp(iθH):H∈C, θ∈R}.

Indeed, the evolution used in the definition is exp⁡(−itH)\exp(-itH)exp(−itH), evaluated at t=−θt=-\thetat=−θ. Membership therefore means being a finite product of such exponentials, including the empty product, which is the identity; no topological closure is taken. There is no assumption that the controls are Hermitian. The definition includes empty III and empty C\mathcal CC; an empty control set generates only the identity.

QAlgorithms.Papers.Independent.Extend50.P14.diagonalChainControls

For every natural number nnn, this defines the set of all complex matrices on nnn qubits that either are Hermitian and diagonal, or equal 12(XaXb+YaYb)\tfrac12(X_aX_b+Y_aY_b)21​(Xa​Xb​+Ya​Yb​) for indices a,b<na,b<na,b<n with a+1=ba+1=ba+1=b. Here X=(0110)X=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)X=(01​10​) and Y=(0−ii0)Y=\left(\begin{smallmatrix}0&-i\\i&0\end{smallmatrix}\right)Y=(0i​−i0​), in the order false, true, and Xj,YjX_j,Y_jXj​,Yj​ act on bit jjj and as the identity on the other bits. The first alternative allows arbitrary real diagonal entries. When n=0n=0n=0, there are no adjacent indices, and the set consists of all Hermitian matrices on the one-dimensional space indexed by the empty bit string.

QAlgorithms.Papers.Independent.Extend50.P14.energyControls

For all natural numbers n,dn,dn,d, this defines the set of complex matrices on {0,…,d−1}n×{false,true}\{0,\ldots,d-1\}^n\times\{\mathrm{false},\mathrm{true}\}{0,…,d−1}n×{false,true} consisting exactly of

I⊗Z,Lj,l⊗∣true⟩⟨false∣+Lj,l†⊗∣false⟩⟨true∣,(Lj,lLq,m†+Lq,mLj,l†)⊗I2.I\otimes Z,\qquad L_{j,l}\otimes|\mathrm{true}\rangle\langle\mathrm{false}| +L_{j,l}^\dagger\otimes|\mathrm{false}\rangle\langle\mathrm{true}|, \qquad \bigl(L_{j,l}L_{q,m}^\dagger+L_{q,m}L_{j,l}^\dagger\bigr)\otimes I_2.I⊗Z,Lj,l​⊗∣true⟩⟨false∣+Lj,l†​⊗∣false⟩⟨true∣,(Lj,l​Lq,m†​+Lq,m​Lj,l†​)⊗I2​.

Here Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1) in Boolean order false,true\mathrm{false},\mathrm{true}false,true; Lj,lL_{j,l}Lj,l​ is the matrix unit ∣l⟩⟨l+1∣|l\rangle\langle l+1|∣l⟩⟨l+1∣ on site jjj, tensored with identities on all other sites. The second family ranges over all sites j<nj<nj<n and levels l<d−1l<d-1l<d−1; the third ranges over sites satisfying j+1=q<nj+1=q<nj+1=q<n and independently chosen levels l,m<d−1l,m<d-1l,m<d−1. There is no requirement that l=ml=ml=m. Subtraction in d−1d-1d−1 is truncated at zero, so when n=0n=0n=0 or d≤1d\le1d≤1, only I⊗ZI\otimes ZI⊗Z remains.

QAlgorithms.Papers.Independent.Extend50.P14.energyDiagonalControls

For natural numbers n,dn,dn,d, let B={0,…,d−1}n\mathcal B=\{0,\ldots,d-1\}^{n}B={0,…,d−1}n. For a site j<nj<nj<n and an index ℓ<d−1\ell<d-1ℓ<d−1, define

Lj,ℓ(x,y)=1xj=ℓ1yj=ℓ+1∏r≠j1xr=yr.L_{j,\ell}(x,y)= \mathbf1_{x_j=\ell}\mathbf1_{y_j=\ell+1} \prod_{r\ne j}\mathbf1_{x_r=y_r}.Lj,ℓ​(x,y)=1xj​=ℓ​1yj​=ℓ+1​r=j∏​1xr​=yr​​.

The defined set of complex matrices on B\mathcal BB contains exactly all Hermitian diagonal matrices, together with every matrix

Lj,ℓLq,m†+(Lj,ℓLq,m†)†L_{j,\ell}L_{q,m}^{\dagger} +\bigl(L_{j,\ell}L_{q,m}^{\dagger}\bigr)^{\dagger}Lj,ℓ​Lq,m†​+(Lj,ℓ​Lq,m†​)†

for sites j,q<nj,q<nj,q<n satisfying j+1=qj+1=qj+1=q and indices ℓ,m<d−1\ell,m<d-1ℓ,m<d−1. The diagonal entries in the first class may be arbitrary real numbers. The subtraction d−1d-1d−1 is truncated at zero, so the second class is absent when d≤1d\le1d≤1, and it is also absent when n≤1n\le1n≤1. The definition includes n=0n=0n=0 and d=0d=0d=0, with B\mathcal BB the singleton empty configuration when n=0n=0n=0, and empty when d=0<nd=0<nd=0<n.

QAlgorithms.Papers.Independent.Extend50.P14.energyDiagonalMonomial

For natural numbers n,dn,dn,d, let B={0,…,d−1}n\mathcal B=\{0,\ldots,d-1\}^{n}B={0,…,d−1}n, and let aaa assign to each site j<nj<nj<n either no index or an index ℓ<d−1\ell<d-1ℓ<d−1, where d−1d-1d−1 is truncated natural-number subtraction. The defined complex matrix is diagonal:

Ma(x,y)={∏j=0n−1faj(xj),x=y,0,x≠y,fnone(r)=1,fℓ(r)={1,r=ℓ,−1,r=ℓ+1,0,otherwise.M_a(x,y)= \begin{cases} \displaystyle\prod_{j=0}^{n-1}f_{a_j}(x_j),&x=y,\\ 0,&x\ne y, \end{cases} \qquad f_{\mathrm{none}}(r)=1,\qquad f_{\ell}(r)= \begin{cases} 1,&r=\ell,\\ -1,&r=\ell+1,\\ 0,&\text{otherwise}. \end{cases}Ma​(x,y)=⎩⎨⎧​j=0∏n−1​faj​​(xj​),0,​x=y,x=y,​fnone​(r)=1,fℓ​(r)=⎩⎨⎧​1,−1,0,​r=ℓ,r=ℓ+1,otherwise.​

No requirement is imposed that any site carry an index; the assignment with no indices gives the identity matrix. For n=0n=0n=0, the empty product is 111. For d≤1d\le1d≤1, no site can carry an index; if d=0<nd=0<nd=0<n, the matrix has no entries.

QAlgorithms.Papers.Independent.Extend50.P14.energyDrift

For all natural numbers n,dn,dn,d and every real number gap\mathrm{gap}gap, this defines the diagonal complex matrix on {0,…,d−1}n×{false,true}\{0,\ldots,d-1\}^n\times\{\mathrm{false},\mathrm{true}\}{0,…,d−1}n×{false,true} whose diagonal entry at (x,b)(x,b)(x,b) is

gap(∑j=0n−1xj+1b=true),\mathrm{gap}\left(\sum_{j=0}^{n-1}x_j+\mathbf 1_{b=\mathrm{true}}\right),gap(j=0∑n−1​xj​+1b=true​),

and whose off-diagonal entries are zero. No positivity or nonzero assumption is imposed on gap\mathrm{gap}gap. The empty sum is zero, so for n=0n=0n=0 the two diagonal entries are 000 and gap\mathrm{gap}gap; for d=0d=0d=0 and n>0n>0n>0, the indexing set is empty.

QAlgorithms.Papers.Independent.Extend50.P14.energyExchange

For natural numbers n,dn,dn,d, sites j,q∈{0,…,n−1}j,q\in\{0,\ldots,n-1\}j,q∈{0,…,n−1}, and levels 0≤l,m<d−10\le l,m<d-10≤l,m<d−1, this defines the matrix A+A†A+A^\daggerA+A† on configurations in {0,…,d−1}n\{0,\ldots,d-1\}^n{0,…,d−1}n, where

A=Lj,lLq,m†,(Lj,l)x,y=1xj=l1yj=l+1∏a≠j1xa=ya.A=L_{j,l}L_{q,m}^\dagger,\qquad (L_{j,l})_{x,y} =\mathbf 1_{x_j=l}\mathbf 1_{y_j=l+1} \prod_{a\ne j}\mathbf 1_{x_a=y_a}.A=Lj,l​Lq,m†​,(Lj,l​)x,y​=1xj​=l​1yj​=l+1​a=j∏​1xa​=ya​​.

The dagger denotes conjugate transpose. There is no requirement that j≠qj\ne qj=q, that the sites be adjacent, or that l=ml=ml=m. No such arguments exist when n=0n=0n=0 or d≤1d\le1d≤1.

QAlgorithms.Papers.Independent.Extend50.P14.energyLie

For all natural numbers n,dn,dn,d, this defines the smallest real Lie subalgebra of complex matrices on {0,…,d−1}n×{false,true}\{0,\ldots,d-1\}^n\times\{\mathrm{false},\mathrm{true}\}{0,…,d−1}n×{false,true} containing iHiHiH for every matrix HHH in the following set:

I⊗Z,Lj,l⊗∣true⟩⟨false∣+Lj,l†⊗∣false⟩⟨true∣,(Lj,lLq,m†+Lq,mLj,l†)⊗I2.I\otimes Z,\qquad L_{j,l}\otimes|\mathrm{true}\rangle\langle\mathrm{false}| +L_{j,l}^\dagger\otimes|\mathrm{false}\rangle\langle\mathrm{true}|, \qquad \bigl(L_{j,l}L_{q,m}^\dagger+L_{q,m}L_{j,l}^\dagger\bigr)\otimes I_2.I⊗Z,Lj,l​⊗∣true⟩⟨false∣+Lj,l†​⊗∣false⟩⟨true∣,(Lj,l​Lq,m†​+Lq,m​Lj,l†​)⊗I2​.

Here Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1) in Boolean order, and Lj,lL_{j,l}Lj,l​ applies ∣l⟩⟨l+1∣|l\rangle\langle l+1|∣l⟩⟨l+1∣ at site jjj and identities elsewhere. The second family ranges over j<nj<nj<n and l<d−1l<d-1l<d−1; the third over j+1=q<nj+1=q<nj+1=q<n and l,m<d−1l,m<d-1l,m<d−1, with natural subtraction truncated at zero. The Lie bracket is [A,B]=AB−BA[A,B]=AB-BA[A,B]=AB−BA: the resulting algebra consists of finite real linear combinations of these generators and their iterated commutators, including zero, without any topological closure. If n=0n=0n=0 or d≤1d\le1d≤1, the only listed generator is i(I⊗Z)i(I\otimes Z)i(I⊗Z).

QAlgorithms.Papers.Independent.Extend50.P14.energyOnWire

For natural numbers n,dn,dn,d, a site j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, and any complex d×dd\times dd×d matrix AAA, this defines a complex matrix indexed by configurations x,y:{0,…,n−1}→{0,…,d−1}x,y:\{0,\ldots,n-1\}\to\{0,\ldots,d-1\}x,y:{0,…,n−1}→{0,…,d−1}, with entries

Axj,yj∏0≤q<nq≠j1xq=yq.A_{x_j,y_j}\prod_{\substack{0\le q<n\\q\ne j}}\mathbf 1_{x_q=y_q}.Axj​,yj​​0≤q<nq=j​∏​1xq​=yq​​.

Here 1P\mathbf 1_P1P​ is 111 when PPP holds and 000 otherwise, and an empty product equals 111. The matrix therefore applies AAA on site jjj and the identity on every other site. No Hermiticity or unitarity assumption is imposed on AAA. When n=0n=0n=0, there is no permissible site jjj.

QAlgorithms.Papers.Independent.Extend50.P14.exchangeControls

For every natural number nnn, this defines the set of complex matrices on nnn-bit strings consisting exactly of all ZaZ_aZa​, for 0≤a<n0\le a<n0≤a<n, together with all 12(XaXb+YaYb)\frac12(X_aX_b+Y_aY_b)21​(Xa​Xb​+Ya​Yb​), for distinct a,b∈{0,…,n−1}a,b\in\{0,\ldots,n-1\}a,b∈{0,…,n−1}. Here

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

and MaM_aMa​ has entries Mxa,ya∏q≠aδxq,yqM_{x_a,y_a}\prod_{q\ne a}\delta_{x_q,y_q}Mxa​,ya​​∏q=a​δxq​,yq​​. This set is empty when n=0n=0n=0; when n=1n=1n=1, it consists only of Z0Z_0Z0​.

QAlgorithms.Papers.Independent.Extend50.P14.geometricCatalystControls

For every natural number nnn and Boolean parameter endpoint\mathrm{endpoint}endpoint, this defines a set of matrices on n+1n+1n+1 qubits containing ZnZ_nZn​, together with the following matrices: for any distinct indices a,b∈{0,…,n}a,b\in\{0,\ldots,n\}a,b∈{0,…,n} satisfying either a<na<na<n, b<nb<nb<n, and a+1=ba+1=ba+1=b, or b=nb=nb=n, a<na<na<n, and endpoint=true⇒a=0\mathrm{endpoint}=\mathrm{true}\Rightarrow a=0endpoint=true⇒a=0, it contains 12(XaXb+YaYb)\tfrac12(X_aX_b+Y_aY_b)21​(Xa​Xb​+Ya​Yb​), and it also contains ZaZbZ_aZ_bZa​Zb​ if endpoint=true\mathrm{endpoint}=\mathrm{true}endpoint=true. Here the single-bit matrices are X=(0110)X=\left(\begin{smallmatrix}0&1\\1&0\end{smallmatrix}\right)X=(01​10​), Y=(0−ii0)Y=\left(\begin{smallmatrix}0&-i\\i&0\end{smallmatrix}\right)Y=(0i​−i0​), and Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1), in the order false, true; a subscript indicates action on that bit and identity on every other bit. Thus the condition restricting aaa to 000 on an edge to bit nnn applies only when the Boolean parameter is true; the ZaZbZ_aZ_bZa​Zb​ option then applies to every pair satisfying the stated geometric condition. When n=0n=0n=0, only Z0Z_0Z0​ occurs.

QAlgorithms.Papers.Independent.Extend50.P14.geometricGroup

For any type GGG, any finite type AAA with decidable equality, any natural numbers n,kn,kn,k, any family UgU_gUg​ of complex matrices indexed by configurations x:{0,…,n−1}→Ax:\{0,\ldots,n-1\}\to Ax:{0,…,n−1}→A, and any simple graph on the nnn sites, this definition gives the smallest multiplicatively closed set containing the identity and every matrix VVV with the following properties: VVV is unitary; VUg=UgVVU_g=U_gVVUg​=Ug​V for every g∈Gg\in Gg∈G; and there is a subset sss of at most kkk sites whose induced graph is connected and a complex matrix BBB indexed by assignments on sss such that

Vxy=Bx∣s,y∣s∏j∉s1xj=yjfor all configurations x,y.V_{xy}=B_{x|_s,y|_s}\prod_{j\notin s}\mathbf1_{x_j=y_j} \quad\text{for all configurations }x,y.Vxy​=Bx∣s​,y∣s​​j∈/s∏​1xj​=yj​​for all configurations x,y.

Thus membership means being a finite product of such matrices, including the empty product; no topological closure is taken. The definition requires no group structure on GGG, no representation laws for UUU, and no nonemptiness assumption on AAA, and it includes n=0n=0n=0 and k=0k=0k=0; a connected induced graph must be nonempty.

QAlgorithms.Papers.Independent.Extend50.P14.groundEmbed

For any index type III and any complex coordinate vector ψ\psiψ indexed by III, this defines the vector indexed by I×{false,true}I\times\{\mathrm{false},\mathrm{true}\}I×{false,true} whose coordinate at (i,false)(i,\mathrm{false})(i,false) is ψi\psi_iψi​ and whose coordinate at (i,true)(i,\mathrm{true})(i,true) is zero. No finiteness, decidable-equality, nonemptiness, or normalization assumption is imposed on III or ψ\psiψ.

QAlgorithms.Papers.Independent.Extend50.P14.heterogeneousEnergyGates

For any natural number nnn, any family of finite types DjD_jDj​, each with decidable equality, put X=∏j=0n−1Dj\mathcal X=\prod_{j=0}^{n-1}D_jX=∏j=0n−1​Dj​, and let HtotH_{\mathrm{tot}}Htot​ be any complex matrix on X×{false,true}\mathcal X\times\{\mathrm{false},\mathrm{true}\}X×{false,true}. This definition gives the set of all unitary matrices VVV on that index set satisfying VHtot=HtotVVH_{\mathrm{tot}}=H_{\mathrm{tot}}VVHtot​=Htot​V and at least one of the following two conditions: either there exist a matrix AAA on X\mathcal XX, a set of sites sss with ∣s∣≤2|s|\le2∣s∣≤2, and a matrix CCC indexed by ∏j∈sDj\prod_{j\in s}D_j∏j∈s​Dj​, such that

V=A⊗I2,Ax,y=Cx∣s,y∣s∏q∉sδxq,yqfor every x,y∈X;V=A\otimes I_2, \qquad A_{x,y}=C_{x|_s,y|_s}\prod_{q\notin s}\delta_{x_q,y_q} \quad\text{for every }x,y\in\mathcal X;V=A⊗I2​,Ax,y​=Cx∣s​,y∣s​​q∈/s∏​δxq​,yq​​for every x,y∈X;

or there exist a site j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1} and a matrix BBB on Dj×{false,true}D_j\times\{\mathrm{false},\mathrm{true}\}Dj​×{false,true} such that

V(x,b),(y,c)=B(xj,b),(yj,c)∏q≠jδxq,yqfor every x,y∈X and b,c∈{false,true}.V_{(x,b),(y,c)} =B_{(x_j,b),(y_j,c)} \prod_{q\ne j}\delta_{x_q,y_q} \quad\text{for every }x,y\in\mathcal X \text{ and }b,c\in\{\mathrm{false},\mathrm{true}\}.V(x,b),(y,c)​=B(xj​,b),(yj​,c)​q=j∏​δxq​,yq​​for every x,y∈X and b,c∈{false,true}.

Here δ\deltaδ is the equality indicator and an empty product is 111. The two alternatives need not be exclusive. The definition does not require HtotH_{\mathrm{tot}}Htot​ to be Hermitian or to arise from an energy construction. Empty site types are allowed; n=0n=0n=0 is also allowed, in which case the second alternative has no possible site jjj.

QAlgorithms.Papers.Independent.Extend50.P14.initialString

For every pair of natural numbers n,ln,ln,l, this defines the diagonal complex matrix on nnn-bit strings whose diagonal entry at xxx is

(−1)∣{j:0≤j<n, j<l, xj=true}∣.(-1)^{|\{j:0\le j<n,\ j<l,\ x_j=\mathrm{true}\}|}.(−1)∣{j:0≤j<n, j<l, xj​=true}∣.

All off-diagonal entries are zero. Equivalently, it places Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1) on the first min⁡(l,n)\min(l,n)min(l,n) wires and the identity on the remaining wires. For l=0l=0l=0, or for n=0n=0n=0, it is the identity; for l≥nl\ge nl≥n, every wire contributes a ZZZ factor.

QAlgorithms.Papers.Independent.Extend50.P14.intrinsicEnergy

For any natural numbers n,dn,dn,d and any real number gap\mathrm{gap}gap, this definition gives the complex diagonal matrix indexed by assignments x:{0,…,n−1}→{0,…,d−1}x:\{0,\ldots,n-1\}\to\{0,\ldots,d-1\}x:{0,…,n−1}→{0,…,d−1} with entries

Hxy={gap∑j=0n−1xj,x=y,0,x≠y,H_{xy}= \begin{cases} \mathrm{gap}\displaystyle\sum_{j=0}^{n-1}x_j,&x=y,\\ 0,&x\ne y, \end{cases}Hxy​=⎩⎨⎧​gapj=0∑n−1​xj​,0,​x=y,x=y,​

where each label xjx_jxj​ is interpreted as its natural-number value and the diagonal value is embedded into C\mathbb CC. The parameter gap\mathrm{gap}gap may be positive, zero, or negative. For n=0n=0n=0 the result is the 1×11\times11×1 zero matrix; for n>0,d=0n>0,d=0n>0,d=0 it is the empty matrix; and for d=1d=1d=1 it is zero.

QAlgorithms.Papers.Independent.Extend50.P14.localGates

For any type GGG, natural numbers n,kn,kn,k, finite types DjD_jDj​ with decidable equality for every j<nj<nj<n, and arbitrary family U(g)U(g)U(g) of complex matrices indexed by X=∏j<nDj\mathcal X=\prod_{j<n}D_jX=∏j<n​Dj​, this is the set of matrices VVV satisfying all three conditions: VVV is unitary; VU(g)=U(g)VVU(g)=U(g)VVU(g)=U(g)V for every g∈Gg\in Gg∈G; and there exist s⊆{0,…,n−1}s\subseteq\{0,\ldots,n-1\}s⊆{0,…,n−1} with ∣s∣≤k|s|\le k∣s∣≤k and a complex matrix BBB indexed by ∏j∈sDj\prod_{j\in s}D_j∏j∈s​Dj​ such that

Vx,y=Bx∣s,y∣s∏j∉s1{xj=yj}(x,y∈X).V_{x,y}=B_{x|_s,y|_s}\prod_{j\notin s}\mathbf 1_{\{x_j=y_j\}} \qquad(x,y\in\mathcal X).Vx,y​=Bx∣s​,y∣s​​j∈/s∏​1{xj​=yj​}​(x,y∈X).

No group structure on GGG or representation property of UUU is assumed. Empty supports are allowed, so for k=0k=0k=0 these are unitary scalar multiples of the identity. The definitions also include n=0n=0n=0 and empty local types.

QAlgorithms.Papers.Independent.Extend50.P14.localTermSpan

For any natural numbers n,kn,kn,k and finite types DjD_jDj​ with decidable equality, this is the complex linear span of all matrices AAA on X=∏j<nDj\mathcal X=\prod_{j<n}D_jX=∏j<n​Dj​ for which some site set sss with ∣s∣≤k|s|\le k∣s∣≤k and some complex matrix BBB satisfy

Ax,y=Bx∣s,y∣s∏j∉s1{xj=yj}(x,y∈X).A_{x,y}=B_{x|_s,y|_s}\prod_{j\notin s}\mathbf 1_{\{x_j=y_j\}} \qquad(x,y\in\mathcal X).Ax,y​=Bx∣s​,y∣s​​j∈/s∏​1{xj​=yj​}​(x,y∈X).

Its elements are finite complex linear combinations of such matrices, with possibly different support sets for different summands. There is no Hermiticity, symmetry, or unitarity requirement. Empty supports are allowed; for k=0k=0k=0 the span is the scalar multiples of the identity, and for k≥nk\ge nk≥n it is the whole matrix space. The cases n=0n=0n=0 and empty local types are included.

QAlgorithms.Papers.Independent.Extend50.P14.lowerBit

For every natural number nnn, every bit string x:{0,…,n−1}→{false,true}x:\{0,\ldots,n-1\}\to\{\mathrm{false},\mathrm{true}\}x:{0,…,n−1}→{false,true}, and every index r<nr<nr<n, this defines the bit string xr←0x^{r\leftarrow0}xr←0 by (xr←0)r=false(x^{r\leftarrow0})_r=\mathrm{false}(xr←0)r​=false and (xr←0)j=xj(x^{r\leftarrow0})_j=x_j(xr←0)j​=xj​ for j≠rj\ne rj=r. There is no requirement that xrx_rxr​ was true. When n=0n=0n=0, there is no possible index rrr.

QAlgorithms.Papers.Independent.Extend50.P14.lowerLevel

For every natural number ddd and every integer lll with 0≤l<d−10\le l<d-10≤l<d−1, where natural-number subtraction is truncated at zero, this defines the complex d×dd\times dd×d matrix LlL_lLl​ whose entry in row lll, column l+1l+1l+1 is 111 and whose other entries are zero. Thus Llel+1=elL_l e_{l+1}=e_lLl​el+1​=el​ and Lles=0L_l e_s=0Ll​es​=0 for s≠l+1s\ne l+1s=l+1, where ese_ses​ denotes the coordinate basis vector. For d=0d=0d=0 or d=1d=1d=1, there is no permissible argument lll.

QAlgorithms.Papers.Independent.Extend50.P14.phaseWeight

For any natural numbers n,l,mn,l,mn,l,m, the integer phaseWeight⁡(n,l,m)\operatorname{phaseWeight}(n,l,m)phaseWeight(n,l,m) is

∑s=0min⁡(m,l)(−1)s(ms)(max⁡(n−m,0)l−s).\sum_{s=0}^{\min(m,l)} (-1)^s\binom{m}{s}\binom{\max(n-m,0)}{l-s}.s=0∑min(m,l)​(−1)s(sm​)(l−smax(n−m,0)​).

The binomial coefficients are computed as natural numbers and then regarded as integers. There are no assumptions m≤nm\le nm≤n or l≤nl\le nl≤n; in particular, the subtraction n−mn-mn−m is truncated at zero. The sum always includes s=0s=0s=0, including when m=0m=0m=0 or l=0l=0l=0.

QAlgorithms.Papers.Independent.Extend50.P14.qubitCatalystControls

For every natural number nnn, this defines a set of complex matrices on n+1n+1n+1 qubits consisting exactly of ZnZ_nZn​ and the matrices 12(XaXb+YaYb)\tfrac12(X_aX_b+Y_aY_b)21​(Xa​Xb​+Ya​Yb​) for distinct indices a,b∈{0,…,n}a,b\in\{0,\ldots,n\}a,b∈{0,…,n}. Here Xj,Yj,ZjX_j,Y_j,Z_jXj​,Yj​,Zj​ act on bit jjj by, respectively,

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

in the order false, true, and act as the identity on all other bits: their matrix entry at strings x,yx,yx,y is the corresponding single-bit entry times ∏q≠j1xq=yq\prod_{q\ne j}\mathbf1_{x_q=y_q}∏q=j​1xq​=yq​​. When n=0n=0n=0, the set consists only of Z0Z_0Z0​.

QAlgorithms.Papers.Independent.Extend50.P14.qubitWeight

For every natural number nnn and every Boolean string xxx of length nnn, qubitWeight⁡(x)\operatorname{qubitWeight}(x)qubitWeight(x) is the number of indices j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1} for which xj=truex_j=\mathrm{true}xj​=true. For the empty string, this number is 000.

QAlgorithms.Papers.Independent.Extend50.P14.restrictedInterference

For every complex matrix VVV indexed by three-bit strings, all three-bit strings x,yx,yx,y, all indices r,s∈{0,1,2}r,s\in\{0,1,2\}r,s∈{0,1,2}, and every real number α\alphaα, this defines

14∣Vy,x+ie−2iαVys←0,xr←0∣2,\frac14\left|V_{y,x}+i e^{-2i\alpha}V_{y^{s\leftarrow0},x^{r\leftarrow0}}\right|^2,41​​Vy,x​+ie−2iαVys←0,xr←0​​2,

where replacing a bit by 000 means setting it to false and leaving the other bits unchanged. The indices r,sr,sr,s may coincide, either replaced bit may already be false, and VVV need not be unitary.

QAlgorithms.Papers.Independent.Extend50.P14.rotations

For every natural number nnn and every real number θ\thetaθ, rotations⁡(n,θ)\operatorname{rotations}(n,\theta)rotations(n,θ) is the matrix exponential

exp⁡(iθD),Dx,y={n−2 #{j:xj=true},x=y,0,x≠y,\exp(i\theta D), \qquad D_{x,y}= \begin{cases} n-2\,\#\{j:x_j=\mathrm{true}\},&x=y,\\ 0,&x\ne y, \end{cases}exp(iθD),Dx,y​={n−2#{j:xj​=true},0,​x=y,x=y,​

with rows and columns indexed by Boolean strings of length nnn. The positive sign iθi\thetaiθ results from evaluating the evolution exp⁡(−itD)\exp(-itD)exp(−itD) at t=−θt=-\thetat=−θ. All real θ\thetaθ are allowed; for n=0n=0n=0, the result is the 1×11\times11×1 identity.

QAlgorithms.Papers.Independent.Extend50.P14.schrodingerEvolution

For any finite type III equipped with decidable equality, any complex matrix HHH indexed by III, and any real number ttt, this definition assigns the matrix

e−itH.e^{-itH}.e−itH.

The exponential is the matrix exponential. No Hermiticity assumption on HHH or sign restriction on ttt is imposed, so unitarity is not part of this definition. At t=0t=0t=0 the value is the identity; an empty index type III is permitted.

QAlgorithms.Papers.Independent.Extend50.P14.secondAncillaExchange

For natural numbers n,dn,dn,d, a site j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, and a level 0≤l<d−10\le l<d-10≤l<d−1, this defines the complex matrix

Lj,l⊗I2⊗∣true⟩⟨false∣+Lj,l†⊗I2⊗∣false⟩⟨true∣L_{j,l}\otimes I_2\otimes|\mathrm{true}\rangle\langle\mathrm{false}| + L_{j,l}^\dagger\otimes I_2\otimes|\mathrm{false}\rangle\langle\mathrm{true}|Lj,l​⊗I2​⊗∣true⟩⟨false∣+Lj,l†​⊗I2​⊗∣false⟩⟨true∣

on ({0,…,d−1}n×{false,true})×{false,true}\bigl(\{0,\ldots,d-1\}^n\times\{\mathrm{false},\mathrm{true}\}\bigr)\times\{\mathrm{false},\mathrm{true}\}({0,…,d−1}n×{false,true})×{false,true}. Here Lj,lL_{j,l}Lj,l​ applies the matrix unit ∣l⟩⟨l+1∣|l\rangle\langle l+1|∣l⟩⟨l+1∣ on site jjj and identities on every other site; I2I_2I2​ acts on the first Boolean register, while the displayed matrix units act on the second Boolean register. There is no permissible site when n=0n=0n=0, and no permissible level when d≤1d\le1d≤1, since natural subtraction in d−1d-1d−1 is truncated at zero.

QAlgorithms.Papers.Independent.Extend50.P14.stringPhaseFactor

For every natural number nnn and every complex matrix VVV on nnn-bit strings, this defines the ordered product

∏l=0nexp⁡ ⁣(i rep⁡(Φl(V))2n Z[l]),\prod_{l=0}^{n} \exp\!\left(\frac{i\,\operatorname{rep}(\Phi_l(V))}{2^n}\,Z^{[l]}\right),l=0∏n​exp(2nirep(Φl​(V))​Z[l]),

with factors in increasing lll. Here Z[l]Z^{[l]}Z[l] is diagonal, with entry (−1)∣{j<l:xj=true}∣(-1)^{|\{j<l:x_j=\mathrm{true}\}|}(−1)∣{j<l:xj​=true}∣ at an nnn-bit string xxx, and rep⁡\operatorname{rep}rep is the specified real representative of an angle modulo 2π2\pi2π. The angle used is

Φl(V)=∑m=0n(∑0≤s≤ms≤l(−1)s(ms)(n−ml−s))[arg⁡det⁡(VPm+I−Pm)],\Phi_l(V)=\sum_{m=0}^{n} \left(\sum_{\substack{0\le s\le m\\s\le l}} (-1)^s\binom ms\binom{n-m}{l-s}\right) [\arg\det(VP_m+I-P_m)],Φl​(V)=m=0∑n​​0≤s≤ms≤l​∑​(−1)s(sm​)(l−sn−m​)​[argdet(VPm​+I−Pm​)],

where PmP_mPm​ is diagonal with entry 111 on bit strings having exactly mmm true bits and 000 otherwise, and brackets denote reduction modulo 2π2\pi2π. There is no unitarity or invariance hypothesis on VVV; zero determinants use arg⁡0=0\arg 0=0arg0=0. The denominator 2n2^n2n is always nonzero, and for n=0n=0n=0 the product contains its single l=0l=0l=0 factor.

QAlgorithms.Papers.Independent.Extend50.P14.symmetricLocalGroup

For any type GGG, natural numbers n,kn,kn,k, finite types DjD_jDj​ with decidable equality, and arbitrary complex matrix family U(g)U(g)U(g) on X=∏j<nDj\mathcal X=\prod_{j<n}D_jX=∏j<n​Dj​, this is the smallest multiplicative submonoid containing every unitary matrix VVV that commutes with every U(g)U(g)U(g) and admits a site set sss with ∣s∣≤k|s|\le k∣s∣≤k and a matrix BBB satisfying

Vx,y=Bx∣s,y∣s∏j∉s1{xj=yj}(x,y∈X).V_{x,y}=B_{x|_s,y|_s}\prod_{j\notin s}\mathbf 1_{\{x_j=y_j\}} \qquad(x,y\in\mathcal X).Vx,y​=Bx∣s​,y∣s​​j∈/s∏​1{xj​=yj​}​(x,y∈X).

Equivalently, it consists of all finite products of such matrices, including the empty product III; the closure used here is algebraic and does not add limits of products. The product itself need not have a support of size at most kkk. No group or representation assumptions are imposed on GGG and UUU. Empty supports, k=0k=0k=0, n=0n=0n=0, and empty local types are included.

QAlgorithms.Papers.Independent.Extend50.P14.symmetricLocalLie

For any type GGG, natural numbers n,kn,kn,k, finite types DjD_jDj​ with decidable equality, and arbitrary complex matrix family U(g)U(g)U(g) on X=∏j<nDj\mathcal X=\prod_{j<n}D_jX=∏j<n​Dj​, this is the smallest real Lie subalgebra of the complex matrices on X\mathcal XX containing every matrix AAA for which A+A∗=0A+A^*=0A+A∗=0, AU(g)=U(g)AAU(g)=U(g)AAU(g)=U(g)A for every g∈Gg\in Gg∈G, and there exist s⊆{0,…,n−1}s\subseteq\{0,\ldots,n-1\}s⊆{0,…,n−1} with ∣s∣≤k|s|\le k∣s∣≤k and a complex matrix BBB such that

Ax,y=Bx∣s,y∣s∏j∉s1{xj=yj}(x,y∈X).A_{x,y}=B_{x|_s,y|_s}\prod_{j\notin s}\mathbf 1_{\{x_j=y_j\}} \qquad(x,y\in\mathcal X).Ax,y​=Bx∣s​,y∣s​​j∈/s∏​1{xj​=yj​}​(x,y∈X).

Here ∗^*∗ is conjugate transpose and the Lie bracket is [A,B]=AB−BA[A,B]=AB-BA[A,B]=AB−BA. The generated algebra is closed under real linear combinations and Lie brackets, without a topological closure requirement; generated elements need not retain a support of size at most kkk. No group or representation assumption on GGG or UUU is made. Empty supports are allowed, including when k=0k=0k=0, and n=0n=0n=0 and empty local types are permitted.

QAlgorithms.Papers.Independent.Extend50.P14.totalZ

For every natural number nnn, totalZ⁡(n)\operatorname{totalZ}(n)totalZ(n) is the complex diagonal matrix indexed by Boolean strings of length nnn, with diagonal entry n−2 #{j:xj=true}n-2\,\#\{j:x_j=\mathrm{true}\}n−2#{j:xj​=true} at xxx, and zero off-diagonal entries. For n=0n=0n=0, this is the 1×11\times11×1 zero matrix.

QAlgorithms.Papers.Independent.Extend50.P14.twoAncillaControls

For natural numbers n,dn,dn,d, let B={0,…,d−1}n\mathcal B=\{0,\ldots,d-1\}^{n}B={0,…,d−1}n, and index the full space by B×{0,1}×{0,1}\mathcal B\times\{0,1\}\times\{0,1\}B×{0,1}×{0,1}, with the two Boolean coordinates in that order. Write IBI_{\mathcal B}IB​ and I2I_2I2​ for the identity matrices, Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1), and F=∣1⟩⟨0∣F=|1\rangle\langle0|F=∣1⟩⟨0∣. For 0≤j<n0\le j<n0≤j<n and 0≤ℓ<d−10\le\ell<d-10≤ℓ<d−1, define the data matrix Lj,ℓL_{j,\ell}Lj,ℓ​ by

Lj,ℓ(x,y)=1xj=ℓ1yj=ℓ+1∏q≠j1xq=yq.L_{j,\ell}(x,y)= \mathbf1_{x_j=\ell}\mathbf1_{y_j=\ell+1} \prod_{q\ne j}\mathbf1_{x_q=y_q}.Lj,ℓ​(x,y)=1xj​=ℓ​1yj​=ℓ+1​q=j∏​1xq​=yq​​.

The defined set consists exactly of the following matrices:

IB⊗Z⊗I2,IB⊗I2⊗Z,(Lj,ℓ⊗F+Lj,ℓ†⊗F†)⊗I2,Lj,ℓ⊗I2⊗F+Lj,ℓ†⊗I2⊗F†,I_{\mathcal B}\otimes Z\otimes I_2,\qquad I_{\mathcal B}\otimes I_2\otimes Z,\qquad (L_{j,\ell}\otimes F+L_{j,\ell}^{\dagger}\otimes F^{\dagger})\otimes I_2,\qquad L_{j,\ell}\otimes I_2\otimes F+ L_{j,\ell}^{\dagger}\otimes I_2\otimes F^{\dagger},IB​⊗Z⊗I2​,IB​⊗I2​⊗Z,(Lj,ℓ​⊗F+Lj,ℓ†​⊗F†)⊗I2​,Lj,ℓ​⊗I2​⊗F+Lj,ℓ†​⊗I2​⊗F†,

where the last two forms range over all such j,ℓj,\ellj,ℓ. Here 0,10,10,1 denote false and true, and †\dagger† denotes conjugate transpose. Subtraction in d−1d-1d−1 is truncated natural-number subtraction, so the last two forms are absent when d≤1d\le1d≤1, and also when n=0n=0n=0. The definition permits d=0d=0d=0; then B\mathcal BB is empty if n>0n>0n>0, while for n=0n=0n=0 it contains the unique empty configuration.

QAlgorithms.Papers.Independent.Extend50.P14.twoAncillaDrift

For natural numbers n,dn,dn,d and any real number gap\mathrm{gap}gap, let B={0,…,d−1}n\mathcal B=\{0,\ldots,d-1\}^{n}B={0,…,d−1}n, and identify false and true with 000 and 111. The defined matrix on (B×{0,1})×{0,1}(\mathcal B\times\{0,1\})\times\{0,1\}(B×{0,1})×{0,1} is diagonal, with entries

D((x,b1,b2),(y,c1,c2))={gap(∑j=0n−1xj+b1+b2),(x,b1,b2)=(y,c1,c2),0,otherwise.D\bigl((x,b_1,b_2),(y,c_1,c_2)\bigr)= \begin{cases} \mathrm{gap}\left(\displaystyle\sum_{j=0}^{n-1}x_j+b_1+b_2\right), &(x,b_1,b_2)=(y,c_1,c_2),\\ 0,&\text{otherwise}. \end{cases}D((x,b1​,b2​),(y,c1​,c2​))=⎩⎨⎧​gap(j=0∑n−1​xj​+b1​+b2​),0,​(x,b1​,b2​)=(y,c1​,c2​),otherwise.​

Thus each Boolean coordinate contributes gap\mathrm{gap}gap precisely when it is true. There is no positivity assumption on gap\mathrm{gap}gap. For n=0n=0n=0 the data sum is empty and equals zero; if d=0<nd=0<nd=0<n, there are no data configurations and the matrix has an empty index set.

QAlgorithms.Papers.Independent.Extend50.P14.u1BodyPhase

For every natural number nnn, every complex matrix VVV on nnn-bit strings, and every natural number lll, this defines the angle modulo 2π2\pi2π

Φl(V)=∑m=0nwnlm [arg⁡Dm(V)],wnlm=∑0≤s≤ms≤l(−1)s(ms)(n−ml−s).\Phi_l(V)=\sum_{m=0}^{n}w_{nlm}\,[\arg D_m(V)], \qquad w_{nlm}=\sum_{\substack{0\le s\le m\\s\le l}} (-1)^s\binom ms\binom{n-m}{l-s}.Φl​(V)=m=0∑n​wnlm​[argDm​(V)],wnlm​=0≤s≤ms≤l​∑​(−1)s(sm​)(l−sn−m​).

Here brackets denote the class of a real number modulo 2π2\pi2π, integer coefficients act by integer multiplication in that angle group, Dm(V)=det⁡(VPm+I−Pm)D_m(V)=\det(VP_m+I-P_m)Dm​(V)=det(VPm​+I−Pm​), and PmP_mPm​ is diagonal with entry 111 precisely on bit strings having mmm true bits and 000 otherwise. No assumption is made on VVV; zero determinants use the defined value arg⁡0=0\arg 0=0arg0=0. The definition includes n=0n=0n=0 and all lll; for l>nl>nl>n, every coefficient wnlmw_{nlm}wnlm​ is zero.

QAlgorithms.Papers.Independent.Extend50.P14.u1Central

For any natural numbers n,ln,ln,l, u1Central⁡(n,l)\operatorname{u1Central}(n,l)u1Central(n,l) is the sum, over all Boolean strings bbb of length nnn having exactly lll true coordinates, of the diagonal matrix whose entry at (x,x)(x,x)(x,x) is ∏j=0n−1(−1)1{bj=true, xj=true}\prod_{j=0}^{n-1}(-1)^{\mathbf1_{\{b_j=\mathrm{true},\,x_j=\mathrm{true}\}}}∏j=0n−1​(−1)1{bj​=true,xj​=true}​. Equivalently, its off-diagonal entries vanish and

u1Central⁡(n,l)x,x=∑b∈{false,true}n#{j:bj=true}=l∏j=0n−1(−1)1{bj=true, xj=true}.\operatorname{u1Central}(n,l)_{x,x} =\sum_{\substack{b\in\{\mathrm{false},\mathrm{true}\}^n\\ \#\{j:b_j=\mathrm{true}\}=l}} \prod_{j=0}^{n-1}(-1)^{\mathbf1_{\{b_j=\mathrm{true},\,x_j=\mathrm{true}\}}}.u1Central(n,l)x,x​=b∈{false,true}n#{j:bj​=true}=l​∑​j=0∏n−1​(−1)1{bj​=true,xj​=true}​.

An empty sum is zero, so l>nl>nl>n gives the zero matrix; for n=0n=0n=0, the value is the 1×11\times11×1 identity if l=0l=0l=0, and zero otherwise.

QAlgorithms.Papers.Independent.Extend50.P14.u1DualCentral

For every pair of natural numbers n,ln,ln,l, this defines

C~nl=12n(nl) Cnl,(Cnl)xy=δxy∑S⊆{0,…,n−1}∣S∣=l(−1)∣{j∈S:xj=true}∣,\widetilde C_{nl}=\frac{1}{2^n\binom nl}\,C_{nl}, \qquad (C_{nl})_{xy}=\delta_{xy} \sum_{\substack{S\subseteq\{0,\ldots,n-1\}\\|S|=l}} (-1)^{|\{j\in S:x_j=\mathrm{true}\}|},Cnl​=2n(ln​)1​Cnl​,(Cnl​)xy​=δxy​S⊆{0,…,n−1}∣S∣=l​∑​(−1)∣{j∈S:xj​=true}∣,

as a complex matrix indexed by nnn-bit strings. Thus CnlC_{nl}Cnl​ sums the diagonal sign matrices associated with all bit strings of weight lll. Division uses the total complex inverse, whose value at zero is zero: if l>nl>nl>n, both the sum and the resulting matrix are zero. For n=l=0n=l=0n=l=0, the result is the identity on the singleton set of empty bit strings.

QAlgorithms.Papers.Independent.Extend50.P14.u1FinitePhaseGroup

For every natural number nnn, this defines the smallest multiplicative submonoid of complex matrices on nnn-bit strings containing

exp⁡(2πiz C~nl),0≤l≤n,z∈Z,\exp(2\pi i z\,\widetilde C_{nl}), \qquad 0\le l\le n,\quad z\in\mathbb Z,exp(2πizCnl​),0≤l≤n,z∈Z,

where C~nl=(2n(nl))−1Cnl\widetilde C_{nl}=(2^n\binom nl)^{-1}C_{nl}Cnl​=(2n(ln​))−1Cnl​, and CnlC_{nl}Cnl​ is diagonal with

(Cnl)xx=∑S⊆{0,…,n−1}∣S∣=l(−1)∣{j∈S:xj=true}∣.(C_{nl})_{xx}= \sum_{\substack{S\subseteq\{0,\ldots,n-1\}\\|S|=l}} (-1)^{|\{j\in S:x_j=\mathrm{true}\}|}.(Cnl​)xx​=S⊆{0,…,n−1}∣S∣=l​∑​(−1)∣{j∈S:xj​=true}∣.

Membership means being a finite product of these generators, including the empty product; no topological closure or finiteness condition is part of this definition. The denominators are nonzero for the allowed indices 0≤l≤n0\le l\le n0≤l≤n. When n=0n=0n=0, every generator is the identity.

QAlgorithms.Papers.Independent.Extend50.P14.u1Group

For any natural numbers n,kn,kn,k, u1Group⁡(n,k)\operatorname{u1Group}(n,k)u1Group(n,k) is the submonoid of complex matrices indexed by Boolean strings of length nnn generated by all unitary matrices VVV that commute with exp⁡(iθD)\exp(i\theta D)exp(iθD) for every real θ\thetaθ, where DDD is diagonal with Dx,x=n−2 #{j:xj=true}D_{x,x}=n-2\,\#\{j:x_j=\mathrm{true}\}Dx,x​=n−2#{j:xj​=true}, and for which there exist S⊆{0,…,n−1}S\subseteq\{0,\ldots,n-1\}S⊆{0,…,n−1}, ∣S∣≤k|S|\le k∣S∣≤k, and a complex matrix BBB indexed by Boolean assignments on SSS satisfying

Vx,y=Bx∣S,y∣S∏j∉S1{xj=yj}for all x,y.V_{x,y}=B_{x|_S,y|_S}\prod_{j\notin S}\mathbf1_{\{x_j=y_j\}} \quad\text{for all }x,y.Vx,y​=Bx∣S​,y∣S​​j∈/S∏​1{xj​=yj​}​for all x,y.

Thus membership means being a finite product of such generating matrices, including the empty product III; no topological closure is taken. The definition permits n=0n=0n=0, k=0k=0k=0, and empty SSS, with empty SSS giving scalar identity matrices subject to unitarity. No assumption k≤nk\le nk≤n is imposed.

QAlgorithms.Papers.Independent.Extend50.P14.u1Lie

For any natural numbers n,kn,kn,k, u1Lie⁡(n,k)\operatorname{u1Lie}(n,k)u1Lie(n,k) is the smallest real Lie subalgebra of complex matrices indexed by Boolean strings of length nnn, with bracket [A,B]=AB−BA[A,B]=AB-BA[A,B]=AB−BA, containing every matrix AAA satisfying all three conditions: A+A†=0A+A^\dagger=0A+A†=0; Aexp⁡(iθD)=exp⁡(iθD)AA\exp(i\theta D)=\exp(i\theta D)AAexp(iθD)=exp(iθD)A for every real θ\thetaθ, where Dx,x=n−2 #{j:xj=true}D_{x,x}=n-2\,\#\{j:x_j=\mathrm{true}\}Dx,x​=n−2#{j:xj​=true} and DDD is diagonal; and there exist a set S⊆{0,…,n−1}S\subseteq\{0,\ldots,n-1\}S⊆{0,…,n−1} with ∣S∣≤k|S|\le k∣S∣≤k and a complex matrix BBB indexed by Boolean assignments on SSS such that, for all length-nnn Boolean strings x,yx,yx,y,

Ax,y=Bx∣S,y∣S∏j∉S1{xj=yj}.A_{x,y}=B_{x|_S,y|_S}\prod_{j\notin S}\mathbf1_{\{x_j=y_j\}}.Ax,y​=Bx∣S​,y∣S​​j∈/S∏​1{xj​=yj​}​.

The generated algebra is closed under real linear combinations and commutators. Both n=0n=0n=0 and k=0k=0k=0 are allowed; SSS may be empty, in which case the displayed support condition describes a scalar multiple of the identity. No assumption k≤nk\le nk≤n is imposed.

QAlgorithms.Papers.Independent.Extend50.P14.u1PhaseFactor

For every natural number nnn and every complex matrix VVV on nnn-bit strings, this defines the ordered matrix product

∏l=0nexp⁡ ⁣(i rep⁡(Φl(V)) C~nl),\prod_{l=0}^{n}\exp\!\left(i\,\operatorname{rep}(\Phi_l(V))\,\widetilde C_{nl}\right),l=0∏n​exp(irep(Φl​(V))Cnl​),

with factors listed in increasing lll, where rep⁡\operatorname{rep}rep is the specified real representative of an angle modulo 2π2\pi2π. Here C~nl=(2n(nl))−1Cnl\widetilde C_{nl}=(2^n\binom nl)^{-1}C_{nl}Cnl​=(2n(ln​))−1Cnl​, with CnlC_{nl}Cnl​ diagonal and (Cnl)xx=∑∣S∣=l(−1)∣{j∈S:xj=true}∣(C_{nl})_{xx}=\sum_{|S|=l}(-1)^{|\{j\in S:x_j=\mathrm{true}\}|}(Cnl​)xx​=∑∣S∣=l​(−1)∣{j∈S:xj​=true}∣, the sum ranging over subsets of the nnn wire indices. The angle is

Φl(V)=∑m=0n(∑0≤s≤ms≤l(−1)s(ms)(n−ml−s))[arg⁡det⁡(VPm+I−Pm)],\Phi_l(V)=\sum_{m=0}^{n} \left(\sum_{\substack{0\le s\le m\\s\le l}} (-1)^s\binom ms\binom{n-m}{l-s}\right) [\arg\det(VP_m+I-P_m)],Φl​(V)=m=0∑n​​0≤s≤ms≤l​∑​(−1)s(sm​)(l−sn−m​)​[argdet(VPm​+I−Pm​)],

where PmP_mPm​ is the diagonal indicator of bit strings with mmm true bits. No condition is imposed on VVV, and arg⁡0=0\arg 0=0arg0=0 applies to zero determinants. For n=0n=0n=0, the product still has one factor, indexed by l=0l=0l=0.

QAlgorithms.Papers.Independent.Extend50.P14.withZero

For every natural number nnn and every vector ψ\psiψ in the complex Euclidean space indexed by nnn-bit strings, this defines a vector ψ~\widetilde\psiψ​ indexed by (n+1)(n+1)(n+1)-bit strings through

ψ~(x)={0,xn=true,ψ(x0,…,xn−1),xn=false.\widetilde\psi(x)= \begin{cases} 0,&x_n=\mathrm{true},\\ \psi(x_0,\ldots,x_{n-1}),&x_n=\mathrm{false}. \end{cases}ψ​(x)={0,ψ(x0​,…,xn−1​),​xn​=true,xn​=false.​

No normalization assumption on ψ\psiψ is imposed. This includes n=0n=0n=0, when ψ\psiψ has one coordinate, indexed by the empty string.

QAlgorithms.Papers.Independent.Extend50.P14.xyExchange

For every natural number nnn and indices a,b∈{0,…,n−1}a,b\in\{0,\ldots,n-1\}a,b∈{0,…,n−1}, this defines the complex matrix on nnn-bit strings

Hab=12(XaXb+YaYb),H_{ab}=\frac12(X_aX_b+Y_aY_b),Hab​=21​(Xa​Xb​+Ya​Yb​),

where X=(0110)X=\begin{pmatrix}0&1\\1&0\end{pmatrix}X=(01​10​), Y=(0−ii0)Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}Y=(0i​−i0​), and placing a matrix MMM on wire aaa means (Ma)xy=Mxa,ya∏q≠aδxq,yq(M_a)_{xy}=M_{x_a,y_a}\prod_{q\ne a}\delta_{x_q,y_q}(Ma​)xy​=Mxa​,ya​​∏q=a​δxq​,yq​​. The indices are not required to be distinct; when a=ba=ba=b, the result is the identity. When n=0n=0n=0, there are no possible choices of a,ba,ba,b.

QAlgorithms.Papers.Independent.Extend50.P14.xyZGroup

For every natural number nnn, this defines the multiplicative submonoid of complex matrices on nnn-bit strings consisting of finite products of matrices

exp⁡(iθZa)orexp⁡ ⁣(iθ2(XaXb+YaYb)),θ∈R,a≠b.\exp(i\theta Z_a) \quad\text{or}\quad \exp\!\left(\frac{i\theta}{2}(X_aX_b+Y_aY_b)\right), \qquad \theta\in\mathbb R,\quad a\ne b.exp(iθZa​)orexp(2iθ​(Xa​Xb​+Ya​Yb​)),θ∈R,a=b.

Here X=(0110)X=\begin{pmatrix}0&1\\1&0\end{pmatrix}X=(01​10​), Y=(0−ii0)Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}Y=(0i​−i0​), Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1), and MaM_aMa​ has entries Mxa,ya∏q≠aδxq,yqM_{x_a,y_a}\prod_{q\ne a}\delta_{x_q,y_q}Mxa​,ya​​∏q=a​δxq​,yq​​. All wire indices lie in {0,…,n−1}\{0,\ldots,n-1\}{0,…,n−1}. The empty product is included, and no topological closure is taken. For n=0n=0n=0, the resulting submonoid contains only the identity.

QAlgorithms.Papers.Independent.Extend50.P14.xyZLie

For every natural number nnn, this defines the smallest real Lie subalgebra of the complex matrices on nnn-bit strings containing every iZaiZ_aiZa​ and every i2(XaXb+YaYb)\frac{i}{2}(X_aX_b+Y_aY_b)2i​(Xa​Xb​+Ya​Yb​) with a≠ba\ne ba=b. Thus it is the smallest real vector subspace containing these matrices and closed under the bracket [A,B]=AB−BA[A,B]=AB-BA[A,B]=AB−BA. Here X=(0110)X=\begin{pmatrix}0&1\\1&0\end{pmatrix}X=(01​10​), Y=(0−ii0)Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}Y=(0i​−i0​), Z=diag⁡(1,−1)Z=\operatorname{diag}(1,-1)Z=diag(1,−1), and MaM_aMa​ acts by MMM on bit aaa and by the identity on every other bit, explicitly (Ma)xy=Mxa,ya∏q≠aδxq,yq(M_a)_{xy}=M_{x_a,y_a}\prod_{q\ne a}\delta_{x_q,y_q}(Ma​)xy​=Mxa​,ya​​∏q=a​δxq​,yq​​. For n=0n=0n=0, the generating set is empty and this Lie subalgebra is {0}\{0\}{0}.

QAlgorithms.Papers.Independent.Extend50.P14.zString

For every natural number nnn and every Boolean string bbb of length nnn, zString⁡(b)\operatorname{zString}(b)zString(b) is the complex matrix indexed by Boolean strings of length nnn, with zero off-diagonal entries and diagonal entries

zString⁡(b)x,x=∏j=0n−1{−1,bj=true and xj=true,1,otherwise.\operatorname{zString}(b)_{x,x} =\prod_{j=0}^{n-1} \begin{cases} -1,&b_j=\mathrm{true}\ \text{and}\ x_j=\mathrm{true},\\ 1,&\text{otherwise}. \end{cases}zString(b)x,x​=j=0∏n−1​{−1,1,​bj​=true and xj​=true,otherwise.​

For n=0n=0n=0, the empty product is 111, so this is the 1×11\times11×1 identity matrix.

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