Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Encoding a qubit in an oscillator

Definition
QAlgorithms_Papers_Independent_Intakenext100_P12

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

prove2quantum

The objects the formalized statements of Encoding a qubit in an oscillator (arXiv:quant-ph/0008040) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • cisPhase: The source phase convention, with real phase in radians.
  • finiteInner: Ordinary finite logical inner product, conjugate-linear in its first argument.
  • finiteWord: Section II (17), PDF p.3: normalized finite codeword in dimension d.
  • finiteError: Section II: X^a Z^b, in that order; d is positive at every use below.
  • finiteEncode: Section II: encoding a logical vector by the displayed comb basis.
  • finiteSyndrome: Complete half-open syndrome representatives; these are distinct from the strict central set.
  • finiteWindow: Strict correction window in (16), without truncated natural-number subtraction.
  • finiteCodeSpace: The finite encoder's actual subspace, in the accepted Hilbert-space convention.
  • finiteErrorMatrix: Matrix of the source error X^a Z^b.
  • finiteErrorSpace: Coherent span of every error in the strict central correction window.
  • FiniteCodeConclusion: The full conclusion of the finite construction, including perfection and exact KL identities.
  • combSupportPoint: Grid support of (27); nonzero spacing and positive n are supplied at every use.
  • idealComb: The ideal encoded generalized state, as an explicitly summed Schwartz-test functional.
  • phasedComb: Multiplication of a comb by a smooth phase, defined through its point masses.
  • rotorEncode: Fourier coefficients of an ideal rotor codeword, with m=n*r. These bounded, periodic sequences represent distributions on the circle, not l2(Z) states.
  • rotorError: Actual circle rotation followed by integer momentum translation, in Fourier coefficients.
  • IsRotorStabilized: Stabilizers (19), in the integer Fourier spectrum.
  • rotorCell: The strict angular/momentum window of (20), using a central representative of the angle.
  • wignerKernel: Section IV (28): distributional density kernel, paired after the Wigner change of variables. This does not multiply two distributions pointwise.
  • wignerSign: Sign of a Wigner lattice weight; only the odd/odd parity class is negative.
  • wignerQMean: Normalized symmetric q-marginal lattice mean. Marginal pushforward is not defined for this nonnormalizable distribution; this states the source's oscillatory cancellation.
  • wignerPMean: Normalized symmetric p-marginal lattice mean.
  • oscillatorVacuumProfile: One-mode restriction of the pinned normalized vacuum wavefunction (source IV, PDF p.5).
  • coherentLatticeWave: Ordered displacement in (29), including the BCH phase exp(ipist). Its center is (salpha, 2pit/alpha).
  • coherentStart: A normalized coherent state with arbitrary real quadrature center.
  • projectedCoherent: The ordered lattice projection of this coherent state, including the phase convention of (29).
  • errorCell: Correctable open error cell of (24), with half-cell boundaries excluded.
  • SupportedError: Square-integrable embedded errors with support in the correctable cell, modulo null sets.
  • embeddedWave: Explicit realization of (40), with delta-comb normalization fixed by the Zak isometry. The square-root factor fixes the otherwise unspecified normalization of ideal codewords.
  • CellHilbert: The physical error Hilbert space uses Lebesgue measure restricted to the open cell.
  • HasExactRealization: A constructed Zak realization, with its isometry required as a conclusion.
  • displacedComb: Weyl displacement exp(i*(-up+vq)) of the explicit ideal comb.
  • IsIdealStabilized: Common +1 eigenfunctionals of the two actual translation/modulation pullbacks.
  • logicalCycle: The finite logical cyclic shift, independent of any physical syndrome.
  • logicalClock: The finite logical clock, with source phase exp(+2pii/n).
  • gkpPair: Section VI (46), PDF p.7: sign adapter from the pinned opposite-sign form. Coordinates are grouped as alpha (p coefficient), then beta (q coefficient). The imported sigma has upper-right +I, exactly the source Omega.
  • schrodingerDisplacement: Actual Schroedinger translation/modulation exp(isqrt(2pi)(alphap+beta*q)).
  • rowLattice: Lattice generated by the rows of M, not its columns.
  • latticeGram: Source (50).
  • IntegralMatrix: Integral entries of a real matrix.
  • Unimodular: Integer change of row basis with determinant +1 or -1.
  • symplecticDual: Symplectic dual lattice, in the source's integer-pairing convention.
  • dualGenerator: The particular dual basis chosen by (55)–(59).
  • euclideanDual: Euclidean integer dual; used only in the CSS construction.
  • cssComb: Explicit position comb on the physical CSS p-translation lattice.
  • HasCSSDistribution: Nonzero common eigenfunctional for the CSS generators described in the source. The displayed source block matrix uses the generator order (q,p); its physical Weyl coordinates are adapted by swapping the two grouped coordinate blocks.
  • hexVector: Two-dimensional row hexagonal lattice in (68).
  • planeNorm: Euclidean plane norm, independent of the product-space max-norm instance.
  • hexDualVector: Source dual lattice labels, not physical displacement coordinates.
  • squareDualVector: Equal-area square dual lattice, in source label coordinates.
  • IsSharpRadius: A sharp disjoint-open-ball radius, characterized by all separations and one attaining pair.
  • quadratureGaussianDensity: Centered Gaussian density with standard deviation sigma in one quadrature.
  • squareParity: Nearest square-lattice correction, with a fixed half-open tie convention.
  • squareErrorRate: Exact odd-cell mass, including harmless translations by two logical periods.
  • squareJoint: Joint logical X/Z probability induced by independent quadrature displacements.
  • physicalHex: Physical dual hexagonal lattice for one encoded qubit.
  • hexNearest: An actual nearest lattice point. The theorem below establishes existence for every input.
  • hexProbability: Logical Pauli probabilities under nearest-lattice recovery; stabilizers are even/even labels.
  • SymplecticOpticalGate: Section IX: named ideal optical operations, with mode labels and actual real parameters.
  • SymplecticOpticalGate.Valid: Legal optical parameters: two different beam modes, and finite positive squeeze ratios.
  • realModeMixing: Exact finite beam mixing, rather than the infinitesimal heuristic (99).
  • SymplecticOpticalGate.matrix: Phase-space action of each named optical gate, in the source's grouped coordinate order.
  • opticalEval: Gates are evaluated in time order.
  • atomEvolution: Section XI.A: photon-number-dependent atom phase; atom=false is g, atom=true is e.
  • atomBranch: The unnormalized oscillator branch after measuring the atom in the plus/minus basis.
  • numberSector: Number-sector projector, kept separate from any nonnormalizable ideal comb.
  • paperS: The paper's S, equal to the accepted T gate up to exp(-i*pi/8).
  • hadamardPlus: Equation (112).
  • magicState: Equation (114), normalized.
  • magicBranch: CNOT with data control and magic-state target, followed by the indicated target outcome.
  • cubicLogicalPhase: Equation (121), as a real polynomial phase.
  • injectionPhaseResource: Equation (126): ideal phase-resource wavefunction; no L2 normalization is asserted.
  • injectionJointWave: Product of the data wavefunction and the ideal target resource in Fig.6.
  • injectionInverseSum: Position-wavefunction pullback for the data-controlled inverse SUM of Fig.6. The ket action is (q1,q2) ↦ (q1,q2-q1).
  • injectionPositionFiber: Ideal target-position outcome fiber. With the unnormalizable resource this is conditional amplitude algebra, not a normalized outcome law.
  • phaseCorrection: Section XI.B (125)–(127): polynomial-phase feed-forward correction.
  • squeezeWave: A finite positive coordinate squeeze, with the L2 normalization retained.
  • cubicWave: Cubic phase gate, on actual data wavefunctions.
  • ShorGate: Actual three-qubit gates used in Fig.7; the Boolean flag chooses S inverse.
  • ShorGate.matrix: Exact matrix of a gate, rather than an independent resource counter.
  • controlledPhaseWord: Fig.7(a), read left to right.
  • inverseControlledPhaseWord: The actual inverse of the preceding circuit.
  • shorWord: Fig.7(b), with both controlled P and controlled P inverse expanded.
  • shorEval: Matrix of a chronological gate list.
  • ccz: Equation (153).
  • shorState: The state in (150), with its actual normalized amplitudes.
  • shorStabilizer: CZ on the two other wires followed by X on wire k, one of the three Shor stabilizers.
  • IsGaussianWave: Normalized finite-mode pure Gaussian wavefunctions. Positivity of the real quadratic form excludes infinite squeezing, and symmetry fixes the actual quadratic coefficient.
  • GaussianGate: Generators of finite affine multimode metaplectic circuits. Fourier, quadratic phases, positive squeezes, beam mixing and displacements generate the affine symplectic operations.
  • GaussianGate.Valid: Infinite squeezing and coincident beam modes are excluded.
  • GaussianGate.act: Actual integral/multiplier action on position wavefunctions, including exact finite mixing.
  • gaussianEval: Finite, chronological composition, including mixing with other Gaussian modes.
  • regularFunctional: Physical wavefunctions embedded as ordinary regular distributions.
  • tensorComb: Explicit tensor product of ideal position combs, with arbitrary logical coefficients.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Gates
import Definitions.Def_QAlgorithms_Defs_QECC
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P10
import Definitions.Def_QAlgorithms_Papers_Independent_Frontier30_P02
import Definitions.Def_QAlgorithms_Papers_Independent_Frontier30_P10
import Definitions.Def_QAlgorithms_Papers_Independent_Next46_P16

/-!
Statements from Gottesman, Kitaev and Preskill, quant-ph/0008040v3.
Ideal combs are Schwartz-test functionals. No ambient L2 norm is assigned to them.
New definitions in this file belong to this paper; pinned coordinate, symplectic
and vacuum definitions are imported with explicit convention adapters. Compilation is pending.
-/

noncomputable section

open scoped BigOperators
open MeasureTheory Matrix ComplexConjugate
open QAlgorithms.Papers.Independent.Dependency50.P10 (Phase sigma)

namespace QAlgorithms.Papers.Independent.Intakenext100.P12

/-- The source phase convention, with real phase in radians. -/
def cisPhase (t : ℝ) : ℂ := Complex.exp (Complex.I * (t : ℂ))

/-- Ordinary finite logical inner product, conjugate-linear in its first argument. -/
def finiteInner {ι : Type*} [Fintype ι] (x y : ι → ℂ) : ℂ :=
  ∑ i, conj (x i) * y i

/-- Section II (17), PDF p.3: normalized finite codeword in dimension d. -/
def finiteWord (d r1 r2 n : ℕ) (j : Fin n) (x : ZMod d) : ℂ :=
  (Real.sqrt r2 : ℂ)⁻¹ *
    ∑ k : Fin r2, if x = ((r1 * (j.val + n * k.val) : ℕ) : ZMod d) then 1 else 0

/-- Section II: X^a Z^b, in that order; d is positive at every use below. -/
def finiteError (d : ℕ) (a b : ℤ) (x : ZMod d → ℂ) (j : ZMod d) : ℂ :=
  cisPhase (2 * Real.pi * b * (j - (a : ZMod d)).val / d) * x (j - (a : ZMod d))

/-- Section II: encoding a logical vector by the displayed comb basis. -/
def finiteEncode (d r1 r2 n : ℕ) (c : Fin n → ℂ) (x : ZMod d) : ℂ :=
  ∑ j, c j * finiteWord d r1 r2 n j x

/-- Complete half-open syndrome representatives; these are distinct from the strict central set. -/
def finiteSyndrome (d r1 r2 n : ℕ) (e : (Fin r1 × Fin r2) × Fin n) : ZMod d → ℂ :=
  finiteError d (e.1.1.val : ℤ) (e.1.2.val : ℤ) (finiteWord d r1 r2 n e.2)

/-- Strict correction window in (16), without truncated natural-number subtraction. -/
def finiteWindow (r1 r2 : ℕ) (a b : ℤ) : Prop :=
  |(a : ℝ)| < (r1 : ℝ) / 2 ∧ |(b : ℝ)| < (r2 : ℝ) / 2

/-- The finite encoder's actual subspace, in the accepted Hilbert-space convention. -/
def finiteCodeSpace (d r1 r2 n : ℕ) [NeZero d] : Submodule ℂ (EuclideanSpace ℂ (ZMod d)) :=
  Submodule.span ℂ (Set.range (fun j : Fin n => WithLp.toLp 2 (finiteWord d r1 r2 n j)))

/-- Matrix of the source error X^a Z^b. -/
def finiteErrorMatrix (d : ℕ) (a b : ℤ) : Matrix (ZMod d) (ZMod d) ℂ :=
  fun x y => if x = y + (a : ZMod d) then cisPhase (2 * Real.pi * b * y.val / d) else 0

/-- Coherent span of every error in the strict central correction window. -/
def finiteErrorSpace (d r1 r2 : ℕ) [NeZero d] : Submodule ℂ (Matrix (ZMod d) (ZMod d) ℂ) :=
  Submodule.span ℂ {E | ∃ a b : ℤ, finiteWindow r1 r2 a b ∧ E = finiteErrorMatrix d a b}

/-- The full conclusion of the finite construction, including perfection and exact KL identities. -/
def FiniteCodeConclusion (d r1 r2 n : ℕ) [NeZero d] : Prop :=
  (∀ psi : ZMod d → ℂ,
    (finiteError d (r1 * n) 0 psi = psi ∧ finiteError d 0 (r2 * n) psi = psi) ↔
      ∃ c : Fin n → ℂ, finiteEncode d r1 r2 n c = psi) ∧
  (∀ c c2 : Fin n → ℂ,
    finiteInner (finiteEncode d r1 r2 n c) (finiteEncode d r1 r2 n c2) = finiteInner c c2) ∧
  QAlgorithms.Corrects (finiteCodeSpace d r1 r2 n) (finiteErrorSpace d r1 r2 : Set _) ∧
  (∀ j : Fin n,
    finiteError d (r1 * n) 0 (finiteWord d r1 r2 n j) = finiteWord d r1 r2 n j ∧
    finiteError d 0 (r2 * n) (finiteWord d r1 r2 n j) = finiteWord d r1 r2 n j) ∧
  (∀ j : Fin n,
    finiteError d r1 0 (finiteWord d r1 r2 n j) =
      finiteWord d r1 r2 n (⟨(j.val + 1) % n, Nat.mod_lt _ (Nat.zero_lt_of_lt j.isLt)⟩) ∧
    finiteError d 0 r2 (finiteWord d r1 r2 n j) =
      fun x => cisPhase (2 * Real.pi * j.val / n) * finiteWord d r1 r2 n j x) ∧
  (∀ e f : (Fin r1 × Fin r2) × Fin n,
    finiteInner (finiteSyndrome d r1 r2 n e) (finiteSyndrome d r1 r2 n f) =
      if e = f then 1 else 0) ∧
  Submodule.span ℂ (Set.range (finiteSyndrome d r1 r2 n)) = ⊤ ∧
  (∀ a b a2 b2 : ℤ, finiteWindow r1 r2 a b → finiteWindow r1 r2 a2 b2 →
    ∀ c c2 : Fin n → ℂ,
    finiteInner (finiteError d a b (finiteEncode d r1 r2 n c))
      (finiteError d a2 b2 (finiteEncode d r1 r2 n c2)) =
        if (a, b) = (a2, b2) then finiteInner c c2 else 0)

/-- Grid support of (27); nonzero spacing and positive n are supplied at every use. -/
def combSupportPoint (n : ℕ) (alpha : ℝ) (j : Fin n) (s : ℤ) : ℝ :=
  alpha * (j.val + (n : ℝ) * s)

/-- The ideal encoded generalized state, as an explicitly summed Schwartz-test functional. -/
def idealComb (n : ℕ) (alpha : ℝ) (c : Fin n → ℂ)
    (f : SchwartzMap ℝ ℂ) : ℂ :=
  ∑ j, c j * ∑' s : ℤ, f (combSupportPoint n alpha j s)

/-- Multiplication of a comb by a smooth phase, defined through its point masses. -/
def phasedComb (n : ℕ) (alpha : ℝ) (c : Fin n → ℂ) (phase : ℝ → ℝ)
    (f : SchwartzMap ℝ ℂ) : ℂ :=
  ∑ j, c j * ∑' s : ℤ,
    cisPhase (phase (combSupportPoint n alpha j s)) * f (combSupportPoint n alpha j s)

/-- Fourier coefficients of an ideal rotor codeword, with m=n*r. These bounded,
periodic sequences represent distributions on the circle, not l2(Z) states. -/
def rotorEncode (n r : ℕ) (c : Fin n → ℂ) (L : ℤ) : ℂ :=
  if L % (r : ℤ) = 0 then
    (Real.sqrt n : ℂ)⁻¹ * ∑ j : Fin n, c j * cisPhase (-2 * Real.pi * L * j.val / (n * r))
  else 0

/-- Actual circle rotation followed by integer momentum translation, in Fourier coefficients. -/
def rotorError (theta : ℝ) (b : ℤ) (psi : ℤ → ℂ) (L : ℤ) : ℂ :=
  cisPhase (-(L : ℝ) * theta) * psi (L - b)

/-- Stabilizers (19), in the integer Fourier spectrum. -/
def IsRotorStabilized (n r : ℕ) (psi : ℤ → ℂ) : Prop :=
  (∀ L : ℤ, psi (L - (n * r : ℕ)) = psi L) ∧
  (∀ L : ℤ, cisPhase (-2 * Real.pi * (L : ℝ) / r) * psi L = psi L)

/-- The strict angular/momentum window of (20), using a central representative of the angle. -/
def rotorCell (n r : ℕ) : Set (ℝ × ℤ) :=
  {e | |e.1| < Real.pi / (n * r) ∧ |(e.2 : ℝ)| < (r : ℝ) / 2}

/-- Section IV (28): distributional density kernel, paired after the Wigner change of variables.
This does not multiply two distributions pointwise. -/
def wignerKernel (n : ℕ) (alpha : ℝ) (j : Fin n)
    (f : SchwartzMap (ℝ × ℝ) ℂ) : ℂ :=
  (2 * Real.pi : ℂ)⁻¹ * ∑' ab : ℤ × ℤ,
    ∫ p : ℝ,
      cisPhase (p * (combSupportPoint n alpha j ab.1 - combSupportPoint n alpha j ab.2)) *
        f ((combSupportPoint n alpha j ab.1 + combSupportPoint n alpha j ab.2) / 2, p)

/-- Sign of a Wigner lattice weight; only the odd/odd parity class is negative. -/
def wignerSign (s t : ℤ) : ℂ := if s % 2 = 1 ∧ t % 2 = 1 then -1 else 1

/-- Normalized symmetric q-marginal lattice mean. Marginal pushforward is not defined
for this nonnormalizable distribution; this states the source's oscillatory cancellation. -/
def wignerQMean (n : ℕ) (alpha : ℝ) (j : Fin n) (M : ℕ) (f : SchwartzMap ℝ ℂ) : ℂ :=
  ((2 * (M : ℝ) + 1 : ℝ) : ℂ)⁻¹ *
    ∑ s ∈ Finset.Icc (-(M : ℤ)) (M : ℤ), ∑' t : ℤ,
      wignerSign s t * f (alpha * j.val + n * alpha * t / 2)

/-- Normalized symmetric p-marginal lattice mean. -/
def wignerPMean (n : ℕ) (alpha : ℝ) (M : ℕ) (f : SchwartzMap ℝ ℂ) : ℂ :=
  ((2 * (M : ℝ) + 1 : ℝ) : ℂ)⁻¹ *
    ∑ t ∈ Finset.Icc (-(M : ℤ)) (M : ℤ), ∑' s : ℤ,
      wignerSign s t * f (Real.pi * s / (n * alpha))

/-- One-mode restriction of the pinned normalized vacuum wavefunction (source IV, PDF p.5). -/
def oscillatorVacuumProfile (q : ℝ) : ℂ :=
  QAlgorithms.Papers.Independent.Next46.P16.vacuumWave 1 (fun _ => q)

/-- Ordered displacement in (29), including the BCH phase exp(i*pi*s*t).
Its center is (s*alpha, 2*pi*t/alpha). -/
def coherentLatticeWave (alpha : ℝ) (s t : ℤ) (q : ℝ) : ℂ :=
  cisPhase (2 * Real.pi * t * q / alpha) * oscillatorVacuumProfile (q - s * alpha)

/-- A normalized coherent state with arbitrary real quadrature center. -/
def coherentStart (q0 p0 q : ℝ) : ℂ :=
  cisPhase (p0 * (q - q0 / 2)) * oscillatorVacuumProfile (q - q0)

/-- The ordered lattice projection of this coherent state, including the phase convention of (29). -/
def projectedCoherent (alpha q0 p0 : ℝ) (f : SchwartzMap ℝ ℂ) : ℂ :=
  ∑' st : ℤ × ℤ, ∫ q : ℝ,
    cisPhase (2 * Real.pi * st.2 * q / alpha) * coherentStart q0 p0 (q - st.1 * alpha) * f q

/-- Correctable open error cell of (24), with half-cell boundaries excluded. -/
def errorCell (n : ℕ) (alpha : ℝ) : Set (ℝ × ℝ) :=
  {uv | |uv.1| < alpha / 2 ∧ |uv.2| < Real.pi / (n * alpha)}

/-- Square-integrable embedded errors with support in the correctable cell, modulo null sets. -/
def SupportedError (n : ℕ) (alpha : ℝ) (eta : (ℝ × ℝ) → ℂ) : Prop :=
  MemLp eta 2 volume ∧ ∀ᵐ uv ∂volume, uv ∉ errorCell n alpha → eta uv = 0

/-- Explicit realization of (40), with delta-comb normalization fixed by the Zak isometry.
The square-root factor fixes the otherwise unspecified normalization of ideal codewords. -/
def embeddedWave (n : ℕ) (alpha : ℝ) (c : Fin n → ℂ)
    (eta : (ℝ × ℝ) → ℂ) (q : ℝ) : ℂ :=
  (Real.sqrt (n * alpha / (2 * Real.pi)) : ℂ) *
    ∑ j, c j * ∑' k : ℤ,
      ∫ v : ℝ, eta (q - combSupportPoint n alpha j k, v) *
        cisPhase (v * (q + combSupportPoint n alpha j k) / 2)

/-- The physical error Hilbert space uses Lebesgue measure restricted to the open cell. -/
abbrev CellHilbert (n : ℕ) (alpha : ℝ) :=
  Lp ℂ 2 ((volume : Measure (ℝ × ℝ)).restrict (errorCell n alpha))

/-- A constructed Zak realization, with its isometry required as a conclusion. -/
def HasExactRealization (n : ℕ) (alpha : ℝ) : Prop :=
  ∃ U : (PiLp 2 (fun _ : Fin n => CellHilbert n alpha)) →ₗᵢ[ℂ]
      Lp ℂ 2 (volume : Measure ℝ),
    ∀ (c : Fin n → ℂ) (eta : CellHilbert n alpha),
      ∀ᵐ q ∂(volume : Measure ℝ),
        U (WithLp.toLp 2 (fun j => c j • eta)) q =
          embeddedWave n alpha c ((errorCell n alpha).indicator (fun uv => eta uv)) q

/-- Weyl displacement exp(i*(-u*p+v*q)) of the explicit ideal comb. -/
def displacedComb (n : ℕ) (alpha u v : ℝ) (c : Fin n → ℂ)
    (f : SchwartzMap ℝ ℂ) : ℂ :=
  ∑ j, c j * ∑' k : ℤ,
    cisPhase (v * (combSupportPoint n alpha j k + u / 2)) * f (combSupportPoint n alpha j k + u)

/-- Common +1 eigenfunctionals of the two actual translation/modulation pullbacks. -/
def IsIdealStabilized (n : ℕ) (alpha : ℝ) (T : SchwartzMap ℝ ℂ → ℂ) : Prop :=
  (∃ D : SchwartzMap ℝ ℂ →L[ℂ] ℂ, ∀ f, D f = T f) ∧
  (∀ f g : SchwartzMap ℝ ℂ, (∀ q, g q = cisPhase (2 * Real.pi * q / alpha) * f q) → T g = T f) ∧
  (∀ f g : SchwartzMap ℝ ℂ, (∀ q, g q = f (q + n * alpha)) → T g = T f)

/-- The finite logical cyclic shift, independent of any physical syndrome. -/
def logicalCycle (n : ℕ) (c : Fin n → ℂ) (j : Fin n) : ℂ :=
  ∑ k : Fin n, if j.val = (k.val + 1) % n then c k else 0

/-- The finite logical clock, with source phase exp(+2*pi*i/n). -/
def logicalClock (n : ℕ) (c : Fin n → ℂ) (j : Fin n) : ℂ :=
  cisPhase (2 * Real.pi * j.val / n) * c j

/-- Section VI (46), PDF p.7: sign adapter from the pinned opposite-sign form.
Coordinates are grouped as alpha (p coefficient), then beta (q coefficient).
The imported sigma has upper-right +I, exactly the source Omega. -/
def gkpPair (N : ℕ) (x y : Phase N → ℝ) : ℝ :=
  -QAlgorithms.Papers.Independent.Frontier30.P10.symplecticPair x y

/-- Actual Schroedinger translation/modulation exp(i*sqrt(2*pi)*(alpha*p+beta*q)). -/
def schrodingerDisplacement (N : ℕ) (v : Phase N → ℝ) (psi : (Fin N → ℝ) → ℂ)
    (x : Fin N → ℝ) : ℂ :=
  cisPhase (Real.sqrt (2 * Real.pi) *
    ∑ i, v (Sum.inr i) * (x i + Real.sqrt (2 * Real.pi) * v (Sum.inl i) / 2)) *
      psi (fun i => x i + Real.sqrt (2 * Real.pi) * v (Sum.inl i))

/-- Lattice generated by the rows of M, not its columns. -/
def rowLattice {ι : Type*} [Fintype ι] (M : Matrix ι ι ℝ) : Set (ι → ℝ) :=
  {x | ∃ z : ι → ℤ, x = fun j => ∑ i, (z i : ℝ) * M i j}

/-- Source (50). -/
def latticeGram (N : ℕ) (M : Matrix (Phase N) (Phase N) ℝ) :=
  M * sigma N * M.transpose

/-- Integral entries of a real matrix. -/
def IntegralMatrix {ι : Type*} (A : Matrix ι ι ℝ) : Prop :=
  ∀ i j, ∃ k : ℤ, A i j = k

/-- Integer change of row basis with determinant +1 or -1. -/
def Unimodular {ι : Type*} [Fintype ι] [DecidableEq ι] (R : Matrix ι ι ℤ) : Prop :=
  R.det = 1 ∨ R.det = -1

/-- Symplectic dual lattice, in the source's integer-pairing convention. -/
def symplecticDual (N : ℕ) (L : Set (Phase N → ℝ)) : Set (Phase N → ℝ) :=
  {u | ∀ v ∈ L, ∃ k : ℤ, gkpPair N u v = k}

/-- The particular dual basis chosen by (55)–(59). -/
def dualGenerator (N : ℕ) (M : Matrix (Phase N) (Phase N) ℝ) :=
  (latticeGram N M)⁻¹ * M

/-- Euclidean integer dual; used only in the CSS construction. -/
def euclideanDual {ι : Type*} [Fintype ι] (L : Set (ι → ℝ)) : Set (ι → ℝ) :=
  {u | ∀ v ∈ L, ∃ k : ℤ, (∑ i, u i * v i) = k}

/-- Explicit position comb on the physical CSS p-translation lattice. -/
def cssComb (N : ℕ) (Mp : Matrix (Fin N) (Fin N) ℝ)
    (f : SchwartzMap (Fin N → ℝ) ℂ) : ℂ :=
  ∑' z : Fin N → ℤ, f (fun j => Real.sqrt (2 * Real.pi) * ∑ i, (z i : ℝ) * Mp i j)

/-- Nonzero common eigenfunctional for the CSS generators described in the source.
The displayed source block matrix uses the generator order (q,p); its physical Weyl
coordinates are adapted by swapping the two grouped coordinate blocks. -/
def HasCSSDistribution (N : ℕ) (Mq Mp : Matrix (Fin N) (Fin N) ℝ) : Prop :=
  ∃ T : SchwartzMap (Fin N → ℝ) ℂ →L[ℂ] ℂ, T ≠ 0 ∧
    (∀ f, T f = cssComb N Mp f) ∧
    (∀ i : Fin N, ∀ f g : SchwartzMap (Fin N → ℝ) ℂ,
      (∀ x, g x = f (fun j => x j + Real.sqrt (2 * Real.pi) * Mp i j)) → T g = T f) ∧
    (∀ i : Fin N, ∀ f g : SchwartzMap (Fin N → ℝ) ℂ,
      (∀ x, g x = cisPhase (Real.sqrt (2 * Real.pi) * ∑ j, Mq i j * x j) * f x) → T g = T f)

/-- Two-dimensional row hexagonal lattice in (68). -/
def hexVector (n : ℕ) (z : ℤ × ℤ) : ℝ × ℝ :=
  let s := Real.sqrt (2 * n / Real.sqrt 3)
  (s * (z.1 + z.2 / 2), s * Real.sqrt 3 * z.2 / 2)

/-- Euclidean plane norm, independent of the product-space max-norm instance. -/
def planeNorm (x : ℝ × ℝ) : ℝ := Real.sqrt (x.1 ^ 2 + x.2 ^ 2)

/-- Source dual lattice labels, not physical displacement coordinates. -/
def hexDualVector (n : ℕ) (z : ℤ × ℤ) : ℝ × ℝ :=
  ((hexVector n z).1 / n, (hexVector n z).2 / n)

/-- Equal-area square dual lattice, in source label coordinates. -/
def squareDualVector (n : ℕ) (z : ℤ × ℤ) : ℝ × ℝ :=
  ((z.1 : ℝ) / Real.sqrt n, (z.2 : ℝ) / Real.sqrt n)

/-- A sharp disjoint-open-ball radius, characterized by all separations and one attaining pair. -/
def IsSharpRadius (L : Set (ℝ × ℝ)) (r : ℝ) : Prop :=
  0 < r ∧ (∀ v ∈ L, ∀ w ∈ L, v ≠ w → 2 * r ≤ planeNorm (v - w)) ∧
    ∃ v ∈ L, ∃ w ∈ L, v ≠ w ∧ planeNorm (v - w) = 2 * r

/-- Centered Gaussian density with standard deviation sigma in one quadrature. -/
def quadratureGaussianDensity (sigma x : ℝ) : ℝ :=
  Real.exp (-x ^ 2 / (2 * sigma ^ 2)) / Real.sqrt (2 * Real.pi * sigma ^ 2)

/-- Nearest square-lattice correction, with a fixed half-open tie convention. -/
def squareParity (x : ℝ) : Bool :=
  decide ((Int.floor (x / Real.sqrt Real.pi + 1 / 2) : ℤ) % 2 = 1)

/-- Exact odd-cell mass, including harmless translations by two logical periods. -/
def squareErrorRate (sigma : ℝ) : ℝ :=
  ∫ x : ℝ, if squareParity x then quadratureGaussianDensity sigma x else 0

/-- Joint logical X/Z probability induced by independent quadrature displacements. -/
def squareJoint (sigma : ℝ) (a b : Bool) : ℝ :=
  ∫ x : ℝ, ∫ y : ℝ,
    if squareParity x = a ∧ squareParity y = b then
      quadratureGaussianDensity sigma x * quadratureGaussianDensity sigma y else 0

/-- Physical dual hexagonal lattice for one encoded qubit. -/
def physicalHex (z : ℤ × ℤ) : ℝ × ℝ :=
  (Real.sqrt (2 * Real.pi) * (hexDualVector 2 z).1,
   Real.sqrt (2 * Real.pi) * (hexDualVector 2 z).2)

/-- An actual nearest lattice point. The theorem below establishes existence for every input. -/
def hexNearest (x : ℝ × ℝ) : ℤ × ℤ :=
  Classical.epsilon (fun z => ∀ w, planeNorm (x - physicalHex z) ≤ planeNorm (x - physicalHex w))

/-- Logical Pauli probabilities under nearest-lattice recovery; stabilizers are even/even labels. -/
def hexProbability (sigma : ℝ) (a b : Fin 2) : ℝ :=
  ∫ x : ℝ × ℝ,
    if (hexNearest x).1 % 2 = (a.val : ℤ) ∧ (hexNearest x).2 % 2 = (b.val : ℤ)
      then quadratureGaussianDensity sigma x.1 * quadratureGaussianDensity sigma x.2 else 0

/-- Section IX: named ideal optical operations, with mode labels and actual real parameters. -/
inductive SymplecticOpticalGate (N : ℕ) where
  | phase (i : Fin N) (theta : ℝ)
  | beam (i j : Fin N) (theta : ℝ)
  | squeeze (i : Fin N) (ratio : ℝ)

/-- Legal optical parameters: two different beam modes, and finite positive squeeze ratios. -/
def SymplecticOpticalGate.Valid {N : ℕ} : SymplecticOpticalGate N → Prop
  | .phase _ _ => True
  | .beam i j _ => i ≠ j
  | .squeeze _ r => 0 < r

/-- Exact finite beam mixing, rather than the infinitesimal heuristic (99). -/
def realModeMixing {N : ℕ} (a b : Fin N) (theta : ℝ) : Matrix (Fin N) (Fin N) ℝ :=
  fun i j => if i = a ∧ j = a ∨ i = b ∧ j = b then Real.cos theta
    else if i = a ∧ j = b then Real.sin theta
    else if i = b ∧ j = a then -Real.sin theta
    else if i = j then 1 else 0

/-- Phase-space action of each named optical gate, in the source's grouped coordinate order. -/
def SymplecticOpticalGate.matrix {N : ℕ} : SymplecticOpticalGate N → Matrix (Phase N) (Phase N) ℝ
  | .phase k theta =>
      let A := Matrix.diagonal (fun i => if i = k then Real.cos theta else 1)
      let B := Matrix.diagonal (fun i => if i = k then Real.sin theta else 0)
      Matrix.fromBlocks A B (-B) A
  | .beam a b theta => Matrix.fromBlocks (realModeMixing a b theta) 0 0 (realModeMixing a b theta)
  | .squeeze k r => Matrix.fromBlocks
      (Matrix.diagonal (fun i => if i = k then r else 1)) 0 0
      (Matrix.diagonal (fun i => if i = k then r⁻¹ else 1))

/-- Gates are evaluated in time order. -/
def opticalEval {N : ℕ} (gates : List (SymplecticOpticalGate N)) : Matrix (Phase N) (Phase N) ℝ :=
  gates.foldl (fun A g => g.matrix * A) 1

/-- Section XI.A: photon-number-dependent atom phase; atom=false is g, atom=true is e. -/
def atomEvolution (lambda t : ℝ) (psi : ℕ × Bool → ℂ) (k : ℕ) (atom : Bool) : ℂ :=
  cisPhase (-lambda * t * k * (if atom then 1 else -1)) * psi (k, atom)

/-- The unnormalized oscillator branch after measuring the atom in the plus/minus basis. -/
def atomBranch (minus : Bool) (psi : ℕ → ℂ) (k : ℕ) : ℂ :=
  ((cisPhase (Real.pi * k / 4) + (if minus then -1 else 1) *
    cisPhase (-Real.pi * k / 4)) / 2) * psi k

/-- Number-sector projector, kept separate from any nonnormalizable ideal comb. -/
def numberSector (r : ℕ) (psi : ℕ → ℂ) (k : ℕ) : ℂ := if k % 4 = r then psi k else 0

/-- The paper's S, equal to the accepted T gate up to exp(-i*pi/8). -/
def paperS : Matrix Bool Bool ℂ := Matrix.diagonal (fun b => cisPhase (if b then Real.pi / 8 else -Real.pi / 8))

/-- Equation (112). -/
def hadamardPlus (b : Bool) : ℂ := if b then Real.sin (Real.pi / 8) else Real.cos (Real.pi / 8)

/-- Equation (114), normalized. -/
def magicState (b : Bool) : ℂ := cisPhase (if b then Real.pi / 8 else -Real.pi / 8) / (Real.sqrt 2 : ℂ)

/-- CNOT with data control and magic-state target, followed by the indicated target outcome. -/
def magicBranch (outcome : Bool) (psi : Bool → ℂ) (b : Bool) : ℂ :=
  psi b * magicState (xor outcome b)

/-- Equation (121), as a real polynomial phase. -/
def cubicLogicalPhase (alpha q : ℝ) : ℝ :=
  Real.pi / 4 * (2 * (q / alpha) ^ 3 + (q / alpha) ^ 2 - 2 * (q / alpha))

/-- Equation (126): ideal phase-resource wavefunction; no L2 normalization is asserted. -/
def injectionPhaseResource (phi : Polynomial ℝ) (q : ℝ) : ℂ :=
  cisPhase (phi.eval q)

/-- Product of the data wavefunction and the ideal target resource in Fig.6. -/
def injectionJointWave (phi : Polynomial ℝ) (psi : ℝ → ℂ) (q : ℝ × ℝ) : ℂ :=
  psi q.1 * injectionPhaseResource phi q.2

/-- Position-wavefunction pullback for the data-controlled inverse SUM of Fig.6.
The ket action is (q1,q2) ↦ (q1,q2-q1). -/
def injectionInverseSum (wave : (ℝ × ℝ) → ℂ) (q : ℝ × ℝ) : ℂ :=
  wave (q.1, q.2 + q.1)

/-- Ideal target-position outcome fiber. With the unnormalizable resource this is
conditional amplitude algebra, not a normalized outcome law. -/
def injectionPositionFiber (wave : (ℝ × ℝ) → ℂ) (a q : ℝ) : ℂ :=
  wave (q, a)

/-- Section XI.B (125)–(127): polynomial-phase feed-forward correction. -/
def phaseCorrection (phi : Polynomial ℝ) (a q : ℝ) : ℂ :=
  cisPhase (phi.eval q - phi.eval (q + a))

/-- A finite positive coordinate squeeze, with the L2 normalization retained. -/
def squeezeWave (r : ℝ) (psi : ℝ → ℂ) (q : ℝ) : ℂ :=
  (Real.sqrt r : ℂ)⁻¹ * psi (q / r)

/-- Cubic phase gate, on actual data wavefunctions. -/
def cubicWave (gamma : ℝ) (psi : ℝ → ℂ) (q : ℝ) : ℂ :=
  cisPhase (gamma * q ^ 3) * psi q

/-- Actual three-qubit gates used in Fig.7; the Boolean flag chooses S inverse. -/
inductive ShorGate where
  | phase (inverse : Bool) (target : Fin 3)
  | cx (control target : Fin 3)
  deriving DecidableEq

/-- Exact matrix of a gate, rather than an independent resource counter. -/
def ShorGate.matrix : ShorGate → Matrix (Fin 3 → Bool) (Fin 3 → Bool) ℂ
  | .phase inv t => Matrix.diagonal (fun b =>
      cisPhase ((if inv then -1 else 1) * (if b t then Real.pi / 8 else -Real.pi / 8)))
  | .cx c t => fun a b => if a = Function.update b t (xor (b t) (b c)) then 1 else 0

/-- Fig.7(a), read left to right. -/
def controlledPhaseWord (c t : Fin 3) : List ShorGate :=
  [.cx c t, .phase true t, .cx c t, .phase false c, .phase false t]

/-- The actual inverse of the preceding circuit. -/
def inverseControlledPhaseWord (c t : Fin 3) : List ShorGate :=
  [.phase true t, .phase true c, .cx c t, .phase false t, .cx c t]

/-- Fig.7(b), with both controlled P and controlled P inverse expanded. -/
def shorWord : List ShorGate :=
  [.cx 1 2] ++ inverseControlledPhaseWord 0 2 ++ [.cx 1 2] ++
    controlledPhaseWord 0 2 ++ controlledPhaseWord 0 1

/-- Matrix of a chronological gate list. -/
def shorEval (gates : List ShorGate) : Matrix (Fin 3 → Bool) (Fin 3 → Bool) ℂ :=
  gates.foldl (fun A g => g.matrix * A) 1

/-- Equation (153). -/
def ccz : Matrix (Fin 3 → Bool) (Fin 3 → Bool) ℂ :=
  Matrix.diagonal (fun b => if b 0 && b 1 && b 2 then -1 else 1)

/-- The state in (150), with its actual normalized amplitudes. -/
def shorState (b : Fin 3 → Bool) : ℂ :=
  (if b 0 && b 1 && b 2 then -1 else 1) / (Real.sqrt 8 : ℂ)

/-- CZ on the two other wires followed by X on wire k, one of the three Shor stabilizers. -/
def shorStabilizer (k : Fin 3) : Matrix (Fin 3 → Bool) (Fin 3 → Bool) ℂ :=
  fun a b => if a = Function.update b k (!(b k)) then
    (if ∀ j : Fin 3, j ≠ k → b j = true then -1 else 1) else 0

/-- Normalized finite-mode pure Gaussian wavefunctions. Positivity of the real quadratic
form excludes infinite squeezing, and symmetry fixes the actual quadratic coefficient. -/
def IsGaussianWave (N : ℕ) (psi : (Fin N → ℝ) → ℂ) : Prop :=
  (∃ (c : ℂ) (A : Matrix (Fin N) (Fin N) ℂ) (B : Fin N → ℂ),
    A.transpose = A ∧ c ≠ 0 ∧
    (∀ x : Fin N → ℝ, x ≠ 0 → 0 < ∑ i, ∑ j, (A i j).re * x i * x j) ∧
    ∀ x, psi x = c * Complex.exp
      (-(∑ i, ∑ j, A i j * (x i : ℂ) * x j) + ∑ i, B i * x i)) ∧
  MemLp psi 2 volume ∧ (∫ x : Fin N → ℝ, ‖psi x‖ ^ 2) = 1

/-- Generators of finite affine multimode metaplectic circuits. Fourier, quadratic phases,
positive squeezes, beam mixing and displacements generate the affine symplectic operations. -/
inductive GaussianGate (N : ℕ) where
  | fourier (mode : Fin N)
  | quadratic (B : Matrix (Fin N) (Fin N) ℝ)
  | squeeze (mode : Fin N) (r : ℝ)
  | beam (a b : Fin N) (theta : ℝ)
  | displacement (u v : Fin N → ℝ)

/-- Infinite squeezing and coincident beam modes are excluded. -/
def GaussianGate.Valid {N : ℕ} : GaussianGate N → Prop
  | .squeeze _ r => 0 < r
  | .beam a b _ => a ≠ b
  | _ => True

/-- Actual integral/multiplier action on position wavefunctions, including exact finite mixing. -/
def GaussianGate.act {N : ℕ} : GaussianGate N → ((Fin N → ℝ) → ℂ) → ((Fin N → ℝ) → ℂ)
  | .fourier k, psi => fun x => (Real.sqrt (2 * Real.pi) : ℂ)⁻¹ *
      ∫ q : ℝ, cisPhase (-(x k) * q) * psi (Function.update x k q)
  | .quadratic B, psi => fun x => cisPhase ((∑ i, ∑ j, B i j * x i * x j) / 2) * psi x
  | .squeeze k r, psi => fun x => (Real.sqrt r : ℂ)⁻¹ * psi (Function.update x k (x k / r))
  | .beam a b theta, psi => fun x => psi ((realModeMixing a b theta).transpose.mulVec x)
  | .displacement u v, psi => fun x =>
      cisPhase (∑ i, v i * (x i - u i / 2)) * psi (fun i => x i - u i)

/-- Finite, chronological composition, including mixing with other Gaussian modes. -/
def gaussianEval {N : ℕ} (gates : List (GaussianGate N)) (psi : (Fin N → ℝ) → ℂ) :
    (Fin N → ℝ) → ℂ :=
  gates.foldl (fun state g => g.act state) psi

/-- Physical wavefunctions embedded as ordinary regular distributions. -/
def regularFunctional (N : ℕ) (psi : (Fin N → ℝ) → ℂ)
    (f : SchwartzMap (Fin N → ℝ) ℂ) : ℂ := ∫ q : Fin N → ℝ, psi q * f q

/-- Explicit tensor product of ideal position combs, with arbitrary logical coefficients. -/
def tensorComb (N n : ℕ) (alpha : ℝ) (c : (Fin N → Fin n) → ℂ)
    (f : SchwartzMap (Fin N → ℝ) ℂ) : ℂ :=
  ∑ j : Fin N → Fin n, c j * ∑' z : Fin N → ℤ,
    f (fun i => combSupportPoint n alpha (j i) (z i))

/-- Sanity check of the scalar phase convention. -/

example : cisPhase 0 = 1 := by simp [cisPhase]

example : wignerSign 1 1 = -1 ∧ wignerSign 0 1 = 1 := by norm_num [wignerSign]

example (n : ℕ) (alpha : ℝ) : idealComb n alpha 0 = 0 := by
  funext f
  simp [idealComb]

example (psi : ℝ → ℂ) : phaseCorrection 0 3 7 * psi 7 = psi 7 := by
  simp [phaseCorrection, cisPhase]

example : opticalEval ([] : List (SymplecticOpticalGate 1)) = 1 := rfl

example : shorEval [] = 1 := rfl

example (wave : (ℝ × ℝ) → ℂ) (q : ℝ × ℝ) :
    injectionInverseSum wave q = wave (q.1, q.2 + q.1) := rfl

example (psi : ℝ → ℂ) (a : ℝ) :
    injectionPositionFiber (injectionJointWave 0 psi) a = psi := by
  funext q
  simp [injectionPositionFiber, injectionJointWave, injectionPhaseResource, cisPhase]

example (d : ℕ) (psi : ZMod d → ℂ) : finiteError d 0 0 psi = psi := by
  funext j
  simp [finiteError, cisPhase]

example (r : ℕ) (psi : ℕ → ℂ) : numberSector r (numberSector r psi) = numberSector r psi := by
  funext k
  by_cases hk : k % 4 = r <;> simp [numberSector, hk]

example : oscillatorVacuumProfile 0 = (Real.rpow Real.pi (-(1 : ℝ) / 4) : ℂ) := by
  simp [oscillatorVacuumProfile, QAlgorithms.Papers.Independent.Next46.P16.vacuumWave]

example (x y : Phase 0 → ℝ) : gkpPair 0 x y = 0 := by
  simp [gkpPair, QAlgorithms.Papers.Independent.Frontier30.P10.symplecticPair]

end QAlgorithms.Papers.Independent.Intakenext100.P12
Source
Encoding a qubit in an oscillator, arXiv:quant-ph/0008040v3, https://arxiv.org/abs/quant-ph/0008040v3
Read-back

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

QAlgorithms.Papers.Independent.Intakenext100.P12.CellHilbert

For every natural number nnn and real number α\alphaα, this abbreviates the complex L2L^2L2 space for Lebesgue measure on R2\mathbb R^2R2 restricted to

En,α={(u,v):∣u∣<α2, ∣v∣<πnα}.E_{n,\alpha} =\left\{(u,v):|u|<\frac{\alpha}{2},\ |v|<\frac{\pi}{n\alpha}\right\}.En,α​={(u,v):∣u∣<2α​, ∣v∣<nαπ​}.

Its elements are equivalence classes of square-integrable complex functions, identified when they agree almost everywhere for that restricted measure. There are no positivity assumptions; division by zero is zero, and if n=0n=0n=0 or α≤0\alpha\le0α≤0, the restricted set is empty and this L2L^2L2 space is the zero space.

QAlgorithms.Papers.Independent.Intakenext100.P12.FiniteCodeConclusion

For natural numbers d,r1,r2,nd,r_1,r_2,nd,r1​,r2​,n with d≠0d\ne0d=0, this defines a proposition as follows. Put D=Z/dZD=\mathbb Z/d\mathbb ZD=Z/dZ, write val⁡(x)∈{0,…,d−1}\operatorname{val}(x)\in\{0,\ldots,d-1\}val(x)∈{0,…,d−1} for a residue representative, and define

Wj(x)=1r2∑k=0r2−11{x=r1(j+nk)},V(c)(x)=∑j=0n−1c(j)Wj(x),(Ea,bψ)(x)=e 2πibval⁡(x−a)/dψ(x−a).W_j(x)=\frac{1}{\sqrt{r_2}}\sum_{k=0}^{r_2-1}\mathbf1_{\{x=r_1(j+nk)\}}, \qquad V(c)(x)=\sum_{j=0}^{n-1}c(j)W_j(x), \qquad (E_{a,b}\psi)(x)= e^{\,2\pi i b\operatorname{val}(x-a)/d}\psi(x-a).Wj​(x)=r2​​1​k=0∑r2​−1​1{x=r1​(j+nk)}​,V(c)(x)=j=0∑n−1​c(j)Wj​(x),(Ea,b​ψ)(x)=e2πibval(x−a)/dψ(x−a).

Let CCC be the complex span of the WjW_jWj​ in Euclidean space on DDD, and let E\mathcal EE be the complex span of the matrices Fa,b(x,y)=1{x=y+a}e 2πibval⁡(y)/dF_{a,b}(x,y)=\mathbf1_{\{x=y+a\}}e^{\,2\pi i b\operatorname{val}(y)/d}Fa,b​(x,y)=1{x=y+a}​e2πibval(y)/d for integer pairs satisfying ∣a∣<r1/2|a|<r_1/2∣a∣<r1​/2 and ∣b∣<r2/2|b|<r_2/2∣b∣<r2​/2. For e=((u,v),j)e=((u,v),j)e=((u,v),j) in I=({0,…,r1−1}×{0,…,r2−1})×{0,…,n−1}I=(\{0,\ldots,r_1-1\}\times\{0,\ldots,r_2-1\})\times\{0,\ldots,n-1\}I=({0,…,r1​−1}×{0,…,r2​−1})×{0,…,n−1}, put Se=Eu,vWjS_e=E_{u,v}W_jSe​=Eu,v​Wj​. The proposition is the conjunction of these eight requirements: (1) for every function ψ:D→C\psi:D\to\mathbb Cψ:D→C, the two equalities Er1n,0ψ=ψE_{r_1n,0}\psi=\psiEr1​n,0​ψ=ψ and E0,r2nψ=ψE_{0,r_2n}\psi=\psiE0,r2​n​ψ=ψ hold if and only if there exists a coefficient function ccc with V(c)=ψV(c)=\psiV(c)=ψ; (2) for every two coefficient functions c,c′c,c'c,c′, ∑x∈DV(c)(x)‾V(c′)(x)=∑j=0n−1c(j)‾c′(j)\sum_{x\in D}\overline{V(c)(x)}V(c')(x)=\sum_{j=0}^{n-1}\overline{c(j)}c'(j)∑x∈D​V(c)(x)​V(c′)(x)=∑j=0n−1​c(j)​c′(j); (3) there exists a map RRR on complex matrices on DDD admitting a finite Kraus representation

R(X)=∑ℓ=0m−1KℓXKℓ†for every matrix X,∑ℓ=0m−1Kℓ†Kℓ=I,R(X)=\sum_{\ell=0}^{m-1}K_\ell X K_\ell^\dagger \quad\text{for every matrix }X, \qquad \sum_{\ell=0}^{m-1}K_\ell^\dagger K_\ell=I,R(X)=ℓ=0∑m−1​Kℓ​XKℓ†​for every matrix X,ℓ=0∑m−1​Kℓ†​Kℓ​=I,

for some natural number mmm and matrices KℓK_\ellKℓ​, such that, for every matrix E∈EE\in\mathcal EE∈E and every ψ∈C\psi\in Cψ∈C with ∥ψ∥=1\|\psi\|=1∥ψ∥=1,

R ⁣((Eψ)(Eψ)†)=∥Eψ∥2ψψ†;R\!\left((E\psi)(E\psi)^\dagger\right) =\|E\psi\|^2\psi\psi^\dagger;R((Eψ)(Eψ)†)=∥Eψ∥2ψψ†;

(4) every WjW_jWj​ is fixed by both Er1n,0E_{r_1n,0}Er1​n,0​ and E0,r2nE_{0,r_2n}E0,r2​n​; (5) for every j<nj<nj<n, Er1,0Wj=W(j+1) mod nE_{r_1,0}W_j=W_{(j+1)\bmod n}Er1​,0​Wj​=W(j+1)modn​ and E0,r2Wj=e2πij/nWjE_{0,r_2}W_j=e^{2\pi i j/n}W_jE0,r2​​Wj​=e2πij/nWj​; (6) for all e,f∈Ie,f\in Ie,f∈I, ∑x∈DSe(x)‾Sf(x)\sum_{x\in D}\overline{S_e(x)}S_f(x)∑x∈D​Se​(x)​Sf​(x) is 111 if e=fe=fe=f and 000 otherwise; (7) the complex span of all SeS_eSe​ is the entire function space D→CD\to\mathbb CD→C; and (8) for all integers a,b,a′,b′a,b,a',b'a,b,a′,b′ satisfying both strict window conditions, and all coefficient functions c,c′c,c'c,c′,

∑x∈D(Ea,bV(c))(x)‾(Ea′,b′V(c′))(x)={∑j=0n−1c(j)‾c′(j),(a,b)=(a′,b′),0,(a,b)≠(a′,b′).\sum_{x\in D}\overline{(E_{a,b}V(c))(x)}(E_{a',b'}V(c'))(x) = \begin{cases} \displaystyle\sum_{j=0}^{n-1}\overline{c(j)}c'(j),&(a,b)=(a',b'),\\ 0,&(a,b)\ne(a',b'). \end{cases}x∈D∑​(Ea,b​V(c))(x)​(Ea′,b′​V(c′))(x)=⎩⎨⎧​j=0∑n−1​c(j)​c′(j),0,​(a,b)=(a′,b′),(a,b)=(a′,b′).​

Here 1\mathbf11 denotes an indicator, vector outer products have entries ψ(x)ψ(y)‾\psi(x)\overline{\psi(y)}ψ(x)ψ(y)​, and vector norms are Euclidean. No positivity assumption on r1,r2,nr_1,r_2,nr1​,r2​,n or arithmetic relation among the parameters is part of this definition. Empty sums are 000 and 0−1=00^{-1}=00−1=0; the cyclic-index assertion has no instances when n=0n=0n=0. If n=0n=0n=0, r1=0r_1=0r1​=0, or r2=0r_2=0r2​=0, the syndrome family is empty, so requirement (7) cannot hold because d≠0d\ne0d=0 makes the ambient function space nonzero.

QAlgorithms.Papers.Independent.Intakenext100.P12.GaussianGate.Valid

For any natural number NNN and any formal instruction on NNN modes, this predicate holds for a squeeze instruction exactly when its real parameter rrr is strictly positive, and for a beam instruction exactly when its two mode indices are distinct. It holds unconditionally for Fourier, quadratic, and displacement instructions, so in particular the quadratic matrix is unrestricted.

QAlgorithms.Papers.Independent.Intakenext100.P12.GaussianGate.act

For every natural number NNN, formal instruction ggg, and arbitrary function ψ:RN→C\psi:\mathbb R^N\to\mathbb Cψ:RN→C, this defines a new function by the following formulas, with x[k←q]x[k\leftarrow q]x[k←q] denoting replacement of coordinate kkk:

(Fourier⁡kψ)(x)=12π∫Re−ixkqψ(x[k←q]) dq,(Quadratic⁡Bψ)(x)=ei2∑i,jBijxixjψ(x),(Squeeze⁡k,rψ)(x)=1rψ(x[k←xk/r]),(Beam⁡a,b,θψ)(x)=ψ(RTx),(Displacement⁡u,vψ)(x)=ei∑ivi(xi−ui/2)ψ(x−u).\begin{aligned} (\operatorname{Fourier}_k\psi)(x) &=\frac1{\sqrt{2\pi}}\int_{\mathbb R}e^{-ix_kq}\psi(x[k\leftarrow q])\,dq,\\ (\operatorname{Quadratic}_B\psi)(x) &=e^{\frac i2\sum_{i,j}B_{ij}x_i x_j}\psi(x),\\ (\operatorname{Squeeze}_{k,r}\psi)(x) &=\frac1{\sqrt r}\psi(x[k\leftarrow x_k/r]),\\ (\operatorname{Beam}_{a,b,\theta}\psi)(x) &=\psi(R^{\mathsf T}x),\\ (\operatorname{Displacement}_{u,v}\psi)(x) &=e^{i\sum_i v_i(x_i-u_i/2)}\psi(x-u). \end{aligned}(Fourierk​ψ)(x)(QuadraticB​ψ)(x)(Squeezek,r​ψ)(x)(Beama,b,θ​ψ)(x)(Displacementu,v​ψ)(x)​=2π​1​∫R​e−ixk​qψ(x[k←q])dq,=e2i​∑i,j​Bij​xi​xj​ψ(x),=r​1​ψ(x[k←xk​/r]),=ψ(RTx),=ei∑i​vi​(xi​−ui​/2)ψ(x−u).​

Here BBB is real, and RijR_{ij}Rij​ is cos⁡θ\cos\thetacosθ if (i,j)=(a,a)(i,j)=(a,a)(i,j)=(a,a) or (b,b)(b,b)(b,b); otherwise it is sin⁡θ\sin\thetasinθ if (i,j)=(a,b)(i,j)=(a,b)(i,j)=(a,b), otherwise −sin⁡θ-\sin\theta−sinθ if (i,j)=(b,a)(i,j)=(b,a)(i,j)=(b,a), otherwise 111 if i=ji=ji=j, and 000 otherwise, with these cases taken in the stated order. No validity, Gaussian, or integrability hypothesis is required: a=ba=ba=b is allowed, and when r≤0r\le0r≤0, the real square root and its totalized inverse make the squeeze output identically zero; division by zero is interpreted as zero. The Fourier integral is the totalized Bochner integral, which is zero when its integrand is not integrable.

QAlgorithms.Papers.Independent.Intakenext100.P12.GaussianGate

For every natural number NNN, this introduces a type of formal instructions with five constructors: a Fourier instruction carrying a mode k∈{0,…,N−1}k\in\{0,\ldots,N-1\}k∈{0,…,N−1}; a quadratic instruction carrying an arbitrary real N×NN\times NN×N matrix BBB; a squeeze instruction carrying a mode kkk and an arbitrary real parameter rrr; a beam instruction carrying modes a,ba,ba,b and an arbitrary real angle θ\thetaθ; and a displacement instruction carrying two vectors u,v∈RNu,v\in\mathbb R^Nu,v∈RN. These constructors impose no symmetry condition on BBB, positivity condition on rrr, or distinctness condition on a,ba,ba,b. For N=0N=0N=0, constructors requiring a mode have no instances, while the quadratic and displacement constructors remain available.

QAlgorithms.Papers.Independent.Intakenext100.P12.HasCSSDistribution

For every natural number NNN and real N×NN\times NN×N matrices Mq,MpM_q,M_pMq​,Mp​, this property means that there exists a nonzero continuous complex-linear functional TTT on the space of complex-valued Schwartz functions on RN\mathbb R^NRN such that, for every such fff,

T(f)=∑z∈ZNf ⁣((2π∑ℓ=0N−1zℓ(Mp)ℓj)j=0N−1).T(f)=\sum_{z\in\mathbb Z^N} f\!\left(\left(\sqrt{2\pi}\sum_{\ell=0}^{N-1}z_\ell(M_p)_{\ell j}\right)_{j=0}^{N-1}\right).T(f)=z∈ZN∑​f​(2π​ℓ=0∑N−1​zℓ​(Mp​)ℓj​)j=0N−1​​.

Additionally, for every 0≤i<N0\le i<N0≤i<N and every pair of Schwartz functions f,gf,gf,g, each of the following pointwise identities implies T(g)=T(f)T(g)=T(f)T(g)=T(f): g(x)=f((xj+2π(Mp)ij)j)g(x)=f((x_j+\sqrt{2\pi}(M_p)_{ij})_j)g(x)=f((xj​+2π​(Mp​)ij​)j​) for every xxx, or g(x)=exp⁡(i2π∑j(Mq)ijxj)f(x)g(x)=\exp(i\sqrt{2\pi}\sum_j(M_q)_{ij}x_j)f(x)g(x)=exp(i2π​∑j​(Mq​)ij​xj​)f(x) for every xxx. The infinite sum has value 000 if its family is not summable. The definition permits N=0N=0N=0, when the invariance conditions have no indices and the displayed sum is evaluation at the unique point of R0\mathbb R^0R0.

QAlgorithms.Papers.Independent.Intakenext100.P12.HasExactRealization

For every natural number nnn and real number α\alphaα, put

E={(u,v):∣u∣<α2, ∣v∣<πnα},HE=L2(R2,1E dudv;C).E=\left\{(u,v):|u|<\frac{\alpha}{2},\ |v|<\frac{\pi}{n\alpha}\right\}, \qquad H_E=L^2(\mathbb R^2,\mathbf1_E\,dudv;\mathbb C).E={(u,v):∣u∣<2α​, ∣v∣<nαπ​},HE​=L2(R2,1E​dudv;C).

This property asserts the existence of a complex-linear isometry

U:⨁j=0n−1HE⟶L2(R,dq;C),U:\bigoplus_{j=0}^{n-1}H_E\longrightarrow L^2(\mathbb R,dq;\mathbb C),U:j=0⨁n−1​HE​⟶L2(R,dq;C),

where the finite direct sum has norm ∥(ηj)j∥2=∑j∥ηj∥2\|(\eta_j)_j\|^2=\sum_j\|\eta_j\|^2∥(ηj​)j​∥2=∑j​∥ηj​∥2. For every coefficient function c:{0,…,n−1}→Cc:\{0,\ldots,n-1\}\to\mathbb Cc:{0,…,n−1}→C and every η∈HE\eta\in H_Eη∈HE​, let η~\widetilde\etaη​ be its chosen function representative on EEE, extended by zero outside EEE; then, for Lebesgue almost every qqq,

U((cjη)j)(q)=nα2π∑j=0n−1cj∑k∈Z∫Rη~(q−α(j+nk),v)e iv(q+α(j+nk))/2 dv.U((c_j\eta)_j)(q) = \sqrt{\frac{n\alpha}{2\pi}} \sum_{j=0}^{n-1}c_j\sum_{k\in\mathbb Z} \int_{\mathbb R} \widetilde\eta\bigl(q-\alpha(j+nk),v\bigr) e^{\,iv(q+\alpha(j+nk))/2}\,dv.U((cj​η)j​)(q)=2πnα​​j=0∑n−1​cj​k∈Z∑​∫R​η​(q−α(j+nk),v)eiv(q+α(j+nk))/2dv.

The exceptional null set may depend on ccc and η\etaη, and surjectivity of UUU is not required. Integrals and infinite sums are totalized to zero when not integrable or not summable. No positivity assumptions are imposed: division by zero is zero, and when n=0n=0n=0 or α≤0\alpha\le0α≤0, EEE and the domain Hilbert space are zero and the displayed right-hand side is zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.IdealMeterReadout

For a complex number β\betaβ and an arbitrary function R:(N→C)→CR:(\mathbb N\to\mathbb C)\to\mathbb CR:(N→C)→C, this predicate means that β≠0\beta\ne0β=0 and, for every real θ\thetaθ,

R ⁣(k⟼e−∣βe−iθ∣2/2(βe−iθ)kk!)=eiθ.R\!\left( k\longmapsto e^{-|\beta e^{-i\theta}|^2/2} \frac{(\beta e^{-i\theta})^k}{\sqrt{k!}} \right)=e^{i\theta}.R(k⟼e−∣βe−iθ∣2/2k!​(βe−iθ)k​)=eiθ.

No linearity, continuity, measurability, or other condition on RRR is included. For β=0\beta=0β=0, the predicate is false.

QAlgorithms.Papers.Independent.Intakenext100.P12.IntegralMatrix

For any index type ι\iotaι and any real matrix AAA with both rows and columns indexed by ι\iotaι, this predicate means that for every pair i,j∈ιi,j\in\iotai,j∈ι there exists an integer kkk, regarded as a real number, such that Aij=kA_{ij}=kAij​=k. The index type need not be finite; when it is empty, the condition holds vacuously.

QAlgorithms.Papers.Independent.Intakenext100.P12.IsGaussianWave

For every natural number NNN, including N=0N=0N=0, and every function ψ:RN→C\psi:\mathbb R^N\to\mathbb Cψ:RN→C, this predicate means that there exist c∈Cc\in\mathbb Cc∈C, a complex N×NN\times NN×N matrix AAA, and B∈CNB\in\mathbb C^NB∈CN such that AT=AA^{\mathsf T}=AAT=A, c≠0c\ne0c=0, ∑i,jRe⁡(Aij)xixj>0\sum_{i,j}\operatorname{Re}(A_{ij})x_i x_j>0∑i,j​Re(Aij​)xi​xj​>0 for every nonzero real vector xxx, and, pointwise for every x∈RNx\in\mathbb R^Nx∈RN,

ψ(x)=cexp⁡ ⁣(−∑i,jAijxixj+∑iBixi);\psi(x)=c\exp\!\left(-\sum_{i,j}A_{ij}x_i x_j+\sum_i B_i x_i\right);ψ(x)=cexp(−i,j∑​Aij​xi​xj​+i∑​Bi​xi​);

it additionally requires that ψ\psiψ belong to L2L^2L2 with respect to Lebesgue measure and that ∫RN∣ψ(x)∣2 dx=1\int_{\mathbb R^N}|\psi(x)|^2\,dx=1∫RN​∣ψ(x)∣2dx=1. When N=0N=0N=0, the sums are empty and the condition on nonzero vectors is vacuous.

QAlgorithms.Papers.Independent.Intakenext100.P12.IsIdealStabilized

For any natural number nnn, real number α\alphaα, and function T:S(R;C)→CT:\mathcal S(\mathbb R;\mathbb C)\to\mathbb CT:S(R;C)→C, where S(R;C)\mathcal S(\mathbb R;\mathbb C)S(R;C) is the space of complex Schwartz functions, this predicate means that TTT agrees everywhere with a continuous complex-linear functional, and that for every pair of Schwartz functions f,gf,gf,g, both of the following implications hold: if g(q)=ei2πq/αf(q)g(q)=e^{i2\pi q/\alpha}f(q)g(q)=ei2πq/αf(q) for every real qqq, then T(g)=T(f)T(g)=T(f)T(g)=T(f); and if g(q)=f(q+nα)g(q)=f(q+n\alpha)g(q)=f(q+nα) for every real qqq, then T(g)=T(f)T(g)=T(f)T(g)=T(f). No positivity assumption on nnn or α\alphaα is imposed. Division by zero has value zero, so when α=0\alpha=0α=0 both invariance conditions are automatic; the translation condition is also automatic whenever n=0n=0n=0. The zero functional is included.

QAlgorithms.Papers.Independent.Intakenext100.P12.IsRotorStabilized

For natural numbers n,rn,rn,r and an arbitrary function ψ:Z→C\psi:\mathbb Z\to\mathbb Cψ:Z→C, this predicate means that both identities

ψ(L−nr)=ψ(L),e−2πiL/rψ(L)=ψ(L)\psi(L-nr)=\psi(L),\qquad e^{-2\pi iL/r}\psi(L)=\psi(L)ψ(L−nr)=ψ(L),e−2πiL/rψ(L)=ψ(L)

hold for every integer LLL. The first subtraction takes place in Z\mathbb ZZ, and the second identity uses real division. No normalization or summability is required. If r=0r=0r=0, division by zero gives zero, both identities are automatic, and every ψ\psiψ satisfies the predicate. If n=0n=0n=0, the first identity is automatic while the second remains required.

QAlgorithms.Papers.Independent.Intakenext100.P12.IsSharpRadius

For a set L⊆R2L\subseteq\mathbb R^2L⊆R2 and a real number rrr, this predicate means that r>0r>0r>0, that every two distinct points v,w∈Lv,w\in Lv,w∈L satisfy

2r≤(v1−w1)2+(v2−w2)2,2r\le \sqrt{(v_1-w_1)^2+(v_2-w_2)^2},2r≤(v1​−w1​)2+(v2​−w2​)2​,

and that there exist distinct v,w∈Lv,w\in Lv,w∈L for which equality holds. In particular, the predicate requires an attaining pair of distinct points and cannot hold for an empty set or a singleton.

QAlgorithms.Papers.Independent.Intakenext100.P12.ShorGate.matrix

This assigns to each gate description a complex matrix whose rows and columns are indexed by Boolean triples. For a phase description with inverse flag vvv and target ttt, the matrix is diagonal, with entry at a triple bbb equal to

exp⁡ ⁣(i εv{π/8,bt=true,−π/8,bt=false,),εv={−1,v=true,1,v=false.\exp\!\left(i\,\varepsilon_v \begin{cases}\pi/8,&b_t=\mathrm{true},\\-\pi/8,&b_t=\mathrm{false},\end{cases}\right), \qquad \varepsilon_v=\begin{cases}-1,&v=\mathrm{true},\\1,&v=\mathrm{false}.\end{cases}exp(iεv​{π/8,−π/8,​bt​=true,bt​=false,​),εv​={−1,1,​v=true,v=false.​

For a controlled-X description with control ccc and target ttt, its entry in row aaa, column bbb is 111 exactly when aaa is obtained from bbb by replacing bit ttt with btxorbcb_t\mathbin{\mathrm{xor}}b_cbt​xorbc​, and is 000 otherwise. The indices c,tc,tc,t may be equal; in that case the replaced target bit is always false.

QAlgorithms.Papers.Independent.Intakenext100.P12.ShorGate

This defines a type of gate descriptions with exactly two constructors: a phase description specified by a Boolean inverse flag and a target in {0,1,2}\{0,1,2\}{0,1,2}, and a controlled-X description specified by a control and a target in {0,1,2}\{0,1,2\}{0,1,2}. The control and target may coincide. Equality between descriptions is decidable.

QAlgorithms.Papers.Independent.Intakenext100.P12.SupportedError

For every natural number nnn, real number α\alphaα, and function η:R2→C\eta:\mathbb R^2\to\mathbb Cη:R2→C, this property means that η\etaη is almost everywhere strongly measurable and has finite L2L^2L2 norm with respect to Lebesgue measure on R2\mathbb R^2R2, and that, for Lebesgue almost every (u,v)(u,v)(u,v),

(u,v)∉{(u,v):∣u∣<α2, ∣v∣<πnα}⟹η(u,v)=0.(u,v)\notin \left\{(u,v):|u|<\frac{\alpha}{2},\ |v|<\frac{\pi}{n\alpha}\right\} \quad\Longrightarrow\quad \eta(u,v)=0.(u,v)∈/{(u,v):∣u∣<2α​, ∣v∣<nαπ​}⟹η(u,v)=0.

The vanishing requirement is almost everywhere, rather than pointwise. There are no positivity assumptions on nnn or α\alphaα; with division by zero defined as zero, the displayed set is empty if n=0n=0n=0 or α≤0\alpha\le0α≤0, and in those cases the property requires η=0\eta=0η=0 almost everywhere.

QAlgorithms.Papers.Independent.Intakenext100.P12.SymplecticOpticalGate.Valid

For every natural number NNN, this defines a predicate on the three kinds of gate descriptions: every phase gate is valid, regardless of its real angle; a beam gate with indices i,j∈{0,…,N−1}i,j\in\{0,\ldots,N-1\}i,j∈{0,…,N−1} is valid exactly when i≠ji\ne ji=j, regardless of its real angle; and a squeeze gate with real ratio rrr is valid exactly when 0<r0<r0<r. Thus zero and negative squeeze ratios are excluded by this predicate, although they remain permitted in the underlying gate descriptions. For N=0N=0N=0, there are no gate descriptions to which the predicate can be applied.

QAlgorithms.Papers.Independent.Intakenext100.P12.SymplecticOpticalGate.matrix

For every natural number NNN, this assigns each gate description a real matrix indexed by two disjoint copies of {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}, hence a 2N×2N2N\times2N2N×2N block matrix. A phase gate at index kkk with real angle θ\thetaθ is assigned

(AB−BA),A=diag⁡(ai),ai={cos⁡θi=k,1i≠k,B=diag⁡(bi),bi={sin⁡θi=k,0i≠k.\begin{pmatrix}A&B\\-B&A\end{pmatrix}, \qquad A=\operatorname{diag}(a_i),\quad a_i=\begin{cases}\cos\theta&i=k,\\1&i\ne k,\end{cases} \qquad B=\operatorname{diag}(b_i),\quad b_i=\begin{cases}\sin\theta&i=k,\\0&i\ne k.\end{cases}(A−B​BA​),A=diag(ai​),ai​={cosθ1​i=k,i=k,​B=diag(bi​),bi​={sinθ0​i=k,i=k.​

A beam gate with indices a,ba,ba,b and angle θ\thetaθ is assigned diag⁡(R,R)\operatorname{diag}(R,R)diag(R,R), where, when a≠ba\ne ba=b, RRR is the identity outside those two indices and has block (cos⁡θsin⁡θ−sin⁡θcos⁡θ)\begin{pmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{pmatrix}(cosθ−sinθ​sinθcosθ​) in the ordered indices a,ba,ba,b; when a=ba=ba=b, RRR is diagonal with entry cos⁡θ\cos\thetacosθ at aaa and 111 elsewhere. A squeeze gate at index kkk with real ratio rrr is assigned

(D00E),Dii={ri=k,1i≠k,Eii={r−1i=k,1i≠k.\begin{pmatrix}D&0\\0&E\end{pmatrix}, \qquad D_{ii}=\begin{cases}r&i=k,\\1&i\ne k,\end{cases} \qquad E_{ii}=\begin{cases}r^{-1}&i=k,\\1&i\ne k.\end{cases}(D0​0E​),Dii​={r1​i=k,i=k,​Eii​={r−11​i=k,i=k.​

No validity assumption is required: coincident beam indices and nonpositive squeeze ratios are included, and r−1=0r^{-1}=0r−1=0 when r=0r=0r=0. For N=0N=0N=0, there are no gate descriptions to map.

QAlgorithms.Papers.Independent.Intakenext100.P12.SymplecticOpticalGate

For every natural number NNN, this defines a type of formal gate descriptions with three constructors: a phase gate carrying an index i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1} and an arbitrary real angle θ\thetaθ; a beam gate carrying two indices i,j∈{0,…,N−1}i,j\in\{0,\ldots,N-1\}i,j∈{0,…,N−1} and an arbitrary real angle θ\thetaθ; and a squeeze gate carrying an index i∈{0,…,N−1}i\in\{0,\ldots,N-1\}i∈{0,…,N−1} and an arbitrary real ratio rrr. The constructors themselves impose neither i≠ji\ne ji=j for beam gates nor positivity of squeeze ratios. When N=0N=0N=0, there are no gate descriptions, since every constructor requires an index in the empty set.

QAlgorithms.Papers.Independent.Intakenext100.P12.Unimodular

For any finite index type ι\iotaι with decidable equality and any integer matrix RRR indexed by ι×ι\iota\times\iotaι×ι, RRR is called unimodular precisely when det⁡R=1\det R=1detR=1 or det⁡R=−1\det R=-1detR=−1. The index type may be empty; its empty matrix has determinant 111 and therefore satisfies this definition.

QAlgorithms.Papers.Independent.Intakenext100.P12.atomBranch

For every Boolean value bbb, every function ψ:N→C\psi:\mathbb N\to\mathbb Cψ:N→C, and every natural number kkk, this defines

Bb(ψ)(k)=eiπk/4+δbe−iπk/42 ψ(k),δb={−1,b=true,1,b=false.B_b(\psi)(k) = \frac{e^{i\pi k/4}+\delta_b e^{-i\pi k/4}}{2}\,\psi(k), \qquad \delta_b= \begin{cases} -1,&b=\mathrm{true},\\ 1,&b=\mathrm{false}. \end{cases}Bb​(ψ)(k)=2eiπk/4+δb​e−iπk/4​ψ(k),δb​={−1,1,​b=true,b=false.​

No normalization, summability, or support condition is imposed on ψ\psiψ. At k=0k=0k=0, the false branch equals ψ(0)\psi(0)ψ(0), and the true branch equals zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.atomEvolution

For arbitrary real numbers λ,t\lambda,tλ,t, an arbitrary function ψ:N×{false,true}→C\psi:\mathbb N\times\{\mathrm{false},\mathrm{true}\}\to\mathbb Cψ:N×{false,true}→C, a natural number kkk, and a Boolean value aaa, this defines

Eλ,t(ψ)(k,a)=exp⁡ ⁣(i[−λtk εa])ψ(k,a),εa={1,a=true,−1,a=false.E_{\lambda,t}(\psi)(k,a) = \exp\!\left(i\bigl[-\lambda tk\,\varepsilon_a\bigr]\right)\psi(k,a), \qquad \varepsilon_a= \begin{cases} 1,&a=\mathrm{true},\\ -1,&a=\mathrm{false}. \end{cases}Eλ,t​(ψ)(k,a)=exp(i[−λtkεa​])ψ(k,a),εa​={1,−1,​a=true,a=false.​

There are no positivity, normalization, or summability assumptions. In particular, when k=0k=0k=0, λ=0\lambda=0λ=0, or t=0t=0t=0, the multiplier is 111.

QAlgorithms.Papers.Independent.Intakenext100.P12.ccz

This defines a complex matrix indexed by three-bit strings a,b∈{0,1}3a,b\in\{0,1\}^3a,b∈{0,1}3: its off-diagonal entries are 000, and its diagonal entry at bbb is −1-1−1 if b0=b1=b2=1b_0=b_1=b_2=1b0​=b1​=b2​=1, and 111 otherwise.

QAlgorithms.Papers.Independent.Intakenext100.P12.cisPhase

For every real number ttt, this defines the complex number exp⁡(it)\exp(it)exp(it), where iii is the imaginary unit.

QAlgorithms.Papers.Independent.Intakenext100.P12.coherentLatticeWave

For arbitrary real numbers α,q\alpha,qα,q and arbitrary integers s,ts,ts,t, this defines

coherentLatticeWave⁡(α,s,t,q)=e i2πtq/α π−1/4e−(q−sα)2/2.\operatorname{coherentLatticeWave}(\alpha,s,t,q) =e^{\,i2\pi tq/\alpha}\,\pi^{-1/4}e^{-(q-s\alpha)^2/2}.coherentLatticeWave(α,s,t,q)=ei2πtq/απ−1/4e−(q−sα)2/2.

There is no positivity or nonzero assumption on α\alphaα; division by zero is defined to be zero, so at α=0\alpha=0α=0 this expression is π−1/4e−q2/2\pi^{-1/4}e^{-q^2/2}π−1/4e−q2/2 for every s,ts,ts,t.

QAlgorithms.Papers.Independent.Intakenext100.P12.coherentStart

For arbitrary real numbers q0,p0,qq_0,p_0,qq0​,p0​,q, this defines

coherentStart⁡(q0,p0,q)=e ip0(q−q0/2) π−1/4e−(q−q0)2/2.\operatorname{coherentStart}(q_0,p_0,q) =e^{\,ip_0(q-q_0/2)}\,\pi^{-1/4}e^{-(q-q_0)^2/2}.coherentStart(q0​,p0​,q)=eip0​(q−q0​/2)π−1/4e−(q−q0​)2/2.

QAlgorithms.Papers.Independent.Intakenext100.P12.combSupportPoint

For a natural number nnn, a real number α\alphaα, an index j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, and an integer sss, this defines the real number

α(j+ns).\alpha(j+ns).α(j+ns).

There is no positivity or nonzero assumption on α\alphaα; if α=0\alpha=0α=0, the value is zero. When n=0n=0n=0, there is no admissible index jjj.

QAlgorithms.Papers.Independent.Intakenext100.P12.controlledPhaseWord

For every control index ccc and target index ttt in {0,1,2}\{0,1,2\}{0,1,2}, including c=tc=tc=t, this defines the ordered list of five gate descriptions

[cx⁡(c,t), phase⁡(true,t), cx⁡(c,t), phase⁡(false,c), phase⁡(false,t)].[\operatorname{cx}(c,t),\ \operatorname{phase}(\mathrm{true},t),\ \operatorname{cx}(c,t),\ \operatorname{phase}(\mathrm{false},c),\ \operatorname{phase}(\mathrm{false},t)].[cx(c,t), phase(true,t), cx(c,t), phase(false,c), phase(false,t)].

Here a controlled-X description specifies the update bt↦btxorbcb_t\mapsto b_t\mathbin{\mathrm{xor}}b_cbt​↦bt​xorbc​, and a phase description with flag vvv and target uuu specifies the diagonal factor exp⁡(iεv(21bu=true−1)π/8)\exp(i\varepsilon_v(2\mathbf1_{b_u=\mathrm{true}}-1)\pi/8)exp(iεv​(21bu​=true​−1)π/8), where εtrue=−1\varepsilon_{\mathrm{true}}=-1εtrue​=−1 and εfalse=1\varepsilon_{\mathrm{false}}=1εfalse​=1.

QAlgorithms.Papers.Independent.Intakenext100.P12.cssComb

For every natural number NNN, every real N×NN\times NN×N matrix MpM_pMp​, and every complex-valued Schwartz function fff on RN\mathbb R^NRN, define

cssComb⁡(N,Mp,f)=∑z∈ZNf ⁣((2π∑i=0N−1zi(Mp)ij)j=0N−1).\operatorname{cssComb}(N,M_p,f) =\sum_{z\in\mathbb Z^N} f\!\left(\left(\sqrt{2\pi}\sum_{i=0}^{N-1}z_i(M_p)_{ij}\right)_{j=0}^{N-1}\right).cssComb(N,Mp​,f)=z∈ZN∑​f​(2π​i=0∑N−1​zi​(Mp​)ij​)j=0N−1​​.

No nonsingularity or summability hypothesis is imposed: the infinite sum uses the total sum convention, which returns 000 when the family is not summable. When N=0N=0N=0, the index set Z0\mathbb Z^0Z0 has one element and this expression is f(0)f(0)f(0).

QAlgorithms.Papers.Independent.Intakenext100.P12.cubicLogicalPhase

For all real α,q\alpha,qα,q, this defines

Fα(q)=π4(2(q/α)3+(q/α)2−2(q/α)).F_\alpha(q)=\frac{\pi}{4}\left(2(q/\alpha)^3+(q/\alpha)^2-2(q/\alpha)\right).Fα​(q)=4π​(2(q/α)3+(q/α)2−2(q/α)).

There is no restriction on α\alphaα; division by zero is defined to be zero, so F0(q)=0F_0(q)=0F0​(q)=0 for every qqq.

QAlgorithms.Papers.Independent.Intakenext100.P12.cubicWave

For every real γ\gammaγ, every function ψ:R→C\psi:\mathbb R\to\mathbb Cψ:R→C, and every real qqq, this defines

(Cγψ)(q)=eiγq3ψ(q).(C_\gamma\psi)(q)=e^{i\gamma q^3}\psi(q).(Cγ​ψ)(q)=eiγq3ψ(q).

No regularity or normalization of ψ\psiψ is assumed.

QAlgorithms.Papers.Independent.Intakenext100.P12.displacedComb

For every natural number nnn, arbitrary real numbers α,u,v\alpha,u,vα,u,v, coefficient function c:{0,…,n−1}→Cc:\{0,\ldots,n-1\}\to\mathbb Cc:{0,…,n−1}→C, and complex Schwartz function fff on R\mathbb RR, this defines

displacedComb⁡(n,α,u,v,c,f)=∑j=0n−1cj∑k∈Ze iv(α(j+nk)+u/2)f(α(j+nk)+u).\operatorname{displacedComb}(n,\alpha,u,v,c,f) = \sum_{j=0}^{n-1}c_j\sum_{k\in\mathbb Z} e^{\,iv(\alpha(j+nk)+u/2)} f\bigl(\alpha(j+nk)+u\bigr).displacedComb(n,α,u,v,c,f)=j=0∑n−1​cj​k∈Z∑​eiv(α(j+nk)+u/2)f(α(j+nk)+u).

No positivity, nonzero, or normalization assumptions are imposed on the parameters or coefficients, and no summability hypothesis is part of the definition; a nonsummable family has totalized sum zero. When n=0n=0n=0, the finite sum is empty and the value is zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.dualGenerator

For every natural number NNN, including N=0N=0N=0, and every real matrix MMM indexed by P×PP\times PP×P, where P={0,…,N−1}⊔{0,…,N−1}P=\{0,\ldots,N-1\}\sqcup\{0,\ldots,N-1\}P={0,…,N−1}⊔{0,…,N−1}, define its dual generator to be

(MΣNMT)−1M,ΣN=(0IN−IN0).\bigl(M\Sigma_NM^{\mathsf T}\bigr)^{-1}M, \qquad \Sigma_N=\begin{pmatrix}0&I_N\\-I_N&0\end{pmatrix}.(MΣN​MT)−1M,ΣN​=(0−IN​​IN​0​).

There is no invertibility hypothesis in this definition: the matrix inverse is total and equals the zero matrix when its argument is singular.

QAlgorithms.Papers.Independent.Intakenext100.P12.embeddedWave

For every natural number nnn, real number α\alphaα, coefficient function c:{0,…,n−1}→Cc:\{0,\ldots,n-1\}\to\mathbb Cc:{0,…,n−1}→C, arbitrary function η:R2→C\eta:\mathbb R^2\to\mathbb Cη:R2→C, and real number qqq, this defines

embeddedWave⁡(n,α,c,η,q)=nα2π∑j=0n−1cj∑k∈Z∫Rη(q−α(j+nk),v)e iv(q+α(j+nk))/2 dv,\operatorname{embeddedWave}(n,\alpha,c,\eta,q) = \sqrt{\frac{n\alpha}{2\pi}} \sum_{j=0}^{n-1}c_j \sum_{k\in\mathbb Z}\int_{\mathbb R} \eta\bigl(q-\alpha(j+nk),v\bigr) e^{\,iv(q+\alpha(j+nk))/2}\,dv,embeddedWave(n,α,c,η,q)=2πnα​​j=0∑n−1​cj​k∈Z∑​∫R​η(q−α(j+nk),v)eiv(q+α(j+nk))/2dv,

where the square root is regarded as a complex scalar and integration uses Lebesgue measure. No measurability, support, integrability, summability, or normalization assumptions are imposed on η\etaη or ccc. The integrals and infinite sums are totalized to zero when the corresponding integrand is not integrable or family is not summable. The real square root of a nonpositive number is zero, so the defined function is zero when n=0n=0n=0 or α≤0\alpha\le0α≤0; for n=0n=0n=0, the finite sum is also empty.

QAlgorithms.Papers.Independent.Intakenext100.P12.errorCell

For every natural number nnn, including zero, and every real number α\alphaα, this defines the subset

En,α={(u,v)∈R2:∣u∣<α2 and ∣v∣<πnα}.E_{n,\alpha} =\left\{(u,v)\in\mathbb R^2: |u|<\frac{\alpha}{2}\ \text{and}\ |v|<\frac{\pi}{n\alpha}\right\}.En,α​={(u,v)∈R2:∣u∣<2α​ and ∣v∣<nαπ​}.

Both inequalities are strict. Division by zero is zero, so this set is empty when n=0n=0n=0; it is also empty whenever α≤0\alpha\le0α≤0.

QAlgorithms.Papers.Independent.Intakenext100.P12.euclideanDual

For any finite index type ι\iotaι and any set L⊆RιL\subseteq\mathbb R^\iotaL⊆Rι, its Euclidean dual is

{u∈Rι: ∀v∈L, ∃k∈Z, ∑i∈ιuivi=k}.\left\{u\in\mathbb R^\iota:\ \forall v\in L,\ \exists k\in\mathbb Z,\ \sum_{i\in\iota}u_iv_i=k\right\}.{u∈Rι: ∀v∈L, ∃k∈Z, i∈ι∑​ui​vi​=k}.

If LLL is empty, this is the whole space. If ι\iotaι is empty, the sum is 000, and the dual is the whole zero-dimensional space for every LLL.

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteCodeSpace

For natural numbers d,r1,r2,nd,r_1,r_2,nd,r1​,r2​,n with the additional assumption d≠0d\ne0d=0, this defines the complex linear subspace of the Euclidean space of complex functions on Z/dZ\mathbb Z/d\mathbb ZZ/dZ spanned by the vectors

Wj(x)=1r2∑k=0r2−1{1,x=r1(j+nk) in Z/dZ,0,otherwise,0≤j<n.W_j(x)=\frac{1}{\sqrt{r_2}} \sum_{k=0}^{r_2-1} \begin{cases} 1,&x=r_1(j+nk)\text{ in }\mathbb Z/d\mathbb Z,\\ 0,&\text{otherwise}, \end{cases} \qquad 0\le j<n.Wj​(x)=r2​​1​k=0∑r2​−1​{1,0,​x=r1​(j+nk) in Z/dZ,otherwise,​0≤j<n.

The vectors are taken with the usual Euclidean norm on their coordinates. No independence, normalization, or relation between the parameters is assumed. If n=0n=0n=0 or r2=0r_2=0r2​=0, the resulting subspace is {0}\{0\}{0}.

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteEncode

For arbitrary natural numbers d,r1,r2,nd,r_1,r_2,nd,r1​,r2​,n, coefficients c:{0,…,n−1}→Cc:\{0,\ldots,n-1\}\to\mathbb Cc:{0,…,n−1}→C, and x∈Z/dZx\in\mathbb Z/d\mathbb Zx∈Z/dZ, this defines

∑j=0n−1c(j) 1r2∑k=0r2−1{1,x=r1(j+nk) in Z/dZ,0,otherwise.\sum_{j=0}^{n-1}c(j)\, \frac{1}{\sqrt{r_2}} \sum_{k=0}^{r_2-1} \begin{cases} 1,&x=r_1(j+nk)\text{ in }\mathbb Z/d\mathbb Z,\\ 0,&\text{otherwise}. \end{cases}j=0∑n−1​c(j)r2​​1​k=0∑r2​−1​{1,0,​x=r1​(j+nk) in Z/dZ,otherwise.​

All matching indices are counted, even when they give the same residue. There are no normalization or positivity assumptions. The result is the zero function if n=0n=0n=0 or r2=0r_2=0r2​=0, with 0−1=00^{-1}=00−1=0; when d=0d=0d=0, the residue type and equality are interpreted in Z\mathbb ZZ.

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteError

For every natural number ddd, integers a,ba,ba,b, function x:Z/dZ→Cx:\mathbb Z/d\mathbb Z\to\mathbb Cx:Z/dZ→C, and j∈Z/dZj\in\mathbb Z/d\mathbb Zj∈Z/dZ, this defines

(Ea,bx)(j)=exp⁡ ⁣(i 2πb val⁡(j−a)d)x(j−a),(E_{a,b}x)(j)= \exp\!\left(i\,\frac{2\pi b\,\operatorname{val}(j-a)}{d}\right)x(j-a),(Ea,b​x)(j)=exp(id2πbval(j−a)​)x(j−a),

where subtraction and the cast of aaa take place in the residue type, and, for d>0d>0d>0, val⁡\operatorname{val}val is the representative in {0,…,d−1}\{0,\ldots,d-1\}{0,…,d−1}. The parameter ddd may be 000: in that case the residue type is Z\mathbb ZZ, real division by 000 is defined to be 000, and this formula reduces to x(j−a)x(j-a)x(j−a).

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteErrorMatrix

For every natural number ddd and integers a,ba,ba,b, this defines the complex matrix indexed by x,y∈Z/dZx,y\in\mathbb Z/d\mathbb Zx,y∈Z/dZ whose entries are

Fa,b(x,y)={exp⁡ ⁣(i 2πb val⁡(y)d),x=y+a,0,x≠y+a.F_{a,b}(x,y)= \begin{cases} \exp\!\left(i\,\dfrac{2\pi b\,\operatorname{val}(y)}{d}\right),&x=y+a,\\ 0,&x\ne y+a. \end{cases}Fa,b​(x,y)=⎩⎨⎧​exp(id2πbval(y)​),0,​x=y+a,x=y+a.​

The equality and addition use the residue type; for d>0d>0d>0, val⁡(y)\operatorname{val}(y)val(y) is its least nonnegative representative. The definition also permits d=0d=0d=0, when the index type is Z\mathbb ZZ and division by 000 makes the nonzero entries equal to 111.

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteErrorSpace

For natural numbers d,r1,r2d,r_1,r_2d,r1​,r2​ with d≠0d\ne0d=0, this defines the complex linear subspace of matrices on Z/dZ\mathbb Z/d\mathbb ZZ/dZ spanned by all matrices

Fa,b(x,y)={exp⁡ ⁣(i 2πb val⁡(y)d),x=y+a,0,otherwise,F_{a,b}(x,y)= \begin{cases} \exp\!\left(i\,\dfrac{2\pi b\,\operatorname{val}(y)}{d}\right),&x=y+a,\\ 0,&\text{otherwise}, \end{cases}Fa,b​(x,y)=⎩⎨⎧​exp(id2πbval(y)​),0,​x=y+a,otherwise,​

where a,ba,ba,b range over integers satisfying ∣a∣<r1/2|a|<r_1/2∣a∣<r1​/2 and ∣b∣<r2/2|b|<r_2/2∣b∣<r2​/2, and val⁡(y)∈{0,…,d−1}\operatorname{val}(y)\in\{0,\ldots,d-1\}val(y)∈{0,…,d−1}. This space includes arbitrary finite complex linear combinations of these matrices. If either r1=0r_1=0r1​=0 or r2=0r_2=0r2​=0, the generating set is empty and the space is {0}\{0\}{0}.

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteInner

For any finite index type ι\iotaι, equipped with a specified enumeration of its elements, and any functions x,y:ι→Cx,y:\iota\to\mathbb Cx,y:ι→C, this defines

∑j∈ιx(j)‾ y(j).\sum_{j\in\iota}\overline{x(j)}\,y(j).j∈ι∑​x(j)​y(j).

If ι\iotaι is empty, this sum is 000.

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteSyndrome

For arbitrary natural numbers d,r1,r2,nd,r_1,r_2,nd,r1​,r2​,n and an index e=((u,v),j)e=((u,v),j)e=((u,v),j) with 0≤u<r10\le u<r_10≤u<r1​, 0≤v<r20\le v<r_20≤v<r2​, and 0≤j<n0\le j<n0≤j<n, this defines the function on Z/dZ\mathbb Z/d\mathbb ZZ/dZ given by

Se(x)=exp⁡ ⁣(i 2πv val⁡(x−u)d)1r2∑k=0r2−1{1,x−u=r1(j+nk) in Z/dZ,0,otherwise.S_e(x)= \exp\!\left(i\,\frac{2\pi v\,\operatorname{val}(x-u)}{d}\right) \frac{1}{\sqrt{r_2}} \sum_{k=0}^{r_2-1} \begin{cases} 1,&x-u=r_1(j+nk)\text{ in }\mathbb Z/d\mathbb Z,\\ 0,&\text{otherwise}. \end{cases}Se​(x)=exp(id2πvval(x−u)​)r2​​1​k=0∑r2​−1​{1,0,​x−u=r1​(j+nk) in Z/dZ,otherwise.​

For d>0d>0d>0, val⁡\operatorname{val}val denotes the least nonnegative residue representative. If d=0d=0d=0, the residue type is Z\mathbb ZZ and division by 000 makes the exponential factor 111. If any of r1,r2,nr_1,r_2,nr1​,r2​,n is 000, there are no indices eee.

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteWindow

For natural numbers r1,r2r_1,r_2r1​,r2​ and integers a,ba,ba,b, this defines the proposition

∣a∣<r12and∣b∣<r22,|a|<\frac{r_1}{2}\quad\text{and}\quad |b|<\frac{r_2}{2},∣a∣<2r1​​and∣b∣<2r2​​,

with both inequalities interpreted in R\mathbb RR and both strict. If either r1=0r_1=0r1​=0 or r2=0r_2=0r2​=0, no pair of integers satisfies the proposition.

QAlgorithms.Papers.Independent.Intakenext100.P12.finiteWord

For arbitrary natural numbers d,r1,r2,nd,r_1,r_2,nd,r1​,r2​,n, an index j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, and x∈Z/dZx\in\mathbb Z/d\mathbb Zx∈Z/dZ, this defines the complex value

Wj(x)=1r2∑k=0r2−1{1,x=r1(j+nk) in Z/dZ,0,otherwise.W_j(x)=\frac{1}{\sqrt{r_2}} \sum_{k=0}^{r_2-1} \begin{cases} 1,&x=r_1(j+nk)\text{ in }\mathbb Z/d\mathbb Z,\\ 0,&\text{otherwise}. \end{cases}Wj​(x)=r2​​1​k=0∑r2​−1​{1,0,​x=r1​(j+nk) in Z/dZ,otherwise.​

Thus repeated occurrences of the same residue are counted with multiplicity. No positivity assumptions or relation among the four parameters are imposed. If r2=0r_2=0r2​=0, the value is 000, using the empty sum and the convention 0−1=00^{-1}=00−1=0; if n=0n=0n=0, no index jjj exists. When d=0d=0d=0, the residue type is Z\mathbb ZZ, and the displayed equality is an equality of integers.

QAlgorithms.Papers.Independent.Intakenext100.P12.gaussianEval

For every natural number NNN, every finite list [g1,…,gm][g_1,\ldots,g_m][g1​,…,gm​] of formal instructions, and every function ψ:RN→C\psi:\mathbb R^N\to\mathbb Cψ:RN→C, this defines the result of applying g1g_1g1​ first, then g2g_2g2​, through gmg_mgm​; the empty list returns ψ\psiψ. Each instruction replaces the current function fff by, respectively,

x⟼12π∫Re−ixkqf(x[k←q]) dqfor a Fourier instruction at k,x⟼ei2∑i,jBijxixjf(x)for a quadratic instruction B,x⟼1rf(x[k←xk/r])for a squeeze instruction (k,r),x⟼f(RTx)for a beam instruction (a,b,θ),x⟼ei∑ivi(xi−ui/2)f(x−u)for a displacement instruction (u,v).\begin{aligned} x&\longmapsto\frac1{\sqrt{2\pi}}\int_{\mathbb R}e^{-ix_kq}f(x[k\leftarrow q])\,dq &&\text{for a Fourier instruction at }k,\\ x&\longmapsto e^{\frac i2\sum_{i,j}B_{ij}x_i x_j}f(x) &&\text{for a quadratic instruction }B,\\ x&\longmapsto\frac1{\sqrt r}f(x[k\leftarrow x_k/r]) &&\text{for a squeeze instruction }(k,r),\\ x&\longmapsto f(R^{\mathsf T}x) &&\text{for a beam instruction }(a,b,\theta),\\ x&\longmapsto e^{i\sum_i v_i(x_i-u_i/2)}f(x-u) &&\text{for a displacement instruction }(u,v). \end{aligned}xxxxx​⟼2π​1​∫R​e−ixk​qf(x[k←q])dq⟼e2i​∑i,j​Bij​xi​xj​f(x)⟼r​1​f(x[k←xk​/r])⟼f(RTx)⟼ei∑i​vi​(xi​−ui​/2)f(x−u)​​for a Fourier instruction at k,for a quadratic instruction B,for a squeeze instruction (k,r),for a beam instruction (a,b,θ),for a displacement instruction (u,v).​

The real matrix RRR has entries, in order of precedence, cos⁡θ\cos\thetacosθ at (a,a)(a,a)(a,a) and (b,b)(b,b)(b,b), sin⁡θ\sin\thetasinθ at (a,b)(a,b)(a,b), −sin⁡θ-\sin\theta−sinθ at (b,a)(b,a)(b,a), 111 at remaining diagonal positions, and 000 elsewhere. The list need not consist of valid instructions, and the input need not be Gaussian or integrable; equal beam indices are permitted, a squeeze with r≤0r\le0r≤0 produces the zero function, division by zero is zero, and a nonintegrable Fourier integrand has integral zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.gkpPair

For any natural number NNN and real-valued functions x,yx,yx,y on the disjoint union of two copies of {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}, write xq,j,xp,jx_{q,j},x_{p,j}xq,j​,xp,j​ and yq,j,yp,jy_{q,j},y_{p,j}yq,j​,yp,j​ for their values on the first and second copies. This defines the real pairing [x,y]=∑j=0N−1(xq,jyp,j−xp,jyq,j)[x,y]=\sum_{j=0}^{N-1}(x_{q,j}y_{p,j}-x_{p,j}y_{q,j})[x,y]=∑j=0N−1​(xq,j​yp,j​−xp,j​yq,j​). For N=0N=0N=0 the sum is empty and the pairing is zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.hadamardPlus

This defines a complex-valued function on Boolean values by

h(false)=cos⁡(π/8),h(true)=sin⁡(π/8),h(\mathrm{false})=\cos(\pi/8), \qquad h(\mathrm{true})=\sin(\pi/8),h(false)=cos(π/8),h(true)=sin(π/8),

where both real trigonometric values are regarded as complex numbers with zero imaginary part.

QAlgorithms.Papers.Independent.Intakenext100.P12.hexDualVector

For every natural number nnn and pair of integers z=(z1,z2)z=(z_1,z_2)z=(z1​,z2​), put s=2n/3s=\sqrt{2n/\sqrt3}s=2n/3​​ and define

hexDualVector⁡(n,z)=(s(z1+z2/2)n, s3 z2/2n).\operatorname{hexDualVector}(n,z) =\left(\frac{s(z_1+z_2/2)}{n},\ \frac{s\sqrt3\,z_2/2}{n}\right).hexDualVector(n,z)=(ns(z1​+z2​/2)​, ns3​z2​/2​).

There is no positivity assumption on nnn; when n=0n=0n=0, real division by zero is defined to be 000, so this vector is (0,0)(0,0)(0,0).

QAlgorithms.Papers.Independent.Intakenext100.P12.hexNearest

For every x∈R2x\in\mathbb R^2x∈R2, put

P(s,t)=2π4/32(s+t2,3 t2),∥(u,v)∥2=u2+v2.P(s,t)=\frac{\sqrt{2\pi}\sqrt{4/\sqrt3}}2 \left(s+\frac t2,\frac{\sqrt3\,t}{2}\right), \qquad \lVert(u,v)\rVert_2=\sqrt{u^2+v^2}.P(s,t)=22π​4/3​​​(s+2t​,23​t​),∥(u,v)∥2​=u2+v2​.

This defines an integer pair h(x)h(x)h(x) by classical choice from the predicate

∀w∈Z2,∥x−P(h(x))∥2≤∥x−P(w)∥2.\forall w\in\mathbb Z^2,\qquad \lVert x-P(h(x))\rVert_2\le\lVert x-P(w)\rVert_2.∀w∈Z2,∥x−P(h(x))∥2​≤∥x−P(w)∥2​.

If any integer pair satisfies this predicate, the choice returns one such pair, with no specified rule for ties. If none satisfies it, the choice still returns an integer pair, without a nearest-point guarantee.

QAlgorithms.Papers.Independent.Intakenext100.P12.hexProbability

For every real σ\sigmaσ and a,b∈{0,1}a,b\in\{0,1\}a,b∈{0,1}, define

P(s,t)=2π4/32(s+t2,3 t2),gσ(u)=exp⁡(−u2/(2σ2))2πσ2,P(s,t)=\frac{\sqrt{2\pi}\sqrt{4/\sqrt3}}2 \left(s+\frac t2,\frac{\sqrt3\,t}{2}\right), \qquad g_\sigma(u)=\frac{\exp(-u^2/(2\sigma^2))}{\sqrt{2\pi\sigma^2}},P(s,t)=22π​4/3​​​(s+2t​,23​t​),gσ​(u)=2πσ2​exp(−u2/(2σ2))​,

and let h(x)∈Z2h(x)\in\mathbb Z^2h(x)∈Z2 be the classically chosen pair satisfying ∥x−P(h(x))∥2≤∥x−P(w)∥2\lVert x-P(h(x))\rVert_2\le\lVert x-P(w)\rVert_2∥x−P(h(x))∥2​≤∥x−P(w)∥2​ for every integer pair www, whenever such a pair exists; otherwise it is an arbitrary chosen integer pair. Here ∥(u,v)∥2=u2+v2\lVert(u,v)\rVert_2=\sqrt{u^2+v^2}∥(u,v)∥2​=u2+v2​. The definition is

∫R21{h(x)1 mod 2=a ∧ h(x)2 mod 2=b} gσ(x1)gσ(x2) dx.\int_{\mathbb R^2} \mathbf1_{\{h(x)_1\bmod2=a\,\land\,h(x)_2\bmod2=b\}}\, g_\sigma(x_1)g_\sigma(x_2)\,dx.∫R2​1{h(x)1​mod2=a∧h(x)2​mod2=b}​gσ​(x1​)gσ​(x2​)dx.

The integral uses Lebesgue measure and is totalized to zero if the integrand is not integrable. There is no positivity assumption on σ\sigmaσ; at σ=0\sigma=0σ=0 its value is zero using totalized division.

QAlgorithms.Papers.Independent.Intakenext100.P12.hexVector

For every natural number nnn and pair of integers z=(z1,z2)z=(z_1,z_2)z=(z1​,z2​), define s=2n/3s=\sqrt{2n/\sqrt3}s=2n/3​​ and

hexVector⁡(n,z)=(s(z1+z22), s3 z22),\operatorname{hexVector}(n,z) =\left(s\left(z_1+\frac{z_2}{2}\right),\ \frac{s\sqrt3\,z_2}{2}\right),hexVector(n,z)=(s(z1​+2z2​​), 2s3​z2​​),

with the integers regarded as real numbers. This includes n=0n=0n=0, when the resulting vector is (0,0)(0,0)(0,0) for every zzz.

QAlgorithms.Papers.Independent.Intakenext100.P12.idealComb

For every natural number nnn, real number α\alphaα, complex coefficient vector c=(cj)0≤j<nc=(c_j)_{0\le j<n}c=(cj​)0≤j<n​, and complex-valued Schwartz function fff on R\mathbb RR, this defines

∑j=0n−1cj∑s∈Zf(α(j+ns)).\sum_{j=0}^{n-1}c_j\sum_{s\in\mathbb Z}f\bigl(\alpha(j+ns)\bigr).j=0∑n−1​cj​s∈Z∑​f(α(j+ns)).

The inner sum is the total infinite-sum operation: it equals the usual sum when the family is summable and is zero otherwise. No restriction on α\alphaα or separate summability hypothesis is imposed. For n=0n=0n=0, the outer sum is empty and the value is zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.injectionInverseSum

For every function W:R2→CW:\mathbb R^2\to\mathbb CW:R2→C and every (q1,q2)∈R2(q_1,q_2)\in\mathbb R^2(q1​,q2​)∈R2, the declaration defines

injectionInverseSum⁡(W)(q1,q2)=W(q1,q2+q1).\operatorname{injectionInverseSum}(W)(q_1,q_2)=W(q_1,q_2+q_1).injectionInverseSum(W)(q1​,q2​)=W(q1​,q2​+q1​).

No regularity or integrability assumption is imposed on WWW.

QAlgorithms.Papers.Independent.Intakenext100.P12.injectionJointWave

For every real polynomial ϕ\phiϕ, every function ψ:R→C\psi:\mathbb R\to\mathbb Cψ:R→C, and every pair (q1,q2)∈R2(q_1,q_2)\in\mathbb R^2(q1​,q2​)∈R2, the declaration defines

injectionJointWave⁡(ϕ,ψ)(q1,q2)=ψ(q1)eiϕ(q2).\operatorname{injectionJointWave}(\phi,\psi)(q_1,q_2) =\psi(q_1)e^{i\phi(q_2)}.injectionJointWave(ϕ,ψ)(q1​,q2​)=ψ(q1​)eiϕ(q2​).

No integrability or normalization assumption is imposed on ψ\psiψ.

QAlgorithms.Papers.Independent.Intakenext100.P12.injectionPhaseResource

For every polynomial ϕ\phiϕ with real coefficients and every real qqq, the complex-valued function defined by this declaration is

injectionPhaseResource⁡(ϕ,q)=eiϕ(q).\operatorname{injectionPhaseResource}(\phi,q)=e^{i\phi(q)}.injectionPhaseResource(ϕ,q)=eiϕ(q).

There is no restriction on the degree of ϕ\phiϕ, including when ϕ\phiϕ is the zero polynomial.

QAlgorithms.Papers.Independent.Intakenext100.P12.injectionPositionFiber

For every function W:R2→CW:\mathbb R^2\to\mathbb CW:R2→C and all real a,qa,qa,q, the declaration defines

injectionPositionFiber⁡(W,a,q)=W(q,a).\operatorname{injectionPositionFiber}(W,a,q)=W(q,a).injectionPositionFiber(W,a,q)=W(q,a).

This is pointwise evaluation, with no regularity or integrability assumption on WWW.

QAlgorithms.Papers.Independent.Intakenext100.P12.inverseControlledPhaseWord

For any indices c,t∈{0,1,2}c,t\in\{0,1,2\}c,t∈{0,1,2}, including c=tc=tc=t, this defines the ordered list [Pt−,Pc−,Cct,Pt+,Cct][P_t^{-},P_c^{-},C_{ct},P_t^{+},C_{ct}][Pt−​,Pc−​,Cct​,Pt+​,Cct​]. Here Pj±P_j^{\pm}Pj±​ denotes the phase instruction whose matrix is diagonal on bit strings b∈{0,1}3b\in\{0,1\}^3b∈{0,1}3, with diagonal entry e±i(2bj−1)π/8e^{\pm i(2b_j-1)\pi/8}e±i(2bj​−1)π/8, and CctC_{ct}Cct​ denotes the instruction whose matrix entry at row aaa, column bbb is 111 if aaa is obtained from bbb by replacing btb_tbt​ with bt⊕bcb_t\mathbin{\oplus}b_cbt​⊕bc​, and 000 otherwise.

QAlgorithms.Papers.Independent.Intakenext100.P12.latticeGram

For any natural number NNN and real matrix MMM indexed by the disjoint union of two copies of {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}, this defines the matrix MΣNMTM\Sigma_NM^{\mathsf T}MΣN​MT, where ΣN=(0IN−IN0)\Sigma_N=\begin{pmatrix}0&I_N\\-I_N&0\end{pmatrix}ΣN​=(0−IN​​IN​0​) and MTM^{\mathsf T}MT is the transpose of MMM. No invertibility or integrality assumption is imposed on MMM. For N=0N=0N=0 this is the unique matrix on an empty index set.

QAlgorithms.Papers.Independent.Intakenext100.P12.logicalClock

For any natural number nnn, coefficient vector c:{0,…,n−1}→Cc:\{0,\ldots,n-1\}\to\mathbb Cc:{0,…,n−1}→C, and index j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, this defines Clock⁡n(c)j=ei2πj/ncj\operatorname{Clock}_n(c)_j=e^{i2\pi j/n}c_jClockn​(c)j​=ei2πj/ncj​. For n=0n=0n=0 there is no admissible index jjj, so the resulting vector is the unique function on the empty index set; for n=1n=1n=1 this operation is the identity.

QAlgorithms.Papers.Independent.Intakenext100.P12.logicalCycle

For any natural number nnn, coefficient vector c:{0,…,n−1}→Cc:\{0,\ldots,n-1\}\to\mathbb Cc:{0,…,n−1}→C, and index j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, this defines Cycle⁡n(c)j=∑k=0n−11{j=(k+1) mod n}ck\operatorname{Cycle}_n(c)_j=\sum_{k=0}^{n-1}\mathbf 1_{\{j=(k+1)\bmod n\}}c_kCyclen​(c)j​=∑k=0n−1​1{j=(k+1)modn}​ck​. For positive nnn, this moves each coefficient at index kkk to index (k+1) mod n(k+1)\bmod n(k+1)modn. For n=0n=0n=0 there is no admissible index jjj, and the resulting coefficient vector is the unique function on the empty index set.

QAlgorithms.Papers.Independent.Intakenext100.P12.magicBranch

For every Boolean outcome ooo, every function ψ:{false,true}→C\psi:\{\mathrm{false},\mathrm{true}\}\to\mathbb Cψ:{false,true}→C, and every Boolean bbb, this defines

Bo(ψ)(b)=ψ(b)exp⁡ ⁣(i {π/8,oxorb=true,−π/8,oxorb=false)2,B_o(\psi)(b)=\psi(b)\frac{\exp\!\left(i\,\begin{cases}\pi/8,&o\mathbin{\mathrm{xor}}b=\mathrm{true},\\-\pi/8,&o\mathbin{\mathrm{xor}}b=\mathrm{false}\end{cases}\right)}{\sqrt2},Bo​(ψ)(b)=ψ(b)2​exp(i{π/8,−π/8,​oxorb=true,oxorb=false​)​,

where xor\mathrm{xor}xor is exclusive or. No normalization of ψ\psiψ is required.

QAlgorithms.Papers.Independent.Intakenext100.P12.magicState

For each Boolean bbb, this defines the complex number

m(b)=exp⁡ ⁣(i {π/8,b=true,−π/8,b=false)2.m(b)=\frac{\exp\!\left(i\,\begin{cases}\pi/8,&b=\mathrm{true},\\-\pi/8,&b=\mathrm{false}\end{cases}\right)}{\sqrt2}.m(b)=2​exp(i{π/8,−π/8,​b=true,b=false​)​.

QAlgorithms.Papers.Independent.Intakenext100.P12.meterCoherent

For every complex number β\betaβ and natural number kkk, this defines the complex number

Cβ(k)=e−∣β∣2/2βkk!.C_\beta(k)=e^{-|\beta|^2/2}\frac{\beta^k}{\sqrt{k!}}.Cβ​(k)=e−∣β∣2/2k!​βk​.

The real exponential and square root are regarded as complex scalars. The definition includes k=0k=0k=0 and β=0\beta=0β=0: C0(0)=1C_0(0)=1C0​(0)=1, using 00=10^0=100=1, and C0(k)=0C_0(k)=0C0​(k)=0 for k>0k>0k>0.

QAlgorithms.Papers.Independent.Intakenext100.P12.meterEvolution

For arbitrary real numbers λ,t\lambda,tλ,t, any function ψ:R×N→C\psi:\mathbb R\times\mathbb N\to\mathbb Cψ:R×N→C, any real qqq, and any natural number kkk, this defines

meterEvolution⁡λ,t(ψ)(q,k)=e−iλtqkψ(q,k).\operatorname{meterEvolution}_{\lambda,t}(\psi)(q,k) =e^{-i\lambda tqk}\psi(q,k).meterEvolutionλ,t​(ψ)(q,k)=e−iλtqkψ(q,k).

There are no regularity, normalization, or positivity assumptions. In particular, the multiplier is one when any of λ,t,q,k\lambda,t,q,kλ,t,q,k is zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.modularFiber

For arbitrary real numbers P,aP,aP,a and a complex-valued Schwartz function fff on R\mathbb RR, this defines

modularFiber⁡P,a(f)=∑k∈Z′f(a+Pk).\operatorname{modularFiber}_{P,a}(f)=\sum_{k\in\mathbb Z}'f(a+Pk).modularFiberP,a​(f)=k∈Z∑′​f(a+Pk).

There is no assumption that PPP is positive or nonzero. The primed sum is the total infinite sum, assigned zero if the family is not summable; consequently, for P=0P=0P=0 the value is zero for every a,fa,fa,f, whether the repeated value f(a)f(a)f(a) is zero or nonzero.

QAlgorithms.Papers.Independent.Intakenext100.P12.modular_position_preparation

Let nnn be a positive natural number, let α,λ>0\alpha,\lambda>0α,λ>0, and let β∈C\beta\in\mathbb Cβ∈C and R:(N→C)→CR:(\mathbb N\to\mathbb C)\to\mathbb CR:(N→C)→C satisfy β≠0\beta\ne0β=0 and R(Cβe−iθ)=eiθR(C_{\beta e^{-i\theta}})=e^{i\theta}R(Cβe−iθ​)=eiθ for every real θ\thetaθ, where Cγ(k)=e−∣γ∣2/2γk/k!C_\gamma(k)=e^{-|\gamma|^2/2}\gamma^k/\sqrt{k!}Cγ​(k)=e−∣γ∣2/2γk/k!​. Set L=nαL=n\alphaL=nα and t=2π/(λL)t=2\pi/(\lambda L)t=2π/(λL). The theorem asserts all six of the following statements:

∀q∈R,R ⁣(k⟼e−iλtqkCβ(k))=e2πiq/L;∀f∈S(R;C),∫[0,L)(∑k∈Z′f(a+Lk)) da=∫Rf(q) dq;∀γ∈C, ∀q∈R, ∀k∈N,e−iλtqkCγ(k)=Cγe−2πiq/L(k);∀q∈R,λtq=2πqL;∀q,q2∈R,e2πiq/L=e2πiq2/L ⟺ ∃k∈Z, q−q2=Lk;∀a∈R, ∀f∈S(R;C),∑k∈Z′f(a+Lk−a)=∑j=0n−11{j=0}∑s∈Z′f ⁣(α(j+ns)).\begin{gathered} \forall q\in\mathbb R,\qquad R\!\left(k\longmapsto e^{-i\lambda tqk}C_\beta(k)\right) =e^{2\pi iq/L}; \\[3pt] \forall f\in\mathcal S(\mathbb R;\mathbb C),\qquad \int_{[0,L)}\left(\sum_{k\in\mathbb Z}'f(a+Lk)\right)\,da =\int_{\mathbb R}f(q)\,dq; \\[3pt] \forall \gamma\in\mathbb C,\ \forall q\in\mathbb R,\ \forall k\in\mathbb N,\qquad e^{-i\lambda tqk}C_\gamma(k) =C_{\gamma e^{-2\pi iq/L}}(k); \\[3pt] \forall q\in\mathbb R,\qquad \lambda tq=\frac{2\pi q}{L}; \\[3pt] \forall q,q_2\in\mathbb R,\qquad e^{2\pi iq/L}=e^{2\pi iq_2/L} \ \Longleftrightarrow\ \exists k\in\mathbb Z,\ q-q_2=Lk; \\[3pt] \forall a\in\mathbb R,\ \forall f\in\mathcal S(\mathbb R;\mathbb C),\qquad \sum_{k\in\mathbb Z}'f(a+Lk-a) = \sum_{j=0}^{n-1}\mathbf 1_{\{j=0\}} \sum_{s\in\mathbb Z}'f\!\left(\alpha(j+ns)\right). \end{gathered}∀q∈R,R(k⟼e−iλtqkCβ​(k))=e2πiq/L;∀f∈S(R;C),∫[0,L)​(k∈Z∑′​f(a+Lk))da=∫R​f(q)dq;∀γ∈C, ∀q∈R, ∀k∈N,e−iλtqkCγ​(k)=Cγe−2πiq/L​(k);∀q∈R,λtq=L2πq​;∀q,q2​∈R,e2πiq/L=e2πiq2​/L ⟺ ∃k∈Z, q−q2​=Lk;∀a∈R, ∀f∈S(R;C),k∈Z∑′​f(a+Lk−a)=j=0∑n−1​1{j=0}​s∈Z∑′​f(α(j+ns)).​

Here S(R;C)\mathcal S(\mathbb R;\mathbb C)S(R;C) denotes the complex-valued Schwartz functions, all integrals use Lebesgue measure, and primed sums are total infinite sums, assigned zero if not summable. The third assertion quantifies over every complex γ\gammaγ, including zero, independently of the fixed nonzero β\betaβ in the readout hypothesis.

QAlgorithms.Papers.Independent.Intakenext100.P12.numberSector

For every natural number rrr, every function ψ:N→C\psi:\mathbb N\to\mathbb Cψ:N→C, and every natural number kkk, this defines

Pr(ψ)(k)={ψ(k),k mod 4=r,0,k mod 4≠r.P_r(\psi)(k)= \begin{cases} \psi(k),&k\bmod4=r,\\ 0,&k\bmod4\ne r. \end{cases}Pr​(ψ)(k)={ψ(k),0,​kmod4=r,kmod4=r.​

The parameter rrr is unrestricted: for r≥4r\ge4r≥4, this is the zero function. No normalization or summability condition is required.

QAlgorithms.Papers.Independent.Intakenext100.P12.opticalEval

For every natural number NNN and every finite list of gate descriptions [g1,…,gm][g_1,\ldots,g_m][g1​,…,gm​], this defines its value as the real 2N×2N2N\times2N2N×2N matrix

GmGm−1⋯G1,G_mG_{m-1}\cdots G_1,Gm​Gm−1​⋯G1​,

with value I2NI_{2N}I2N​ for the empty list. Here the indices consist of two disjoint copies of {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}, and GℓG_\ellGℓ​ is obtained from gℓg_\ellgℓ​ as follows: a phase gate (k,θ)(k,\theta)(k,θ) gives (AB−BA)\begin{pmatrix}A&B\\-B&A\end{pmatrix}(A−B​BA​), where AAA is diagonal with entry cos⁡θ\cos\thetacosθ at kkk and 111 elsewhere, and BBB is diagonal with entry sin⁡θ\sin\thetasinθ at kkk and 000 elsewhere; a beam gate (a,b,θ)(a,b,\theta)(a,b,θ) gives diag⁡(R,R)\operatorname{diag}(R,R)diag(R,R), where for a≠ba\ne ba=b the matrix RRR is the identity outside a,ba,ba,b and has block (cos⁡θsin⁡θ−sin⁡θcos⁡θ)\begin{pmatrix}\cos\theta&\sin\theta\\-\sin\theta&\cos\theta\end{pmatrix}(cosθ−sinθ​sinθcosθ​) there, while for a=ba=ba=b it is diagonal with entry cos⁡θ\cos\thetacosθ at aaa and 111 elsewhere; and a squeeze gate (k,r)(k,r)(k,r) gives a diagonal block matrix whose first block has entry rrr at kkk, whose second block has entry r−1r^{-1}r−1 at kkk, and whose other diagonal entries are 111. No validity condition is imposed, and the inverse of zero is taken to be zero. When N=0N=0N=0, only the empty list exists.

QAlgorithms.Papers.Independent.Intakenext100.P12.oscillatorVacuumProfile

For every real number qqq, this defines the complex number

oscillatorVacuumProfile⁡(q)=π−1/4e−q2/2,\operatorname{oscillatorVacuumProfile}(q) =\pi^{-1/4}e^{-q^2/2},oscillatorVacuumProfile(q)=π−1/4e−q2/2,

with the real expression on the right regarded as a complex number.

QAlgorithms.Papers.Independent.Intakenext100.P12.paperS

This defines the complex matrix indexed by Boolean values, in the order false,true\mathrm{false},\mathrm{true}false,true, as

(e−iπ/800eiπ/8).\begin{pmatrix} e^{-i\pi/8}&0\\ 0&e^{i\pi/8} \end{pmatrix}.(e−iπ/80​0eiπ/8​).

Thus its off-diagonal entries are zero, and its diagonal entry at bbb is exp⁡(iπ/8)\exp(i\pi/8)exp(iπ/8) when b=trueb=\mathrm{true}b=true and exp⁡(−iπ/8)\exp(-i\pi/8)exp(−iπ/8) when b=falseb=\mathrm{false}b=false.

QAlgorithms.Papers.Independent.Intakenext100.P12.phaseCorrection

For every real polynomial ϕ\phiϕ and all real a,qa,qa,q, this defines

Rϕ,a(q)=exp⁡ ⁣(i(ϕ(q)−ϕ(q+a))).R_{\phi,a}(q)=\exp\!\bigl(i(\phi(q)-\phi(q+a))\bigr).Rϕ,a​(q)=exp(i(ϕ(q)−ϕ(q+a))).

QAlgorithms.Papers.Independent.Intakenext100.P12.phasedComb

For every natural number nnn, real number α\alphaα, complex coefficient vector c=(cj)0≤j<nc=(c_j)_{0\le j<n}c=(cj​)0≤j<n​, arbitrary function φ:R→R\varphi:\mathbb R\to\mathbb Rφ:R→R, and complex-valued Schwartz function fff on R\mathbb RR, this defines

∑j=0n−1cj∑s∈Ze iφ(α(j+ns))f(α(j+ns)).\sum_{j=0}^{n-1}c_j\sum_{s\in\mathbb Z} e^{\,i\varphi(\alpha(j+ns))}f\bigl(\alpha(j+ns)\bigr).j=0∑n−1​cj​s∈Z∑​eiφ(α(j+ns))f(α(j+ns)).

No regularity assumption is made on φ\varphiφ, and α\alphaα may be zero or negative. Each inner infinite sum is zero if its family is not summable. For n=0n=0n=0, the value is zero because the outer sum is empty.

QAlgorithms.Papers.Independent.Intakenext100.P12.physicalHex

For every integer pair z=(s,t)z=(s,t)z=(s,t), this defines the real pair

2π4/32(s+t2,3 t2).\frac{\sqrt{2\pi}\sqrt{4/\sqrt3}}2 \left(s+\frac t2,\frac{\sqrt3\,t}{2}\right).22π​4/3​​​(s+2t​,23​t​).

Thus the coordinates are obtained by multiplying by 2π\sqrt{2\pi}2π​ the coordinates of 124/3 (s+t/2,3 t/2)\frac12\sqrt{4/\sqrt3}\,(s+t/2,\sqrt3\,t/2)21​4/3​​(s+t/2,3​t/2).

QAlgorithms.Papers.Independent.Intakenext100.P12.planeNorm

For every real pair x=(x1,x2)x=(x_1,x_2)x=(x1​,x2​), define its plane norm by planeNorm⁡(x)=x12+x22\operatorname{planeNorm}(x)=\sqrt{x_1^2+x_2^2}planeNorm(x)=x12​+x22​​, using the nonnegative real square root.

QAlgorithms.Papers.Independent.Intakenext100.P12.projectedCoherent

For arbitrary real numbers α,q0,p0\alpha,q_0,p_0α,q0​,p0​ and every complex Schwartz function fff on R\mathbb RR, this defines

projectedCoherent⁡(α,q0,p0,f)=∑(s,t)∈Z2∫Re i2πtq/αe ip0(q−sα−q0/2)π−1/4e−(q−sα−q0)2/2f(q) dq.\operatorname{projectedCoherent}(\alpha,q_0,p_0,f) = \sum_{(s,t)\in\mathbb Z^2}\int_{\mathbb R} e^{\,i2\pi tq/\alpha} e^{\,ip_0(q-s\alpha-q_0/2)} \pi^{-1/4}e^{-(q-s\alpha-q_0)^2/2} f(q)\,dq.projectedCoherent(α,q0​,p0​,f)=(s,t)∈Z2∑​∫R​ei2πtq/αeip0​(q−sα−q0​/2)π−1/4e−(q−sα−q0​)2/2f(q)dq.

The integral is with respect to Lebesgue measure. No assumption on α\alphaα or summability hypothesis is imposed: division by zero is zero, a nonintegrable integrand has totalized integral zero, and a nonsummable family has totalized sum zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.quadratureGaussianDensity

For arbitrary real numbers σ\sigmaσ and xxx, this defines

gσ(x)=exp⁡ ⁣(−x2/(2σ2))2πσ2.g_\sigma(x)= \frac{\exp\!\left(-x^2/(2\sigma^2)\right)} {\sqrt{2\pi\sigma^2}}.gσ​(x)=2πσ2​exp(−x2/(2σ2))​.

There is no positivity or nonzero assumption on σ\sigmaσ. Negative σ\sigmaσ gives the same expression as −σ-\sigma−σ, and at σ=0\sigma=0σ=0 the value is zero for every xxx, using the convention that division by zero is zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.realModeMixing

For every natural number NNN, indices a,b∈{0,…,N−1}a,b\in\{0,\ldots,N-1\}a,b∈{0,…,N−1}, and real angle θ\thetaθ, this defines a real N×NN\times NN×N matrix RRR by the following ordered cases for its row and column indices i,ji,ji,j:

Rij={cos⁡θ,(i=a and j=a) or (i=b and j=b),sin⁡θ,i=a and j=b,if the preceding case fails,−sin⁡θ,i=b and j=a,if the preceding cases fail,1,i=j,if the preceding cases fail,0,otherwise.R_{ij}= \begin{cases} \cos\theta,&(i=a\ \text{and}\ j=a)\ \text{or}\ (i=b\ \text{and}\ j=b),\\ \sin\theta,&i=a\ \text{and}\ j=b,\quad\text{if the preceding case fails},\\ -\sin\theta,&i=b\ \text{and}\ j=a,\quad\text{if the preceding cases fail},\\ 1,&i=j,\quad\text{if the preceding cases fail},\\ 0,&\text{otherwise}. \end{cases}Rij​=⎩⎨⎧​cosθ,sinθ,−sinθ,1,0,​(i=a and j=a) or (i=b and j=b),i=a and j=b,if the preceding case fails,i=b and j=a,if the preceding cases fail,i=j,if the preceding cases fail,otherwise.​

There is no assumption that a≠ba\ne ba=b; if a=ba=ba=b, the matrix is diagonal with entry cos⁡θ\cos\thetacosθ at aaa and entry 111 at every other index. For N=0N=0N=0, no choices of a,ba,ba,b exist.

QAlgorithms.Papers.Independent.Intakenext100.P12.regularFunctional

For every natural number NNN, every function ψ:RN→C\psi:\mathbb R^N\to\mathbb Cψ:RN→C, and every complex-valued Schwartz function fff on RN\mathbb R^NRN, this defines

regularFunctional⁡N(ψ)(f)=∫RNψ(q)f(q) dq.\operatorname{regularFunctional}_N(\psi)(f) =\int_{\mathbb R^N}\psi(q)f(q)\,dq.regularFunctionalN​(ψ)(f)=∫RN​ψ(q)f(q)dq.

The integral uses Lebesgue measure, and the product contains no complex conjugation. No measurability or integrability assumption is imposed on ψ\psiψ; the integral is the total Bochner integral, which is assigned zero when its integrand is not integrable. The definition includes N=0N=0N=0.

QAlgorithms.Papers.Independent.Intakenext100.P12.rotorCell

For natural numbers n,rn,rn,r, this defines the subset of R×Z\mathbb R\times\mathbb ZR×Z consisting exactly of the pairs (θ,b)(\theta,b)(θ,b) satisfying

∣θ∣<πnr,∣b∣<r2,|\theta|<\frac{\pi}{nr},\qquad |b|<\frac r2,∣θ∣<nrπ​,∣b∣<2r​,

with bbb interpreted as a real number in the second inequality. Both inequalities are strict. There are no positivity hypotheses on n,rn,rn,r; if either is zero, the set is empty, using the convention that real division by zero is zero.

QAlgorithms.Papers.Independent.Intakenext100.P12.rotorEncode

For natural numbers n,rn,rn,r, a complex coefficient vector c=(cj)0≤j<nc=(c_j)_{0\le j<n}c=(cj​)0≤j<n​, and an integer LLL, this defines

{1n∑j=0n−1cjexp⁡ ⁣(−2πiLjnr),L mod r=0,0,L mod r≠0,\begin{cases} \displaystyle\frac1{\sqrt n}\sum_{j=0}^{n-1}c_j \exp\!\left(-\frac{2\pi iLj}{nr}\right),&L\bmod r=0,\\ 0,&L\bmod r\ne0, \end{cases}⎩⎨⎧​n​1​j=0∑n−1​cj​exp(−nr2πiLj​),0,​Lmodr=0,Lmodr=0,​

where the remainder is integer remainder and the divisions in the exponential are real divisions. No positivity hypotheses are imposed. Division by zero and inversion of zero both give zero in these formulas; consequently, n=0n=0n=0 gives value zero. If r=0r=0r=0, the remainder condition is L=0L=0L=0, so only L=0L=0L=0 uses the first branch, whose exponential factors are then all one.

QAlgorithms.Papers.Independent.Intakenext100.P12.rotorError

For every real number θ\thetaθ, integer bbb, arbitrary function ψ:Z→C\psi:\mathbb Z\to\mathbb Cψ:Z→C, and integer LLL, this defines

e−iLθψ(L−b).e^{-iL\theta}\psi(L-b).e−iLθψ(L−b).

There are no normalization, summability, or regularity assumptions on ψ\psiψ, and no restrictions on θ\thetaθ or bbb.

QAlgorithms.Papers.Independent.Intakenext100.P12.rowLattice

For any type ι\iotaι equipped with a finite enumeration and any real matrix MMM with rows and columns indexed by ι\iotaι, this defines the set of all vectors x:ι→Rx:\iota\to\mathbb Rx:ι→R for which there exists an integer vector z:ι→Zz:\iota\to\mathbb Zz:ι→Z satisfying xj=∑i∈ιziMijx_j=\sum_{i\in\iota}z_iM_{ij}xj​=∑i∈ι​zi​Mij​ for every j∈ιj\in\iotaj∈ι. Thus the set consists of all integer linear combinations of the rows, with no independence or invertibility assumption on MMM. If ι\iotaι is empty, the set contains the unique empty vector.

QAlgorithms.Papers.Independent.Intakenext100.P12.schrodingerDisplacement

For any natural number NNN, real vector vvv indexed by two copies of {0,…,N−1}\{0,\ldots,N-1\}{0,…,N−1}, arbitrary function ψ:RN→C\psi:\mathbb R^N\to\mathbb Cψ:RN→C, and point x∈RNx\in\mathbb R^Nx∈RN, write vq,jv_{q,j}vq,j​ and vp,jv_{p,j}vp,j​ for the components on the first and second copies and put s=2πs=\sqrt{2\pi}s=2π​. This defines (Dvψ)(x)=exp⁡ ⁣(is∑j=0N−1vp,j(xj+svq,j/2))ψ((xj+svq,j)j)(D_v\psi)(x)=\exp\!\bigl(is\sum_{j=0}^{N-1}v_{p,j}(x_j+sv_{q,j}/2)\bigr)\psi((x_j+sv_{q,j})_j)(Dv​ψ)(x)=exp(is∑j=0N−1​vp,j​(xj​+svq,j​/2))ψ((xj​+svq,j​)j​). No measurability, integrability, or normalization of ψ\psiψ is assumed. When N=0N=0N=0, the sum is empty, the phase is one, and this operation leaves the function on the singleton configuration space unchanged.

QAlgorithms.Papers.Independent.Intakenext100.P12.shorEval

For every finite list of three-bit instructions [g1,…,gm][g_1,\ldots,g_m][g1​,…,gm​], this defines the complex matrix M(gm)⋯M(g1)M(g_m)\cdots M(g_1)M(gm​)⋯M(g1​), indexed by {0,1}3\{0,1\}^3{0,1}3, with the empty list giving the identity matrix. For a phase instruction with index ttt and Boolean inverse flag ν\nuν, M(g)M(g)M(g) is diagonal with entry eis(2bt−1)π/8e^{i s(2b_t-1)\pi/8}eis(2bt​−1)π/8, where s=−1s=-1s=−1 when ν\nuν is true and s=1s=1s=1 otherwise. For an instruction with control ccc and target ttt, its matrix entry at row aaa, column bbb is 111 if a=b[t←bt⊕bc]a=b[t\leftarrow b_t\mathbin{\oplus}b_c]a=b[t←bt​⊕bc​], and 000 otherwise; no requirement c≠tc\ne tc=t is imposed.

QAlgorithms.Papers.Independent.Intakenext100.P12.shorStabilizer

For every k∈{0,1,2}k\in\{0,1,2\}k∈{0,1,2}, this defines a complex matrix SkS_kSk​ indexed by three-bit strings a,ba,ba,b: the entry (Sk)ab(S_k)_{ab}(Sk​)ab​ is 000 unless aaa is obtained from bbb by flipping bit kkk; when it is, the entry is −1-1−1 if bj=1b_j=1bj​=1 for every j≠kj\ne kj=k, and 111 otherwise. Thus the sign depends on the other two bits of the column string bbb.

QAlgorithms.Papers.Independent.Intakenext100.P12.shorState

For every three-bit string b∈{0,1}3b\in\{0,1\}^3b∈{0,1}3, this defines a complex amplitude χ(b)\chi(b)χ(b) equal to −1/8-1/\sqrt8−1/8​ if all three bits are 111, and 1/81/\sqrt81/8​ otherwise.

QAlgorithms.Papers.Independent.Intakenext100.P12.shorWord

This defines the following ordered list of seventeen instructions on three bits:

[C12,P2−,P0−,C02,P2+,C02,C12,C02,P2−,C02,P0+,P2+,C01,P1−,C01,P0+,P1+].[C_{12},P_2^{-},P_0^{-},C_{02},P_2^{+},C_{02},C_{12}, C_{02},P_2^{-},C_{02},P_0^{+},P_2^{+}, C_{01},P_1^{-},C_{01},P_0^{+},P_1^{+}].[C12​,P2−​,P0−​,C02​,P2+​,C02​,C12​,C02​,P2−​,C02​,P0+​,P2+​,C01​,P1−​,C01​,P0+​,P1+​].

Here the bits are indexed by {0,1,2}\{0,1,2\}{0,1,2}; the matrix of Pj±P_j^{\pm}Pj±​ is diagonal with entry e±i(2bj−1)π/8e^{\pm i(2b_j-1)\pi/8}e±i(2bj​−1)π/8 at bit string bbb, and the matrix of CctC_{ct}Cct​ has entry 111 at row aaa, column bbb exactly when a=b[t←bt⊕bc]a=b[t\leftarrow b_t\mathbin{\oplus}b_c]a=b[t←bt​⊕bc​], and entry 000 otherwise.

QAlgorithms.Papers.Independent.Intakenext100.P12.squareDualVector

For every natural number nnn and integer pair z=(s,t)∈Z2z=(s,t)\in\mathbb Z^2z=(s,t)∈Z2, this defines the real pair

(sn,tn).\left(\frac{s}{\sqrt n},\frac{t}{\sqrt n}\right).(n​s​,n​t​).

The definition includes n=0n=0n=0: division by zero is defined to be zero, so the resulting pair is (0,0)(0,0)(0,0) for every zzz in that case.

QAlgorithms.Papers.Independent.Intakenext100.P12.squareErrorRate

For every real σ\sigmaσ, this defines the real number

∫R1{x: ⌊x/π+1/2⌋ mod 2=1}exp⁡ ⁣(−x2/(2σ2))2πσ2 dx,\int_{\mathbb R} \mathbf1_{\left\{x:\,\lfloor x/\sqrt\pi+1/2\rfloor\bmod2=1\right\}} \frac{\exp\!\left(-x^2/(2\sigma^2)\right)} {\sqrt{2\pi\sigma^2}}\,dx,∫R​1{x:⌊x/π​+1/2⌋mod2=1}​2πσ2​exp(−x2/(2σ2))​dx,

where integration is with respect to Lebesgue measure. No restriction on σ\sigmaσ is imposed; at σ=0\sigma=0σ=0 the integrand and integral are zero under the convention that division by zero is zero. The integral is the totalized integral, whose value is zero if the integrand is not integrable.

QAlgorithms.Papers.Independent.Intakenext100.P12.squareJoint

For every real σ\sigmaσ and Boolean values a,ba,ba,b, let p(x)p(x)p(x) be true exactly when ⌊x/π+1/2⌋ mod 2=1\lfloor x/\sqrt\pi+1/2\rfloor\bmod2=1⌊x/π​+1/2⌋mod2=1, and let

gσ(x)=exp⁡(−x2/(2σ2))2πσ2.g_\sigma(x)=\frac{\exp(-x^2/(2\sigma^2))}{\sqrt{2\pi\sigma^2}}.gσ​(x)=2πσ2​exp(−x2/(2σ2))​.

This defines the iterated Lebesgue integral

∫R(∫R1{p(x)=a ∧ p(y)=b} gσ(x)gσ(y) dy)dx.\int_{\mathbb R}\left( \int_{\mathbb R} \mathbf1_{\{p(x)=a\,\land\,p(y)=b\}}\, g_\sigma(x)g_\sigma(y)\,dy\right)dx.∫R​(∫R​1{p(x)=a∧p(y)=b}​gσ​(x)gσ​(y)dy)dx.

There is no restriction on σ\sigmaσ; at σ=0\sigma=0σ=0 this is zero using totalized division. Each integral is totalized, with value zero when its integrand is not integrable.

QAlgorithms.Papers.Independent.Intakenext100.P12.squareParity

For every real number xxx, this defines a Boolean value that is true exactly when

⌊xπ+12⌋ mod 2=1,\left\lfloor\frac{x}{\sqrt\pi}+\frac12\right\rfloor\bmod 2=1,⌊π​x​+21​⌋mod2=1,

and false otherwise. The remainder is the integer remainder modulo 222, including for negative integers, and the floor formula fixes the value at every interval boundary.

QAlgorithms.Papers.Independent.Intakenext100.P12.squeezeWave

For every real rrr, every function ψ:R→C\psi:\mathbb R\to\mathbb Cψ:R→C, and every real qqq, this defines

(Srψ)(q)=(r)−1ψ(q/r),(S_r\psi)(q)=(\sqrt r)^{-1}\psi(q/r),(Sr​ψ)(q)=(r​)−1ψ(q/r),

with the real scalar interpreted in C\mathbb CC. No measurability, integrability, or positivity hypothesis is imposed. The real square root is zero for r≤0r\le0r≤0, and the inverse of zero is zero, so SrψS_r\psiSr​ψ is the zero function whenever r≤0r\le0r≤0.

QAlgorithms.Papers.Independent.Intakenext100.P12.symplecticDual

For every natural number NNN, including N=0N=0N=0, put P={0,…,N−1}⊔{0,…,N−1}P=\{0,\ldots,N-1\}\sqcup\{0,\ldots,N-1\}P={0,…,N−1}⊔{0,…,N−1}. For any set L⊆RPL\subseteq\mathbb R^PL⊆RP, its symplectic dual is the set of all u∈RPu\in\mathbb R^Pu∈RP such that, for every v∈Lv\in Lv∈L, there exists an integer kkk satisfying

∑j=0N−1(uleft,jvright,j−uright,jvleft,j)=k.\sum_{j=0}^{N-1}\bigl(u_{\mathrm{left},j}v_{\mathrm{right},j} -u_{\mathrm{right},j}v_{\mathrm{left},j}\bigr)=k.j=0∑N−1​(uleft,j​vright,j​−uright,j​vleft,j​)=k.

If LLL is empty, every uuu belongs to the dual. When N=0N=0N=0, the pairing is the empty sum 000, so the dual is the whole zero-dimensional space for every LLL.

QAlgorithms.Papers.Independent.Intakenext100.P12.tensorComb

For natural numbers N,nN,nN,n, a real number α\alphaα, coefficients c:{0,…,n−1}N→Cc:\{0,\ldots,n-1\}^N\to\mathbb Cc:{0,…,n−1}N→C, and a complex-valued Schwartz function fff on RN\mathbb R^NRN, this defines

tensorComb⁡N,n,α(c)(f)=∑j∈{0,…,n−1}Nc(j)∑z∈ZN′f ⁣((α(ji+nzi))i=0N−1).\operatorname{tensorComb}_{N,n,\alpha}(c)(f) =\sum_{j\in\{0,\ldots,n-1\}^N}c(j) \sum_{z\in\mathbb Z^N}'f\!\left(\bigl(\alpha(j_i+nz_i)\bigr)_{i=0}^{N-1}\right).tensorCombN,n,α​(c)(f)=j∈{0,…,n−1}N∑​c(j)z∈ZN∑′​f((α(ji​+nzi​))i=0N−1​).

There are no positivity assumptions on N,n,αN,n,\alphaN,n,α. The primed sum is the total infinite sum, assigned zero if the indexed family is not summable. If N>0N>0N>0 and n=0n=0n=0, the outer sum is empty and the value is zero; if N=0N=0N=0, both indexing spaces contain just the empty tuple and the value is c(∅)f(∅)c(\varnothing)f(\varnothing)c(∅)f(∅).

QAlgorithms.Papers.Independent.Intakenext100.P12.wignerKernel

For a natural number nnn, real number α\alphaα, index j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, and complex-valued Schwartz function fff on R2\mathbb R^2R2, this defines

12π∑(a,b)∈Z2∫Re ipαn(a−b)f ⁣(α ⁣(j+n(a+b)2),p) dp.\frac1{2\pi}\sum_{(a,b)\in\mathbb Z^2} \int_{\mathbb R} e^{\,ip\alpha n(a-b)} f\!\left(\alpha\!\left(j+\frac{n(a+b)}2\right),p\right)\,dp.2π1​(a,b)∈Z2∑​∫R​eipαn(a−b)f(α(j+2n(a+b)​),p)dp.

The integral is with respect to Lebesgue measure, and the infinite sum is indexed jointly by Z2\mathbb Z^2Z2. No positivity or nonzero condition is imposed on α\alphaα, and no separate integrability or summability hypothesis is supplied: a nonintegrable integrand has total integral zero, and a nonsummable family has total sum zero. When n=0n=0n=0, there is no admissible jjj.

QAlgorithms.Papers.Independent.Intakenext100.P12.wignerPMean

For natural numbers n,Mn,Mn,M, a real number α\alphaα, and a complex-valued Schwartz function fff on R\mathbb RR, this defines

12M+1∑t∈Z−M≤t≤M∑s∈Z{−f ⁣(πsnα),s,t both odd,f ⁣(πsnα),otherwise.\frac1{2M+1}\sum_{\substack{t\in\mathbb Z\\-M\le t\le M}} \sum_{s\in\mathbb Z} \begin{cases} -f\!\left(\dfrac{\pi s}{n\alpha}\right),&s,t\text{ both odd},\\ f\!\left(\dfrac{\pi s}{n\alpha}\right),&\text{otherwise}. \end{cases}2M+11​t∈Z−M≤t≤M​∑​s∈Z∑​⎩⎨⎧​−f(nαπs​),f(nαπs​),​s,t both odd,otherwise.​

The finite sum includes both endpoints, including the single term t=0t=0t=0 when M=0M=0M=0. No positivity or nonzero assumptions are imposed on nnn or α\alphaα; real division by zero gives zero, and each inner infinite sum is zero when its family is not summable.

QAlgorithms.Papers.Independent.Intakenext100.P12.wignerQMean

For natural numbers n,Mn,Mn,M, a real number α\alphaα, an index j∈{0,…,n−1}j\in\{0,\ldots,n-1\}j∈{0,…,n−1}, and a complex-valued Schwartz function fff on R\mathbb RR, this defines

12M+1∑s∈Z−M≤s≤M∑t∈Z{−f ⁣(αj+nαt2),s,t both odd,f ⁣(αj+nαt2),otherwise.\frac1{2M+1}\sum_{\substack{s\in\mathbb Z\\-M\le s\le M}} \sum_{t\in\mathbb Z} \begin{cases} -f\!\left(\alpha j+\dfrac{n\alpha t}{2}\right),&s,t\text{ both odd},\\ f\!\left(\alpha j+\dfrac{n\alpha t}{2}\right),&\text{otherwise}. \end{cases}2M+11​s∈Z−M≤s≤M​∑​t∈Z∑​⎩⎨⎧​−f(αj+2nαt​),f(αj+2nαt​),​s,t both odd,otherwise.​

The finite sum includes both endpoints, and each inner infinite sum is zero if its family is not summable. No positivity or nonzero assumption is imposed on α\alphaα. The case M=0M=0M=0 is included, with only s=0s=0s=0 in the finite sum; when n=0n=0n=0, there is no admissible jjj.

QAlgorithms.Papers.Independent.Intakenext100.P12.wignerSign

For any integers s,ts,ts,t, this defines the complex number

{−1,s mod 2=1 and t mod 2=1,1,otherwise.\begin{cases} -1,&s\bmod2=1\ \text{and}\ t\bmod2=1,\\ 1,&\text{otherwise}. \end{cases}{−1,1,​smod2=1 and tmod2=1,otherwise.​

Thus the value is −1-1−1 exactly when both integers are odd, including negative odd integers.

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

    Confirmed by the moderator at approval.

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