Block encoding · symbolic exact rational family
BE Case 2: cubic diagonal family, cold route
For every n, block encode the diagonal operator whose j-th entry is the cube of the grid point x_j=j/2^n.
Read this before the proof dashboard
See how a whole symbolic family of non-unitary diagonal matrices can receive an exact block-encoding proof.
Scientific algorithms often need functions of an index, coordinate, or eigenvalue. The target here multiplies basis state |j> by the cubic value (j/2^n)^3, which is generally not unitary and therefore cannot simply be declared a gate.
Diagonal function loaders are natural ingredients for matrix functions, coefficient operators, Hamiltonians, and QSVT-style pipelines. This case focuses on the block-encoding construction itself.
Read the circuit
What the wires and stages are doing
The n system qubits hold j and are not overwritten.
Three clean qubits provide coordinates for an exact rational unit vector.
For each j, a Householder transformation has the desired cubic value as its clean matrix entry.
Selecting the first branch coordinate returns the diagonal entry (j/2^n)^3.
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
Family theorem
Exact rational Householder block encoding for every n
For arbitrary n, Lean constructs exact rational branch vectors, proves their normalization, proves the controlled Householder operator is orthogonal/unitary, and proves every clean diagonal entry equals the cubic target with alpha=1.
Proof story
- Fix one desired diagonal valueFor each j, let c=(j/2^n)^3, which lies in [0,1].
- Complete c to an exact rational unit vectorUse a four-square witness to express 1-c^2 as a sum of rational squares.
- Build a Householder reflectionA reflection constructed from that vector is rational and orthogonal.
- Control by jTake the direct sum of the appropriate reflection for every computational-basis label j.
- Project the clean coordinateThe first branch coordinate of the direct sum is exactly diag(c_j).
Show the Lean proof checkpoints
The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.
Mathematical target
The equation being studied
For arbitrary n, Lean constructs exact rational branch vectors using the four-square theorem, forms a controlled direct sum of Householder matrices, proves rational orthogonality, and proves the clean block equals D_n with alpha=1.
D_n- the symbolic 2^n by 2^n cubic diagonal operator
Pi- the clean embedding selecting the first Householder branch coordinate
U_n- the controlled direct sum of exact rational Householder matrices
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.
Grid label
hold j in the system register
Exact completion
construct a rational unit vector with first entry (j/2^n)^3
Controlled Householder
apply the branch reflection selected by j
Clean projection
read the first branch coordinate
Auditable evolution
Candidate and proof progression
The cold route evolves proof structure, not a sequence of comparable resource champions. The endpoint is a theorem for every n.
Symbolic target
Contract fixedThe target is diag((j/2^n)^3), not one sampled n=2 matrix.
QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalRationalCompletion_exists
Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[row sep=.4cm, column sep=.65cm]
\lstick{$\ket{0^3}$} & \gate[wires=2]{U_n\;?} & \meter{} \\
\lstick{$\ket j$} & & \qw
\end{quantikz}
Rational branch completion
Lean certifiedFour-square witnesses close exact normalization for every branch.
QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalRationalCompletion_exists
Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[row sep=.4cm, column sep=.55cm]
\lstick{$\ket{0^3}$} & \gate{\mathrm{complete}(x_j^3)} & \rstick{$\ket{v_j}$} \qw \\
\lstick{$\ket j$} & \ctrl{-1} & \qw
\end{quantikz}
Householder direct sum
Lean certified familyThe final conjunction proves orthogonality, clean block, alpha, and logical resource record.
QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalHouseholderExactBEContract_complete
Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[row sep=.4cm, column sep=.55cm]
\lstick{$\ket{0^3}$} & \gate{H(v_j)} & \rstick{$x_j^3\ket0+\ket{\perp_j}$} \qw \\
\lstick{$\ket j$} & \ctrl{-1} & \qw
\end{quantikz}
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.}
\[
D_n=\operatorname{diag}_{0\le j<2^n}\!\left(\frac{j}{2^n}\right)^3,\qquad \Pi U_n\Pi^\dagger=D_n.
\]
% Symbolic target
\begin{quantikz}[row sep=.4cm, column sep=.65cm]
\lstick{$\ket{0^3}$} & \gate[wires=2]{U_n\;?} & \meter{} \\
\lstick{$\ket j$} & & \qw
\end{quantikz}
% Rational branch completion
\begin{quantikz}[row sep=.4cm, column sep=.55cm]
\lstick{$\ket{0^3}$} & \gate{\mathrm{complete}(x_j^3)} & \rstick{$\ket{v_j}$} \qw \\
\lstick{$\ket j$} & \ctrl{-1} & \qw
\end{quantikz}
% Householder direct sum
\begin{quantikz}[row sep=.4cm, column sep=.55cm]
\lstick{$\ket{0^3}$} & \gate{H(v_j)} & \rstick{$x_j^3\ket0+\ket{\perp_j}$} \qw \\
\lstick{$\ket j$} & \ctrl{-1} & \qw
\end{quantikz}
English proof LaTeX
\paragraph{Proof.}
For arbitrary n, Lean constructs exact rational branch vectors using the four-square theorem, forms a controlled direct sum of Householder matrices, proves rational orthogonality, and proves the clean block equals D_n with alpha=1.
\begin{enumerate}
\item The target is diag((j/2^n)^3), not one sampled n=2 matrix.
\item Four-square witnesses close exact normalization for every branch.
\item The final conjunction proves orthogonality, clean block, alpha, and logical resource record.
\end{enumerate}
Each advertised certificate is the named Lean declaration linked on this page.
Lean declaration retrieval block
import QuantumBlockEncoding
#check QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalRationalCompletion_exists
#check QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalHouseholderExactBEContract_clean_eq_target
#check QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalHouseholderExactBEContract_complete
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.
QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalRationalCompletion_existsQuantumBlockEncoding/CubicStatePreparation.lean:2767QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalHouseholderExactBEContract_clean_eq_targetQuantumBlockEncoding/CubicStatePreparation.lean:2867QuantumBlockEncoding.CubicDiagonalOracle.cubicDiagonalHouseholderExactBEContract_completeQuantumBlockEncoding/CubicStatePreparation.lean:2879
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 / artifact | Role | Status | Evidence |
|---|---|---|---|
| Internal canonical evaluator | Reference semantics for primitive canonical IR | open | metrics manifest |
| Qiskit Operator | Gate-by-gate numerical screening | artifact available | tools/export_hard_cubic_householder.py |
| OpenQASM 3 round-trip | Strict serialization, import, and semantic replay | not recorded | QASM and report when generated |
| Lean certificate | Exact proof authority at the page's stated semantic tier | passed | 3 named root(s) |
Instantiates the symbolic Lean construction for Qiskit/OpenQASM use. Finite numerical output is diagnostic only.
- Current runnable artifact
tools/export_hard_cubic_householder.py- Command
python3 tools/export_hard_cubic_householder.py --task QBE-HARD-CUBIC-DIAGONAL-HIER-COLD-001
- Source
- ASPBE BE Case 2 cold route
- Contributor
- ASPBE authors
- Current boundary
- The logical Householder resource is not a primitive {u,cx} decomposition or an optimality theorem.