💎 Reusable layer
← all 85R0085

Time bound from a gate's eigenphase gap

API

Use this theorem

  1. Create a project

    Shell
    lake +leanprover/lean4:v4.35.0 new myproject std.toml
    cd myproject

    Standard template, not math: the math template adds its own Mathlib requirement pinned to the Lean release tag, not to the Mathlib commit this package is built and tested with, so you would get a second, different Mathlib. Mathlib comes in through this package. Skip this step in an existing project with the same Lean and Mathlib.

  2. Add the dependency to lakefile.toml

    TOML
    [[require]]
    name = "formalizations"
    git = "https://github.com/karlesmarin/formalizations"
    rev = "v0.16.0"
  3. Import the minimal module

    Lean 4
    import Formalizations.Reusable.Analysis

    In a file of the project, e.g. Example.lean.

  4. Paste the example

    Lean 4
    open Formalizations.Reusable Real Set
    open scoped Matrix Matrix.Norms.L2Operator
    open NormedSpace QSL.Qudit
    open QSL.TwoQubit (act)
    open MeasureTheory ProbabilityTheory in
    
    /-- R0085: `gate_time_ge_eigenphase_gap` turns a certified eigenphase gap into a
    lower bound on total gate time when the width Ω is positive. -/
    example {n : Type*} [Fintype n] [DecidableEq n]
        (Ω : ℝ) (hΩpos : 0 < Ω) (steps : List (ℝ × ℝ × Matrix n n ℂ))
        (hτ : ∀ s ∈ steps, 0 ≤ s.1) (hH : ∀ s ∈ steps, s.2.2.IsHermitian)
        (hΩ : ∀ s ∈ steps, ‖s.2.2 - (s.2.1 : ℂ) • (1 : Matrix n n ℂ)‖ ≤ Ω / 2)
        (ω : ℂ) (G : Matrix n n ℂ)
        (hUG : (steps.map fun s => exp ((-(s.1 : ℂ) * Complex.I) • s.2.2)).prod = ω • G)
        (ej ek : EuclideanSpace ℂ n) (hj : ‖ej‖ = 1) (hk : ‖ek‖ = 1)
        (hjk : inner ℂ ej ek = 0) (φj φk : ℝ)
        (hGj : act G ej = Complex.exp (φj * Complex.I) • ej)
        (hGk : act G ek = Complex.exp (φk * Complex.I) • ek)
        (hgap : |φj - φk| ≤ Real.pi) :
        |φj - φk| / Ω ≤ (steps.map Prod.fst).sum := by
      apply (div_le_iff₀ hΩpos).2
      simpa only [mul_comm] using
        gate_time_ge_eigenphase_gap Ω steps hτ hH hΩ ω G hUG ej ek hj hk hjk
          φj φk hGj hGk hgap

    Steps 3 and 4 together are a complete Lean file:FormalizationsTest/ReusableAnalysisExample.lean at v0.16.0, compiled by the CI.

  5. Fetch and check

    Shell
    lake update
    lake lean Example.lean

    lake update fetches this package and Mathlib, and Mathlib's update hook downloads the compiled Mathlib (lake exe cache get). lake lean Example.lean builds the imports of the file (steps 3 and 4) and checks it. If the file belongs to a lean_lib of your project, lake build <lib> does the same. Avoid a bare lake build in a project from the standard template: its default target is the executable, whose link compiles every imported Mathlib module to native code. Same versions required: Lean v4.35.0, Mathlib f0b4c81.

Alternative: import Formalizations.Reusable imports the whole layer (all areas).

For a product of nonnegative-time Hermitian evolutions with spectral width bounded by Ω, implementing a gate up to global phase, the gap of two orthonormal eigenvectors with eigenphases differing by at most π is at most Ω times total time.

Lean statement

Lean 4
theorem gate_time_ge_eigenphase_gap {n : Type*} [Fintype n] [DecidableEq n]
    (Ω : ℝ) (steps : List (ℝ × ℝ × Matrix n n ℂ))
    (hτ : ∀ s ∈ steps, 0 ≤ s.1) (hH : ∀ s ∈ steps, s.2.2.IsHermitian)
    (hΩ : ∀ s ∈ steps, ‖s.2.2 - (s.2.1 : ℂ) • (1 : Matrix n n ℂ)‖ ≤ Ω / 2)
    (ω : ℂ) (G : Matrix n n ℂ)
    (hUG : (steps.map fun s => exp ((-(s.1 : ℂ) * Complex.I) • s.2.2)).prod = ω • G)
    (ej ek : EuclideanSpace ℂ n) (hj : ‖ej‖ = 1) (hk : ‖ek‖ = 1)
    (hjk : inner ℂ ej ek = 0) (φj φk : ℝ)
    (hGj : act G ej = Complex.exp (φj * Complex.I) • ej)
    (hGk : act G ek = Complex.exp (φk * Complex.I) • ek)
    (hgap : |φj - φk| ≤ Real.pi) :
    |φj - φk| ≤ Ω * (steps.map Prod.fst).sum
Name
Formalizations.Reusable.gate_time_ge_eigenphase_gap
Import
import Formalizations.Reusable.Analysis
Version
formalizations 0.16.0Lean v4.35.0Mathlib f0b4c81
Role
API a lemma to import and build other proofs on
Provenance
QSL.Gate.gate_time_ge_eigenphase_gap in Formalizations.Physics.QuantumMechanics.SpeedLimit.GateEigenphases
Paper: none (the archive cites Nelson–Barnes, arXiv:2604.23031, eq. 3)
Classical reference
Mandelstam–Tamm type quantum speed limit; see assumptions in the theorem
Trust
standard axioms only propext, Classical.choice, Quot.sound
#print axioms in FormalizationsTest/Axioms.lean, audited by scripts/check_axioms.sh (2761 results), which the CI build workflow runs and passed at this commit.
Status
reusable not an upstream candidate
Area
Analysis

Links

Lean docstring

Time bound from a gate's eigenphase gap. A sequence of nonnegative-time Hermitian evolutions, each with spectral width at most Ω, needs total time at least |φj - φk| / Ω to implement a gate with two orthogonal eigenvectors whose phase gap is at most π. The formal inequality avoids division by Ω and includes a possible global phase ω.

  • Archive: QSL.Gate.gate_time_ge_eigenphase_gap (Formalizations.Physics.QuantumMechanics.SpeedLimit.GateEigenphases).
  • Classical reference: Mandelstam–Tamm type bound; the archive cites Nelson–Barnes, arXiv:2604.23031, equation (3), for this gate setting.
  • Example: apply the bound to an explicit two-eigenvector certificate.

Upstream

Uses the archive's gate action and Hilbert-space setup; Mathlib has no matching gate-time statement.

Depends on, in this repository

Formalizations.Physics.QuantumMechanics.SpeedLimit.GateEigenphases