Textbook / teaching anchor
Quantum framework for simulating linear PDEs with Robin boundary conditions
Source paper for the Robin worked case and the A→S₁,S₂→H Hamiltonian composition.
Beginner layer · worked examples
The case studies are not decoration. Each one freezes a matrix, a register layout, and a circuit, then lets you compare the paper picture, the executable circuit, and the Lean theorem.
Textbook / teaching anchor
Source paper for the Robin worked case and the A→S₁,S₂→H Hamiltonian composition.
Textbook / teaching anchor
Scientific-computing route from quantum preliminaries to block encoding, QSP, and QSVT.
Strict mathematics, after the picture
Every symbol used here is connected below to a compiled declaration or a clearly marked research-source formula.
Textbook / teaching anchor
Source paper for the Robin worked case and the A→S₁,S₂→H Hamiltonian composition.
Textbook / teaching anchor
Scientific-computing route from quantum preliminaries to block encoding, QSP, and QSVT.
Learn Lean while learning quantum computing
warmRobinFigure4PrimitiveVerifiedBlockEncoding
warmRobinBestVerified
A reader can jump from a diagram directly to the declaration that certifies the same stage.
The full proof-backed declarations for this chapter are shown immediately below.
Block encoding · Chapter 7 of 9
Distinguish completed local certificates from paper-facing contract models and historical experiments.
QuantumBlockEncoding/ColdStartTransferE1.leanQuantumBlockEncoding/OptimalControl.leanQuantumBlockEncoding/CubicStatePreparation.leanQuantumBlockEncoding/GHL2025.leanQuantumBlockEncoding/GHLHamiltonian.leanQuantumBlockEncoding/Examples/RobinHeat.leanQuantumBlockEncoding/RobinMatrix.leanTextbook lesson
Case studies show both successful certificates and rejected routes. A refutation is a completed result when it prevents reuse of a false premise.
BE Case 1 uses finite permutation structure. BE Case 2 uses an exact rational Householder completion. Both end at named compiled roots.
The raw symbolic route is not merely slow: the current target is false. Lean proves the contradiction through a concrete coefficient environment.
The paper itself carries this composition through Theorem 4. ASPBE compiles the same A/A-dagger, S1/S2, and H chain and also checks the LCU filler phases rather than treating the displayed matrix equality as self-evident.
Under a literal full-clean-matrix reading, the printed first S1 LCU phase pair leaves a lower-right -N_A identity filler. Lean records that obstruction and separately proves the phase-balanced correction that yields the intended S1 matrix; S2 closes with the printed zero phases.
What remains open is not the Hamiltonian formula: it is a uniform primitive compiler proving all general-width one-term oracle resource bounds at the source paper's gate tier.
Check both badges: a local theorem may compile while a larger paper route remains experimental.
Mathematical order and conventions adapted from Lin, Lecture Notes on Quantum Algorithms for Scientific Computation. The formal checkpoints and ASPBE status distinctions are specific to this library.
Route at a glance
flowchart LR C["Compiled<br/>core contracts"] --> E["Compiled<br/>BE Case 1 and 2"] E --> P["Partial route<br/>amplitude oracle"] P --> Q["Planned<br/>concrete QSVT"] E --> X["Experimental<br/>paper backend"] X --> B["Blocked<br/>historical raw fold"] B --> F["Finite semantic bridge<br/>and projection proof"]
Selected declarations
A compiled route means that the reusable theorem or constructor and at least one finite witness compile. Hardware- and problem-specific downstream instantiations are out of scope, not universal claims made by these cards.
Lean result
QuantumBlockEncoding.coldE1Candidate_blockProjection
The selected transfer-operator candidate has the required projected block.
The benchmark closes from a concrete candidate to the exact block identity. It is a compact reproducible example of the complete ASPBE acceptance path.
Reuse the partial-permutation image certificate and simplify the selected entries.
QuantumBlockEncoding.coldE1CandidateImage_permutation_certificate; QuantumBlockEncoding.BlockEncodingClassics.partialPermutationCertificate| Mathematical step | Lean object or step |
|---|---|
| Certify routed basis images. | coldE1CandidateImage_permutation_certificate |
| Project the clean block. | coldE1Candidate_blockProjection |
theorem coldE1Candidate_blockProjection :
coldE1BlockProjection coldE1CandidateMatrix := by
Local declaration · Verso Blueprint · commit-pinned GitHub source
Lean result
QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalHouseholderExactBEContract_complete
The cubic diagonal benchmark has a completed exact block-encoding contract through the rational Householder route.
The hard benchmark converges by selecting a library-supported algebraic route, not by expanding a large gate fold. It records a completed alternative to the still-partial amplitude-oracle/QSVT route.
Complete the input Householder certificate, instantiate rational backend support, and package the cubic target identity.
QuantumBlockEncoding.CubicDiagonalOracle.linearDiagonalHouseholderInputBEContract_complete; QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalRationalCompletion_backendSupport| Mathematical step | Lean object or step |
|---|---|
| Complete the linear input block. | linearDiagonalHouseholderInputBEContract_complete |
| Supply rational backend support. | cubicDiagonalRationalCompletion_backendSupport |
| Assemble the final certificate. | cubicDiagonalHouseholderExactBEContract_complete |
theorem cubicDiagonalHouseholderExactBEContract_complete (n : Nat) :
BlockEncodingClassics.IsRationalOrthogonal
(cubicDiagonalHouseholderExactBEContract n).exactPayload.U ∧
Matrix.PointwiseEq
(cubicDiagonalHouseholderExactBEContract n).exactPayload.clean
(cubicDiagonalTarget n).operator ∧
(cubicDiagonalTarget n).normalizer = 1 ∧
(cubicDiagonalHouseholderExactBEContract n).resource =
Resource.ofCountsWithDepth 0 0 1 0 1 := by
Local declaration · Verso Blueprint · commit-pinned GitHub source
Lean result
QuantumBlockEncoding.GHL2025.Hamiltonian.theorem4_source_lcu_route_closed
The paper's Theorem 4 route is now machine-checked from A and A-dagger through the LCU clean blocks for S1 and S2, then to H, together with the registered normalization, signal-width, and resource expressions.
ASPBE does not silently copy the displayed phases: a literal full-clean-matrix reading of the printed first LCU line leaves a nonzero lower-right filler because exp(i*pi)=exp(-i*pi)=-1. Lean proves that obstruction, then proves a phase-balanced correction gives exactly S1; the printed S2 line closes as written. This is the distinction the public status needs: the Hamiltonian composition is not open, but the source-phase audit and the remaining arbitrary-width primitive compiler must stay visible.
Assemble A and A-dagger from one-term inputs; audit the controlled-phase filler in the first S1 LCU; use the phase-balanced correction to obtain S1; verify the S2 LCU; then compose the two Hermitian pieces with x_xi and I_xi and attach the paper-facing normalization/resource record.
QuantumBlockEncoding.GHL2025.Hamiltonian.adjoint_sumTerms; QuantumBlockEncoding.Robin.ComplexLCU.prepareAmplitudeSelectUnprepare_unitary; QuantumBlockEncoding.Robin.ComplexLCU.prepareAmplitudeSelectUnprepare_cleanEntry; QuantumBlockEncoding.GHL2025.Hamiltonian.eq29PrintedClean_ne_S1; QuantumBlockEncoding.GHL2025.Hamiltonian.eq29PhaseBalancedClean_eq_S1; QuantumBlockEncoding.GHL2025.Hamiltonian.eq30Clean_eq_S2QuantumBlockEncoding.GHL2025.Hamiltonian.adjoint_sumTermsQuantumBlockEncoding.GHL2025.Hamiltonian.eq29PrintedClean_lowerRightQuantumBlockEncoding.GHL2025.Hamiltonian.eq29PrintedClean_ne_S1QuantumBlockEncoding.GHL2025.Hamiltonian.eq29PhaseBalancedClean_eq_S1QuantumBlockEncoding.GHL2025.Hamiltonian.eq30Clean_eq_S2QuantumBlockEncoding.GHL2025.Hamiltonian.OneDimCompositionCertificate.H_eq_S1_tensor_xXi_add_S2_tensor_IQuantumBlockEncoding.GHL2025.Hamiltonian.oneDimHamiltonianClaim_normalization_closedQuantumBlockEncoding.GHL2025.Hamiltonian.oneDimHamiltonianClaim_layout_closedQuantumBlockEncoding.GHL2025.Hamiltonian.oneDimHamiltonianResource_pureAncilla_closedQuantumBlockEncoding.GHL2025.Hamiltonian.theorem4_source_lcu_route_closed| Mathematical step | Lean object or step |
|---|---|
| Assemble A and A-dagger. | adjoint_sumTerms / Adagger_eq_sum_term_adjoints |
| Refute the literal printed filler cancellation. | eq29PrintedClean_ne_S1 |
| Close the corrected S1 clean block. | eq29PhaseBalancedClean_eq_S1 |
| Close S2 from the printed second LCU line. | eq30Clean_eq_S2 |
| Close H plus source metadata. | theorem4_source_lcu_route_closed |
theorem theorem4_source_lcu_route_closed [DecidableEq ι] [DecidableEq ξ]
{η : Type*} [Fintype η]
(cert : OneDimCompositionCertificate η ι ξ)
(normalizerA : ℂ) :
eq29PhaseBalancedClean cert.A cert.B normalizerA = cert.first ∧
eq30Clean cert.A cert.B normalizerA = cert.second ∧
cert.H = add (tensor cert.first cert.xXi)
(tensor cert.second (identity ξ)) ∧
oneDimHamiltonianClaim.normalization = "O(kappa * ||H||_max)" ∧
oneDimHamiltonianClaim.resource = oneDimHamiltonianResourceExpr := by
Local declaration · Verso Blueprint · commit-pinned GitHub source
Lean result
QuantumBlockEncoding.Examples.RobinHeat.oneTermRobinGamma3BoundaryUnitaryEntry_ne_backendFold_n3
The historical H-free symbolic entry is proved not equal to the proposed seven-slot backend fold.
The all-one coefficient environment exposes a nonzero selected contribution that the old equality would force to zero. A proved counterexample closes this search branch and prevents future agents from spending budget on a false target.
Assume the raw fold, convert it to the equivalent backend-expansion statement, and contradict the compiled all-one counterexample.
QuantumBlockEncoding.Examples.RobinHeat.oneTermRobinGamma3BoundaryBackendExpansionStatement_not_n3; QuantumBlockEncoding.Examples.RobinHeat.oneTermRobinGamma3BoundaryBackendExpansionStatement_equivUnitaryEntryFold_n3| Mathematical step | Lean object or step |
|---|---|
| Assume the historical raw equality. | intro hFold |
| Move to the equivalent expansion target. | equivUnitaryEntryFold_n3.mpr |
| Apply the counterexample. | BackendExpansionStatement_not_n3 |
theorem oneTermRobinGamma3BoundaryUnitaryEntry_ne_backendFold_n3 :
oneTermRobinGamma3BoundaryProjectionSummationTarget_n3.signalUnitaryEntry ≠
blockExtractionBranchContributionSum
oneTermRobinGamma3BoundaryBackendBranchContribution_n3 := by
Local declaration · Verso Blueprint · commit-pinned GitHub source