§3.5: exact Hermitian two-dimensional Laplacian encoding (76)–(87)
OpenQAlgorithms.Papers.Independent.Extend50.P44.laplacianBaseLet , , , and let real spacings be nonzero. With row-major index , define the nonperiodic finite-difference matrix with diagonal , horizontal neighbor entries , vertical neighbor entries , and all off-grid entries zero. Fixed labels (80)-(84), H5 on 000,010,011,100,101, and circuit (86) give
There are five flags. Arithmetic gate count is at most for , with an absolute constant chosen before dimensions and spacings. Exact encoding also includes one-point coordinate directions and the one-point grid. This is a discrete operator statement, not an analytic finite-difference identity for arbitrary functions.
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P44
noncomputable section
namespace QAlgorithms.Papers.Independent.Extend50.P44
open scoped BigOperators ComplexConjugate Matrix
open QAlgorithms.Papers.Independent.Frontier18.P11 (complexMatrix)
open QAlgorithms.Papers.Independent.Information100.P34 (permutationMatrix)
open QAlgorithms.Papers.Independent.Next46.P21 (tCount)
variable {n s d m : ℕ}
/-- PDF pp.18-21, (76)-(87): exact Hermitian nonperiodic two-dimensional
Laplacian encoding. A single absolute arithmetic gate constant is uniform over
both grid dimensions and the nonzero spacings. Empty coordinate registers are
allowed; the asymptotic threshold avoids interpreting log 1 as zero total cost. -/
theorem laplacianBase :
∃ C : ℝ, 0 < C ∧ ∀ nx ny : ℕ,
∃ B : Scheme (nx + ny) 3 2 (nx + ny + 1), ∃ T : TransposeOracle B,
LaplacianLabels nx ny B ∧
(∀ l, (T.transpose l).2.val =
if l.1.val = 1 ∨ l.1.val = 2 then
(l.2.val + 2 ^ (nx + ny)) % 2 ^ (nx + ny + 1) else l.2.val) ∧
(1 ≤ nx + ny → ∃ work, B.ArithmeticSize (C * (nx + 2 * ny)) work) ∧
Fintype.card ((Bool × Bool) × Fin 8) = 2 ^ 5 ∧
∀ dx dy : ℝ, dx ≠ 0 → dy ≠ 0 →
B.matrix (laplacianTable dx dy) = laplacian nx ny dx dy ∧
QAlgorithms.IsBlockEncoding ((false, false), 0)
(B.baseCircuit (laplacianTable dx dy) true)
(10 * (1 / dx ^ 2 + 1 / dy ^ 2)) 0 (laplacian nx ny dx dy) ∧
(B.baseCircuit (laplacianTable dx dy) true)ᴴ =
B.baseCircuit (laplacianTable dx dy) true := by sorry
end QAlgorithms.Papers.Independent.Extend50.P44
end
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
There exists a real constant such that, for every pair of natural numbers , including zero, the following holds. Write , , and . There exist a scheme and a transpose permutation with these properties: has column and row bijections , a Boolean validity function , and two unitary matrices ; the scheme’s bit balance is , both slot sets equal , every valid label has both its column slot and its row slot in , and two valid labels having the same column position and the same row position must be equal. Both and have first column equal to on and zero elsewhere. For every label ,
and, whenever ,
where this subtraction is an equality in the integers. The permutation is involutive, preserves and validity, satisfies and , and has second component
If , there is a natural number and three finite reversible Boolean gate lists on wires whose total length is at most . Each gate flips one target bit precisely when all its control bits are true, has at most two control wires, and never uses its target as a control. Starting with zero work bits, these lists respectively implement the column bijection, the row bijection, and the map that flips the second flag exactly on invalid labels; the first two preserve both flags, and all three return the work bits to zero. Labels are encoded as two flags followed by the most significant first binary encodings of their two numerical components. Also, the ancilla index set has cardinality . For every pair of nonzero real numbers , put and . The matrix obtained by assigning to each valid label’s row and column positions,
equals the matrix whose diagonal entries are , whose off-diagonal entry is when and , is when and , and is zero otherwise. Define to have diagonal entries and both off-diagonal entries . On two flags and a label, define by
Let be the permutation matrices implementing while preserving the flags, and let apply to the slot register while preserving flags and position. After regrouping flags and slot as the ancilla register, the matrix , which is the stated base circuit, is unitary, satisfies
and satisfies . The scheme and transpose permutation are chosen independently of . The case is included; only the arithmetic-size conclusion is conditional on .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.