QuantumComputinglib learn · inspect · formalize
Checked on this commit 2,822 public declarations commit 07559c3d051f Build record

Block encoding · Exact primitive source reproductions and certified same-tier winner

GHL Eq. (9) benchmark at N=8 (A1=B1=0)

For the N=8 specialization of GHL Eq. (9), set the Robin coefficients A1=B1=0 and factor out the global Delta x^{-2}. Construct an exact primitive unitary whose clean block encodes the resulting fourth-order-accurate second-derivative stencil.

Lean certifiedLean block-encodes the dimensionless A1=B1=0 specialization of GHL Eq. (9), explicitly distinguishes it from the physical Delta x^{-2} matrix, closes both source realizations and the evolved candidate at the exact primitive level, and certifies the candidate's same-tier improvement.

Read this before the proof dashboard

Follow a research paper from the access model assumed by quantum algorithms all the way to a gate-level block encoding, then compare it with an evolved exact circuit.

Hamiltonian-simulation papers often begin by saying 'assume an oracle for H' or 'assume a block encoding of H'. Guseynov, Huang, and Liu ask what it actually costs to build that access for finite-difference PDE operators with Robin boundaries and piecewise coefficients. Their goal is explicit gate-level construction rather than leaving matrix access as a black box.

The full pipeline is: discretize the PDE -> homogenize and Schrodingerise it -> obtain a Hermitian Hamiltonian H -> construct a block encoding U_H -> feed U_H to QSVT/Hamiltonian simulation to approximate exp(-iHt) -> postselect auxiliary registers to recover the solution state. The paper assumes the initial PDE condition is already provided as a quantum state, and explicitly warns that state-preparation and measurement costs can erase an apparent speedup.

Whole algorithm first

Where this block encoding sits in the quantum algorithm

1. PDE

Start with a linear PDE containing derivatives, variable coefficients, a source term, and Robin boundary conditions.

2. Finite differences

Replace spatial derivatives by a sparse matrix A on N=2^n grid points. Boundary rows differ from the periodic bulk.

3. Schrodingerisation

Embed the non-Hermitian evolution into a larger Hermitian Hamiltonian H so it can be simulated by unitary quantum dynamics.

4. Block encoding

Build an explicit unitary U_H whose clean ancilla block equals H/alpha.

5. QSVT / Hamiltonian simulation

Use the block encoding as the input oracle for a polynomial transformation approximating exp(-iHt).

6. Output

Apply the evolution to the encoded initial state and postselect the auxiliary registers to recover a state proportional to the PDE solution.

Read the circuit

What the wires and stages are doing

1
Selector/register labels

The sparse selector s says which finite-difference band/position is being addressed; the system register j stores the grid index.

2
PREPARE

Create a coherent superposition over sparse slots instead of classically looping over them.

3
Indicator

Mark whether j belongs to the periodic-like bulk or the Robin boundary region.

4
RY coefficient loading

Turn a normalized matrix coefficient into an amplitude on a clean coefficient qubit.

5
Sparse access / SELECT

Reversibly move from (slot,column) to the matrix row addressed by that slot.

6
Uncompute

Undo temporary address/indicator information so the selected ancillas return to |0>; only then does the clean projected block have the desired matrix meaning.

The detailed circuit diagrams generated from the case record appear below this tutorial.

Statement → proof → optional Lean

The mathematical claims, in the order a human would prove them

GHL Theorem 3 · source theorem, faithfully restated

One-term block encoding for f(x) times a sparse Robin derivative

\[A_k\sim f(x)\,\frac{\partial^m}{\partial x^m},\qquad U_{A_k}^{(1)}\text{ is an }(N_DN_f\kappa,\lceil\log_2n\rceil+\lceil\log_2G_f\rceil+\lceil\log_2\kappa\rceil+4,0)\text{-block encoding}\]

For a piecewise-continuous coefficient f with G_f pieces and polynomial complexity Q_g, and a 2^n by 2^n kappa-sparse finite-difference derivative matrix with Robin boundaries, the paper constructs a one-term block encoding. Its stated gate complexity is O(sum_g Q_g n log n + kappa n) with 2n pure ancillas.

Proof story

  1. Exploit periodic bulkAway from the boundary, the Robin stencil agrees with the familiar periodic stencil, so one reusable sparse-amplitude construction handles most indices.
  2. Mark the boundaryAn indicator qubit distinguishes bulk indices from the O(1)-width boundary region.
  3. Load derivative coefficientsUse the sparse derivative amplitude oracle in the bulk and controlled RY rotations for individual boundary entries.
  4. Apply sparse accessA reversible banded-sparse-access map transports the selector and grid index to the matrix location required by the derivative stencil.
  5. Load f(x)Multiply in the piecewise coefficient through its amplitude/block-encoding construction.
  6. Swap and uncomputeTransport the registers back through the inverse access maps so workspace is clean.
  7. Read the clean blockPREPARE/unprepare interference leaves A_k/(N_D N_f kappa) in the ancilla-zero block.
Show the Lean proof checkpoints

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

GHL Theorem 4 · source theorem, faithfully restated

Combine the one-term blocks into the full Schrodingerised Hamiltonian

\[A=\sum_{k=0}^{\eta-1}A_k,\quad S_1=\begin{pmatrix}(A+A^\dagger)/2&B/2\\B/2&0\end{pmatrix},\quad S_2=\begin{pmatrix}(A-A^\dagger)/(2i)&B/(2i)\\-B/(2i)&0\end{pmatrix},\quad H=S_1\otimes x_\xi+S_2\otimes I_\xi\]

The paper states that the structured one-dimensional Hamiltonian H has an O(kappa ||H||_max)-normalized block encoding using logarithmic selector/register overhead, with total gate complexity obtained from the coefficient-function loaders, the one-term sparse derivative blocks, and the x_xi diagonal block. The theorem reports 2n+2 pure ancillas.

Proof story

  1. Build every A_kUse the one-term result for each coefficient-times-derivative term.
  2. LCU to form ACombine the A_k block encodings into a block encoding of A=sum_k A_k; the adjoint circuit gives A^dagger.
  3. Build B and x_xiUse the diagonal-function block-encoding theorem for the source/homogenization block B and the Schrodingerisation coordinate x_xi.
  4. LCU to form S1 and S2Combine controlled A/A^dagger with X tensor B and Y tensor B so the clean blocks become the two Hermitian matrices S1 and S2.
  5. Final LCUCombine U_S1, U_S2, and the block encoding of x_xi one last time to obtain H.
  6. Source-fidelity auditASPBE also checks the printed phase choices in the first S1 LCU line: the literal full-clean-matrix reading leaves a filler term, so the site records the discrepancy and the phase-balanced correction instead of silently changing the paper.
Show the Lean proof checkpoints

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

Do not overread the formalization

Paper theorem → exact Lean scope

The source theorem and the machine-checked theorem do not automatically have the same scope. These cards state exactly which layer is closed and which general compiler statement remains separate.

GHL Theorem 3 · source theorem, faithfully restated · paper scope → Lean scope

One-term block encoding for f(x) times a sparse Robin derivative

Paper scope: an arbitrary-width one-term construction with the stated asymptotic resource bound. Lean scope: the theorem metadata and reusable sparse-access semantics are formalized, and the N=8 Figure-4 specialization is closed through an exact primitive VerifiedOperatorBlockEncoding. A uniform arbitrary-width primitive compiler proving every source-oracle gate bound remains a separate planned frontier; the fixed-N=8 roots below must not be read as that stronger compiler theorem.

Show the Lean alignment roots

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

GHL Theorem 4 · source theorem, faithfully restated · paper scope → Lean scope

Combine the one-term blocks into the full Schrodingerised Hamiltonian

Paper scope: the one-dimensional A-to-H Hamiltonian composition. Lean scope: the finite-sum adjoint bridge, S1/S2 clean-block algebra, final H formula, normalization/layout records, and the source phase audit are compiled. The printed first S1 phase pair is proved inconsistent under the literal full-clean-matrix reading, and a phase-balanced correction is separately proved before the aggregate Theorem-4 route is marked closed.

Show the Lean alignment roots

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

Paper assumption → plain language → Lean evidence

Source conventions translated before the audit log

These are the conventions that change the mathematical or resource contract. Read the explanation first; the raw transcription and implementation audit remains collapsed later on the page.

A query oracle is an access contract, not a free physical gate

Paper assumption / source issue. The paper contrasts an abstract digital matrix-entry query O_H with explicit sparse-access and amplitude/block-encoding circuits.

Plain language. When an algorithm says it makes one query, it means one call to a promised reversible data-access subroutine. The arithmetic, memory lookup, boundary tests, and ancillas hidden inside that call may still be expensive to build.

Why it matters. GHL's construction is useful precisely because it opens this black box for the structured Robin operator; ASPBE therefore reports oracle calls separately from primitive gates.

Show the Lean evidence

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

Figure 4 applies its bulk indicator to D-transpose

Paper assumption / source issue. The source circuit's indicator is interpreted on a row of D-transpose, so the fixed N=8 realization selects the corresponding columns of D rather than a naively read row window.

Plain language. The circuit is moving between row and column viewpoints. Reading the indicator against the wrong orientation changes which boundary entries receive special treatment.

Why it matters. This choice changes the executable circuit, so ASPBE proves the transported bulk action before accepting the Figure-4 clean block.

Show the Lean evidence

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

Standard RY uses a half angle

Paper assumption / source issue. Equation (27) prints a single arccos coefficient angle; under the standard RY(theta) convention the executable angle must be 2 arccos(c).

Plain language. An RY rotation places cos(theta/2), not cos(theta), in the clean amplitude. To load coefficient c exactly, theta must therefore equal 2 arccos(c).

Why it matters. Using the printed single-arccos expression would certify the wrong amplitude. ASPBE retains the typo transcript but proves the corrected standard-RY circuit.

Show the Lean evidence

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

Seven source slots are an LCU decomposition, not a sparse-enumeration oracle

Paper assumption / source issue. The historical split-seven weighted-permutation representation can send distinct nonzero slots to the same matrix entry.

Plain language. Two selector labels may contribute amplitudes to the same matrix location. That is legal for a linear-combination-of-unitaries construction, but it is not the promise made by a one-nonzero-per-slot sparse enumerator.

Why it matters. Treating the seven labels as a sparse oracle would silently strengthen the access promise. ASPBE instead proves the weighted-permutation sum and records the duplicate access explicitly.

Show the Lean evidence

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

Only the clean projected block is the encoded operator

Paper assumption / source issue. Temporary selector, indicator, coefficient, and address workspaces are uncomputed before the clean block is read.

Plain language. A block encoding does not claim that the full unitary equals the PDE matrix. It claims that when designated ancillas start and end at zero, the selected submatrix equals the normalized target.

Why it matters. Full-space behavior on dirty workspace states may be compiler-dependent; the theorem must therefore prove the declared zero-workspace projection, not an informal whole-unitary equality.

Show the Lean evidence

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

The Theorem-4 phase discrepancy is recorded, not silently repaired

Paper assumption / source issue. With Eq. (29)'s filler convention, the printed first-line phases pi and -pi in Eq. (30) both contribute -1 and leave a nonzero lower-right filler block.

Plain language. The two printed phases do not cancel: exp(i*pi)=exp(-i*pi)=-1. A literal matrix sum therefore cannot equal the displayed S1 block unless the filler is corrected.

Why it matters. Source fidelity requires distinguishing what the paper prints from the corrected executable identity. Lean proves the obstruction and then proves a phase-balanced S1 construction; S2 closes as printed.

Show the Lean evidence

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

The 106-vs-312-vs-881 claim lives on one frozen compiler tier

Paper assumption / source issue. For the N=8 comparison, all candidates use exact {X, RY, RZ, CX} primitive programs, all-to-all connectivity, the same target/normalizer, and zero abstract oracle calls.

Plain language. Resource numbers are comparable only after the target, gate vocabulary, connectivity, ancilla convention, and oracle accounting have been frozen. Otherwise a smaller number may simply be using a different cost model.

Why it matters. ASPBE's winner is a strict same-tier theorem, not a universal circuit lower bound. The evolved circuit is better in gate count, depth, and auxiliary-qubit coordinates while oracle calls stay equal.

Show the Lean evidence

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

What ASPBE improves

Evolved theorem: a strictly cheaper exact block encoding for the frozen Robin benchmark

\[c_{\mathrm{XOR}}=(106,96,3,0)\prec_{\mathrm{lex}}c_{\mathrm{paper7}}=(312,266,5,0),\qquad c_{\mathrm{XOR}}\prec_{\mathrm{lex}}c_{\mathrm{Fig.4}}=(881,674,6,0)\]

All three circuits encode the same dimensionless N=8 target with alpha=56/3, zero error, the same exact primitive basis {X,RY,RZ,CX}, the same all-to-all connectivity convention, and clean workspaces. Lean certifies the XOR four-slot circuit and proves both strict comparisons. This is a benchmark/compiler theorem, not a global lower bound over all possible quantum circuits.

Why the proof is allowed to say “better”

  1. Use centrosymmetryPair matrix indices related by reversal so the 8 by 8 target decomposes into two smaller symmetry sectors.
  2. Use four XOR slotsWithin each sector, index the required positions by two selector bits using XOR rather than a carry-producing modular adder.
  3. Load exact amplitudesA uniformly controlled RY compiler realizes the 32 exact coefficient branches with structured exact-angle semantics.
  4. Simplify SELECTThe XOR addressing rule reduces SELECT to two CX gates on the pair-coordinate bits.
  5. Refine to primitivesLean proves the product of the emitted X/RY/RZ/CX gates equals the previously verified logical unitary, not merely a floating-point approximation.
  6. Inherit the clean-block theoremExact primitive equality transports the already-proved logical clean block to the primitive circuit.
  7. Compute and compare costResource tuples are derived from the primitive programs and the betterThan theorems establish strict same-tier dominance.
Show the Lean winner/comparison theorems

The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.

Mathematical target

The equation being studied

\[A_{\mathrm{GHL}}^{(9)}=\Delta x^{-2}\,\widetilde A(A_1\Delta x,B_1\Delta x),\qquad \widetilde A_0:=\widetilde A(0,0)=\frac1{12}\begin{pmatrix}-30&32&-2&0&0&0&0&0\\16&-31&16&-1&0&0&0&0\\-1&16&-30&16&-1&0&0&0\\0&-1&16&-30&16&-1&0&0\\0&0&-1&16&-30&16&-1&0\\0&0&0&-1&16&-30&16&-1\\0&0&0&0&-1&16&-31&16\\0&0&0&0&0&-2&32&-30\end{pmatrix},\qquad \Pi U\Pi^\dagger=\frac{\widetilde A_0}{56/3}=\frac{M}{224},\quad M=12\widetilde A_0.\]

The displayed and Lean-certified target is not the full symbolic Eq. (9) matrix. It is the dimensionless N=8 stencil A_tilde_0 obtained after setting A1=B1=0; for the homogeneous benchmark A2=B2=0 as well, and those two constants affect only the source vector. Lean proves three exact primitive block encodings of A_tilde_0 under one frozen convention: the padded paper-seven normal form, a fixed-N8 and f=1 standard-RY-corrected realization of Figure 4, and the evolved XOR four-slot candidate. The normalizer 56/3 belongs to A_tilde_0. Restoring the paper's physical Delta x^{-2} factor gives normalizer 56/(3 Delta x^2).

A_GHL^(9)
the physical matrix in paper Eq. (9), including the global Delta x^{-2} factor and general A1,B1 dependence
A_tilde_0
the dimensionless N=8 specialization at A1=B1=0; this is the matrix displayed and block-encoded here
M=12 A_tilde_0
the integer matrix used by the exact decomposition proofs
alpha=56/3
the normalizer for A_tilde_0; the physical Eq. (9) matrix uses 56/(3 Delta x^2)
T2
the exact high-level unitary and clean block are proved; named loaders and SELECT operations may remain logical stages
T3
every logical stage is expanded into the frozen exact basis {X, RY(theta), RZ(theta), CX}, and Lean proves that the primitive product equals the T2 unitary

Circuit anatomy

How the candidate acts

These blocks show logical stages and register responsibilities. They do not pretend an unresolved logical oracle is already a primitive hardware gate.

Register orderEach route declares its own wire order; all use exact {X, RY(theta), RZ(theta), CX} gates and clean workspaces
01

Paper-seven normal form

8 wires; 312 gates; depth 266

padded-seven PREPARE6-control RYsparse SELECTunprepare
02

Fixed-N8 Figure 4

9 wires; 881 gates; depth 674

PREPARED-transpose indicatorbulk/boundary RYD-transpose accessSWAPD inverseunprepare
03

Evolved XOR four-slot

6 wires; 106 gates; depth 96

pair basis CXsector RY5-control UCRYXOR SELECTuncompute

Auditable evolution

Candidate and proof progression

All scored points below use the same exact primitive basis, normalizer 56/3, zero error, all-to-all connectivity, little-endian indexing, clean workspaces, and score order (gates, depth, auxiliary qubits, oracle calls). The comparison is benchmark- and compiler-specific, not a global optimality theorem.

iterationaudit

Sparse-source correction

Source interpretation certified

Lean detects duplicate nonzero accesses in the historical split-seven LCU and replaces it with a true padded-seven sparse enumeration.

Sparse-source correction(s,j)audit addressdeduplicate7 padded slots
Grouped-register circuit. Open the source or workbench to adapt notation.
Lean rootQuantumBlockEncoding.Robin.warmRobinSourceSevenSparseDecomposition Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[column sep=.45cm]
\lstick{$(s,j)$} & \gate{\mathrm{audit\;address}} & \gate{\mathrm{deduplicate}} & \rstick{$7\;padded\;slots$} \qw
\end{quantikz}
not ranked at this tier
iteration0

Fixed-N8 Figure-4 realization

Lean-certified source circuit

The full source order uses the corrected D-transpose bulk window, standard-RY doubled angles, transported cleanup, and f=1 constant folding.

Fixed-N8 Figure-4 realization|0^3>_sH_WO_D^T^BS(O_D^BS)^†H_W^†ket0_cR_y(2arccos(D/N_D))ket jU_ indicSWAP
Grouped-register circuit. Open the source or workbench to adapt notation.
Lean rootQuantumBlockEncoding.Robin.warmRobinFigure4PrimitiveVerifiedBlockEncoding Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[row sep=.35cm, column sep=.24cm]
\lstick{$\ket{0^3}_s$} & \gate{H_W} & \ctrl{2} & \qw & \gate{O_{D^T}^{BS}} & \qw & \gate{(O_D^{BS})^\dagger} & \gate{H_W^\dagger} & \qw \\
\lstick{$\ket0_c$}     & \qw        & \qw      & \gate{R_y(2\arccos(D/N_D))} & \qw & \qw & \qw & \qw & \qw \\
\lstick{$\ket j$}      & \qw        & \gate{U_{\rm indic}} & \qw & \qw & \gate{\mathrm{SWAP}} & \qw & \qw & \qw
\end{quantikz}
881gates674depth6aux0oracles

Primitive split427 single-qubit454 CX

Exact ASPBE primitive list; not the paper's undecomposed simulator instruction count.

iteration1

Paper-seven normal form

Lean-certified source normal form

The equivalent sparse source contract compiles directly as PREPARE, amplitude loading, modular-add SELECT, and unprepare.

Paper-seven normal form|0^3>_sPREPARE_7PREPARE_7^†ket0_cR_y(2arccos w_s)ket jSELECT_+delta_s
Grouped-register circuit. Open the source or workbench to adapt notation.
Lean rootQuantumBlockEncoding.Robin.warmRobinPaperSevenPrimitiveVerifiedBlockEncoding Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[row sep=.35cm, column sep=.35cm]
\lstick{$\ket{0^3}_s$} & \gate{\mathrm{PREPARE}_7} & \ctrl{1} & \ctrl{2} & \gate{\mathrm{PREPARE}_7^\dagger} & \qw \\
\lstick{$\ket0_c$}     & \qw & \gate{R_y(2\arccos w_s)} & \qw & \qw & \qw \\
\lstick{$\ket j$}      & \qw & \qw & \gate{\mathrm{SELECT}_{+\delta_s}} & \qw & \qw
\end{quantikz}
312gates266depth5aux0oracles

Primitive split137 single-qubit175 CX

Exact ASPBE primitive list under the same compiler and connectivity.

iteration2

XOR four-slot primitive

Certified same-tier winner

Two compiled betterThan theorems establish the strict gate-count improvement over both source realizations.

XOR four-slot primitive|0^2>_sPREPARE_4PREPARE_4^†ket0_cUCRY(w_s,j)ket jpair basisXOR SELECTuncompute
Grouped-register circuit. Open the source or workbench to adapt notation.
Lean rootQuantumBlockEncoding.Robin.warmRobinBestVerified Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[row sep=.35cm, column sep=.32cm]
\lstick{$\ket{0^2}_s$} & \gate{\mathrm{PREPARE}_4} & \ctrl{1} & \ctrl{2} & \gate{\mathrm{PREPARE}_4^\dagger} & \qw \\
\lstick{$\ket0_c$}     & \qw & \gate{\mathrm{UCRY}(w_{s,j})} & \qw & \qw & \qw \\
\lstick{$\ket j$}      & \gate{\mathrm{pair\;basis}} & \qw & \gate{\mathrm{XOR\!\ SELECT}} & \gate{\mathrm{uncompute}} & \qw
\end{quantikz}
106gates96depth3aux0oracles

Primitive split38 single-qubit68 CX

Exact ASPBE primitive list under the same compiler and connectivity.

Reader workbench

Edit, preview, then copy

Change symbols, language, proof steps, or the grouped-register circuit locally in your browser. The preview is explanatory; the linked Lean declaration remains the certificate.

Mathematical construction

Proof steps

One step per line. Natural language and inline mathematics are both accepted.

    Quantum circuit

    Complete packet

    Copy the reviewed construction and proof

    The packet below is generated from the reviewed case record. The exact primitive authority is the linked Lean source and executable artifact.

    Construction and circuit LaTeX
    % Requires: \usepackage{quantikz}
    \paragraph{Construction.}
    \[
    A_{\mathrm{GHL}}^{(9)}=\Delta x^{-2}\,\widetilde A(A_1\Delta x,B_1\Delta x),\qquad \widetilde A_0:=\widetilde A(0,0)=\frac1{12}\begin{pmatrix}-30&32&-2&0&0&0&0&0\\16&-31&16&-1&0&0&0&0\\-1&16&-30&16&-1&0&0&0\\0&-1&16&-30&16&-1&0&0\\0&0&-1&16&-30&16&-1&0\\0&0&0&-1&16&-30&16&-1\\0&0&0&0&-1&16&-31&16\\0&0&0&0&0&-2&32&-30\end{pmatrix},\qquad \Pi U\Pi^\dagger=\frac{\widetilde A_0}{56/3}=\frac{M}{224},\quad M=12\widetilde A_0.
    \]
    
    % Sparse-source correction
    \begin{quantikz}[column sep=.45cm]
    \lstick{$(s,j)$} & \gate{\mathrm{audit\;address}} & \gate{\mathrm{deduplicate}} & \rstick{$7\;padded\;slots$} \qw
    \end{quantikz}
    
    % Fixed-N8 Figure-4 realization
    \begin{quantikz}[row sep=.35cm, column sep=.24cm]
    \lstick{$\ket{0^3}_s$} & \gate{H_W} & \ctrl{2} & \qw & \gate{O_{D^T}^{BS}} & \qw & \gate{(O_D^{BS})^\dagger} & \gate{H_W^\dagger} & \qw \\
    \lstick{$\ket0_c$}     & \qw        & \qw      & \gate{R_y(2\arccos(D/N_D))} & \qw & \qw & \qw & \qw & \qw \\
    \lstick{$\ket j$}      & \qw        & \gate{U_{\rm indic}} & \qw & \qw & \gate{\mathrm{SWAP}} & \qw & \qw & \qw
    \end{quantikz}
    
    % Paper-seven normal form
    \begin{quantikz}[row sep=.35cm, column sep=.35cm]
    \lstick{$\ket{0^3}_s$} & \gate{\mathrm{PREPARE}_7} & \ctrl{1} & \ctrl{2} & \gate{\mathrm{PREPARE}_7^\dagger} & \qw \\
    \lstick{$\ket0_c$}     & \qw & \gate{R_y(2\arccos w_s)} & \qw & \qw & \qw \\
    \lstick{$\ket j$}      & \qw & \qw & \gate{\mathrm{SELECT}_{+\delta_s}} & \qw & \qw
    \end{quantikz}
    
    % XOR four-slot primitive
    \begin{quantikz}[row sep=.35cm, column sep=.32cm]
    \lstick{$\ket{0^2}_s$} & \gate{\mathrm{PREPARE}_4} & \ctrl{1} & \ctrl{2} & \gate{\mathrm{PREPARE}_4^\dagger} & \qw \\
    \lstick{$\ket0_c$}     & \qw & \gate{\mathrm{UCRY}(w_{s,j})} & \qw & \qw & \qw \\
    \lstick{$\ket j$}      & \gate{\mathrm{pair\;basis}} & \qw & \gate{\mathrm{XOR\!\ SELECT}} & \gate{\mathrm{uncompute}} & \qw
    \end{quantikz}
    English proof LaTeX
    \paragraph{Proof.}
    The displayed and Lean-certified target is not the full symbolic Eq. (9) matrix. It is the dimensionless N=8 stencil A_tilde_0 obtained after setting A1=B1=0; for the homogeneous benchmark A2=B2=0 as well, and those two constants affect only the source vector. Lean proves three exact primitive block encodings of A_tilde_0 under one frozen convention: the padded paper-seven normal form, a fixed-N8 and f=1 standard-RY-corrected realization of Figure 4, and the evolved XOR four-slot candidate. The normalizer 56/3 belongs to A_tilde_0. Restoring the paper's physical Delta x^{-2} factor gives normalizer 56/(3 Delta x^2).
    \begin{enumerate}
      \item Lean detects duplicate nonzero accesses in the historical split-seven LCU and replaces it with a true padded-seven sparse enumeration.
      \item The full source order uses the corrected D-transpose bulk window, standard-RY doubled angles, transported cleanup, and f=1 constant folding.
      \item The equivalent sparse source contract compiles directly as PREPARE, amplitude loading, modular-add SELECT, and unprepare.
      \item Two compiled betterThan theorems establish the strict gate-count improvement over both source realizations.
    \end{enumerate}
    Each advertised certificate is the named Lean declaration linked on this page.
    Lean declaration retrieval block
    import QuantumBlockEncoding
    
    #check QuantumBlockEncoding.Robin.warmRobin_normalized_eq_integer_div_224
    #check QuantumBlockEncoding.RobinEvolution.warmRobinTarget_eq_paperEq9_dimensionless_A1_B1_zero
    #check QuantumBlockEncoding.Robin.warmRobinSplitSeven_duplicate_nonzero_access
    #check QuantumBlockEncoding.Robin.warmRobinSourceSevenSparseDecomposition
    #check QuantumBlockEncoding.Robin.warmRobinFigure4TransposeBulk_matches_periodic
    #check QuantumBlockEncoding.Robin.warmRobinPaperSevenPrimitive_eval_eq_logical
    #check QuantumBlockEncoding.Robin.warmRobinPaperSevenPrimitive_cleanBlock
    #check QuantumBlockEncoding.Robin.warmRobinPaperSevenPrimitiveVerifiedBlockEncoding
    #check QuantumBlockEncoding.Robin.warmRobinFigure4TransportedPostSwapCleanup
    #check QuantumBlockEncoding.Robin.warmRobinFigure4Primitive_eval_eq_logical
    #check QuantumBlockEncoding.Robin.warmRobinFigure4PrimitiveCircuit_cleanBlock
    #check QuantumBlockEncoding.Robin.warmRobinFigure4PrimitiveVerifiedBlockEncoding
    #check QuantumBlockEncoding.Robin.warmRobinXorFourSlotPrimitive_eval_eq_flatUnitary
    #check QuantumBlockEncoding.Robin.warmRobinXorFourSlotPrimitive_cleanBlock
    #check QuantumBlockEncoding.Robin.warmRobinXorFourSlotPrimitiveVerifiedBlockEncoding
    #check QuantumBlockEncoding.Robin.warmRobinFourSlotT3Cost_betterThan_paperSeven
    #check QuantumBlockEncoding.Robin.warmRobinFourSlotT3Cost_betterThan_figure4
    #check QuantumBlockEncoding.Robin.warmRobinFourSlotT3Cost_componentwise_paperSeven
    #check QuantumBlockEncoding.Robin.warmRobinFourSlotT3Cost_componentwise_figure4
    #check QuantumBlockEncoding.Robin.warmRobinBestVerified
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.adjoint_sumTerms
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.OneDimCompositionCertificate.Adagger_eq_sum_term_adjoints
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.OneDimCompositionCertificate.H_isHermitian
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.OneDimCompositionCertificate.H_eq_S1_tensor_xXi_add_S2_tensor_I
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.eq29PrintedClean_lowerRight
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.eq29PrintedClean_ne_S1
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.eq29PhaseBalancedClean_eq_S1
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.eq30Clean_eq_S2
    #check QuantumBlockEncoding.GHL2025.Hamiltonian.theorem4_source_lcu_route_closed
    Show machine-checked status and Lean authorities

    Useful when auditing the build; not required for the conceptual proof story above.

    Machine-checked status

    What is closed in this checkout

    ObligationStatusLean authority
    Paper Eq. (9) specialization and scaling auditCompleteQuantumBlockEncoding.RobinEvolution.warmRobinTarget_eq_paperEq9_dimensionless_A1_B1_zero
    Candidate exact primitive certificateCompleteQuantumBlockEncoding.Robin.warmRobinXorFourSlotPrimitiveVerifiedBlockEncoding
    Source sparse-slot auditCompleteQuantumBlockEncoding.Robin.warmRobinSourceSevenSparseDecomposition
    Paper-seven exact primitive normal formCompleteQuantumBlockEncoding.Robin.warmRobinPaperSevenPrimitiveVerifiedBlockEncoding
    Figure-4 fixed-N8 exact primitive realizationCompleteQuantumBlockEncoding.Robin.warmRobinFigure4PrimitiveVerifiedBlockEncoding
    Same-tier primitive comparisonCompleteQuantumBlockEncoding.Robin.warmRobinFourSlotT3Cost_betterThan_figure4
    Ordering-independent componentwise dominanceCompleteQuantumBlockEncoding.Robin.warmRobinFourSlotT3Cost_componentwise_figure4
    Winner for the frozen benchmark/compilerCertifiedQuantumBlockEncoding.Robin.warmRobinBestVerified
    GHL Theorem-4 A to A-dagger to S1,S2 to H compositionCompleteQuantumBlockEncoding.GHL2025.Hamiltonian.OneDimCompositionCertificate.H_eq_S1_tensor_xXi_add_S2_tensor_I
    Printed Eq. (30) first-line phase pair: full-clean-matrix auditRefuted as printedQuantumBlockEncoding.GHL2025.Hamiltonian.eq29PrintedClean_ne_S1
    Source-audited Theorem-4 LCU composition to HCompleteQuantumBlockEncoding.GHL2025.Hamiltonian.theorem4_source_lcu_route_closed
    Advanced source-fidelity notes (implementation details)

    You do not need these notes to understand the theorem. They record conventions, transcription discrepancies, and full-space implementation choices for readers reproducing the source circuit.

    Source audit

    Advanced source-fidelity notes

    These choices are part of the formal benchmark contract, not silent implementation details.

    1. The page displays A_tilde_0 = Delta x^2 A_GHL^(9)|_{A1=B1=0} = M/12, not the full general physical matrix of Eq. (9). With A2=B2=0 this is the homogeneous-Neumann special case inside the Robin family. Restoring the physical Delta x^{-2} factor rescales the normalizer from 56/3 to 56/(3 Delta x^2).
    2. The historical split-seven weighted-permutation LCU is retained as structural evidence, but it is not a sparse-access enumeration because two nonzero slots can address the same entry.
    3. Bulk rows of D and bulk rows of D-transpose are different tests. The Figure-4 indicator acts on D-transpose and therefore selects source columns 3 and 4.
    4. Equation (27) has a missing factor-of-two typo: the standard Qiskit and ASPBE RY convention needs 2 arccos(c) to place c in the clean matrix entry.
    5. The literal gamma-1 intermediate normalization is not inferred from gates that precede it; the certified route proves the executable stage states instead.
    6. Dirty-workspace behavior is the actual reversible extension produced by the compiler. Only the declared clean projection is the block-encoding contract.
    7. The coefficient function is f=1 in this fixed benchmark, so its oracle is proved equal to identity and constant-folded.
    8. The source paper continues beyond the one-term block encoding: Theorem 4 combines A_k/A_k-dagger into A/A-dagger, builds S1 and S2, and forms H. ASPBE now compiles this composition in GHLHamiltonian.lean.
    9. The Hamiltonian route is source-audited rather than silently normalized: the literal printed first S1 LCU phase pair leaves a -N_A identity filler, while a phase-balanced correction gives the intended S1. The second S2 LCU line and the final H composition close in Lean.
    Show the complete Lean certificate list

    Open this when you want to inspect every declaration linked to the case.

    Proof authority

    Named Lean certificates

    These declarations, compiled by the current Lean gate, support the mathematical and resource claims above.

    Optional executable checks and outputs

    Executable verification and exports

    Checking and artifact selection are independent. A user may screen with Qiskit, OpenQASM round-trip, both, or neither, then request a different set of output files.

    Backend / artifactRoleStatusEvidence
    Internal canonical evaluatorReference semantics for primitive canonical IRpassedmetrics manifest
    Qiskit OperatorGate-by-gate numerical screeningpassedexecutable-exports/QBE-ROBIN-BE-WARM-001/qiskit/circuit.py
    OpenQASM 3 round-tripStrict serialization, import, and semantic replaypassedQASM and report when generated
    Lean certificateExact proof authority at the page's stated semantic tierpassed29 named root(s)

    Regenerates three separate canonical artifacts: the XOR candidate at the task root, paper-seven under paper-seven/, and the fixed-N8 Figure-4 realization under figure4-fixed-n8/. Each receives an internal matrix check, gate-by-gate Qiskit Operator check, and strict OpenQASM 3 round-trip.

    Current runnable artifact
    executable-exports/QBE-ROBIN-BE-WARM-001/qiskit/circuit.py
    Command
    python3 tools/export_robin_evolution.py --task QBE-ROBIN-BE-WARM-001 --arm warm
    Trust boundary. Fast executable checks may reject, rank, or queue a route for formalization. Floating-point tolerances do not replace the exact Lean roots above; an external exact certificate contributes only after a Lean checker verifies it.
    Source
    Guseynov-Huang-Liu Eq. (9), specialized to N=8 and A1=B1=0, plus the ASPBE fixed-instance audit
    Contributor
    ASPBE authors
    Current boundary
    The fixed circuit comparison remains N=8, homogeneous f=1, alpha=56/3, standard-RY-corrected, and compiler-specific. The source-audited Theorem-4 LCU composition through H is compiled; the printed first S1 phase pair is explicitly flagged and corrected. Uniform arbitrary-width primitive compilation of every Theorem-3 source oracle and global circuit optimality are not claimed.