QuantumComputinglib learn · inspect · formalize
Checked on this commit 4,524 public declarations commit c681192368c2 Build record

Lean source module

QuantumBlockEncoding/HermiteExplicitBond.lean

11 explicit public declarations in source order.

Back to Library Explorer

def · line 19

QuantumBlockEncoding.HermiteExplicitBond.scalarEquiv

Compiled Compiled

This definition gives the library's named construction or computation for “scalar equiv”.

def scalarEquiv : Fin 2 ≃ ScalarBond :=
  (finSuccEquiv 1).trans (Equiv.optionCongr finOneEquiv)

/-- Layout: two left-tail states, middle boundary then `2*k+2` Bernstein
states, and finally the right-tail state. All maps are executable. -/

commit-pinned source · Verso Blueprint panel

def · line 24

QuantumBlockEncoding.HermiteExplicitBond.bondEquiv

Compiled Compiled

This definition gives the library's named construction or computation for “bond equiv”. Layout: two left-tail states, middle boundary then '2*k+2' Bernstein states, and finally the right-tail state.

def bondEquiv (k : ℕ) : Fin (2 * k + 6) ≃ HermiteFiniteBond k :=
  (finCongr (show 2 * k + 6 = 2 + ((2 * k + 1 + 1 + 1) + 1) by omega)).trans
    (finSumFinEquiv.symm.trans (Equiv.sumCongr scalarEquiv
      (finSumFinEquiv.symm.trans
        (Equiv.sumCongr (finSuccEquiv (2 * k + 1 + 1)) finOneEquiv))))

commit-pinned source · Verso Blueprint panel

def · line 30

QuantumBlockEncoding.HermiteExplicitBond.kernel

Compiled Compiled

This definition gives the library's named construction or computation for “kernel”.

noncomputable def kernel (k n : ℕ) (L : ℝ) : MatrixProductChain.Kernel (2 * k + 6) :=
  fun t bit a b => hermiteKernel k n L (n - t) (decide (bit = 1))
    (bondEquiv k a) (bondEquiv k b)

commit-pinned source · Verso Blueprint panel

def · line 34

QuantumBlockEncoding.HermiteExplicitBond.initial

Compiled Compiled

This definition gives the library's named construction or computation for “initial”.

noncomputable def initial (k n : ℕ) (L : ℝ) : Fin (2 * k + 6) → ℝ :=
  fun a => hermiteInitial k n L (bondEquiv k a)

commit-pinned source · Verso Blueprint panel

def · line 37

QuantumBlockEncoding.HermiteExplicitBond.terminal

Compiled Compiled

This definition gives the library's named construction or computation for “terminal”.

noncomputable def terminal (k : ℕ) : Fin (2 * k + 6) → ℝ :=
  fun a => hermiteTerminal k (bondEquiv k a)

commit-pinned source · Verso Blueprint panel

theorem · line 40

QuantumBlockEncoding.HermiteExplicitBond.kernel_readout

Compiled Compiled

Lean checks the proposition indexed as “kernel readout”; the hypotheses and conclusion in the code panel fix its exact scope.

theorem kernel_readout (k n : ℕ) (L : ℝ) (m start : ℕ)
    (h : start + m = n + 1) (x : Word m) (a : Fin (2 * k + 6)) :
    MatrixProductChain.readout (kernel k n L) (terminal k) start x a =
      kernelContract (hermiteKernel k n L) (hermiteTerminal k) (toBits x)
        (bondEquiv k a) := by

commit-pinned source · Verso Blueprint panel

def · line 57

QuantumBlockEncoding.HermiteExplicitBond.rawSourceChain

Compiled Compiled

This definition gives the library's named construction or computation for “raw source chain”.

noncomputable def rawSourceChain (k n : ℕ) (L : ℝ) : Chain (n + 1) 1 1 :=
  MatrixProductChain.ofKernel (kernel k n L) (initial k n L) (terminal k) 0 n

commit-pinned source · Verso Blueprint panel

theorem · line 60

QuantumBlockEncoding.HermiteExplicitBond.rawSourceChain_contract

Compiled Compiled

Lean checks the proposition indexed as “raw source chain contract”; the hypotheses and conclusion in the code panel fix its exact scope.

theorem rawSourceChain_contract (k n : ℕ) (L : ℝ) (hL : 0 < L)
    (x : Word (n + 1)) :
    contract (rawSourceChain k n L) x 0 0 =
      HermiteStatePreparation.sampledAmplitude k (n + 1) L
        (sampleEquiv (n + 1) x) := by

commit-pinned source · Verso Blueprint panel

theorem · line 78

QuantumBlockEncoding.HermiteExplicitBond.same_literal_source

Compiled Compiled

Lean checks the proposition indexed as “same literal source”; the hypotheses and conclusion in the code panel fix its exact scope. Equality of the observable source, not an unproved equality of layouts.

theorem same_literal_source (k n : ℕ) (L : ℝ) (hL : 0 < L)
    (x : Word (n + 1)) :
    contract (rawSourceChain k n L) x 0 0 =
      contract (HermiteFiniteNorm.rawSourceChain k n L) x 0 0 := by

commit-pinned source · Verso Blueprint panel

theorem · line 84

QuantumBlockEncoding.HermiteExplicitBond.rawSourceChain_maxBond

Compiled Compiled

Lean checks the proposition indexed as “raw source chain max bond”; the hypotheses and conclusion in the code panel fix its exact scope.

theorem rawSourceChain_maxBond (k n : ℕ) (L : ℝ) :
    maxBond (rawSourceChain k n L) ≤ 2 * k + 6 := by

commit-pinned source · Verso Blueprint panel

theorem · line 90

QuantumBlockEncoding.HermiteExplicitBond.rawSourceChain_norm

Compiled Compiled

Lean checks the proposition indexed as “raw source chain norm”; the hypotheses and conclusion in the code panel fix its exact scope.

theorem rawSourceChain_norm (k n : ℕ) (L : ℝ) (hL : 0 < L) :
    TensorTrainNormEnvironment.norm (rawSourceChain k n L) =
      HermiteStatePreparation.sampleNorm k (n + 1) L :=
  TensorTrainNormEnvironment.norm_eq_of_contract (rawSourceChain k n L)
    (sampleEquiv (n + 1)) (HermiteStatePreparation.sampledAmplitude k (n + 1) L)
    (rawSourceChain_contract k n L hL)

commit-pinned source · Verso Blueprint panel