State preparation · two exact typed circuits + same-target resource theorem
Structured probability loading: product structure beats the generic tree
Prepare amplitudes (9,12,12,16)/25, whose probabilities come from two identical Bernoulli factors. Compare the generic recursive tree with the circuit obtained by exposing product structure.
Source paper · paper-derived structured finite benchmark
Where this example comes from
Creating superpositions that correspond to efficiently integrable probability distributions
Lov Grover, Terry Rudolph · 2002
Source anchor. Grover–Rudolph Eq. (1), (3), (6)
Eq. (1) Eq. (3) Eq. (6)
What the paper says. Eq. (1) is the target probability-amplitude state, Eq. (3) is the recursive one-qubit refinement, and Eq. (6) realizes that refinement by a controlled rotation after coherently computing the split angle.
What ASPBE does here. ASPBE chooses a two-bit product distribution as an exact finite specialization. The factorized two-rotation winner is an ASPBE same-target optimization; it is not stated as a resource theorem in the source paper.
Read this before the proof dashboard
Learn when structure in a probability distribution should remove conditional circuitry rather than merely alter angles.
The four amplitudes factor into two identical one-qubit amplitude pairs. A generic binary tree is correct but needlessly conditional; the factorized route exposes two parallel rotations.
Grover–Rudolph prepares states corresponding to efficiently integrable probability distributions. This finite product instance isolates the structural optimization while leaving the general integration/oracle machinery in Papers.
Read the circuit
What the wires and stages are doing
Root RY followed by one-control UCRY gives a proof-bearing five-gate route.
Every amplitude is a product of 3/5 and 4/5.
Prepare q0 and q1 independently.
The two RY gates touch different wires, so depth is one.
Both routes first prove the same state action, then betterThan compares costs.
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
Correctness theorem
Both typed circuits prepare the same exact product state
Lean checks the exact target and proves state action for the generic tree and factorized circuit.
Proof story
- Normalize one factor(3/5)^2+(4/5)^2=1.
- TensorThe four amplitudes are 9,12,12,16 over 25.
- Evaluate factorized routeTwo lifted RY matrices give the explicit product matrix.
- Reduce generic treeConstant UCRY is exactly the same single-wire RY semantics.
- Package routesBoth become ExactPrimitiveStatePreparationRoute values.
Show the Lean proof checkpoints
The mathematical explanation above is the reading layer. These compiled declarations are the proof authority.
What ASPBE improves
Exploit product structure instead of paying for a conditional tree
The factorized typed circuit uses two parallel rotations; the generic typed UCRY route uses five gates at depth four. The comparison theorem is downstream of exact state-action proofs.
Why the proof is allowed to say “better”
- Freeze the targetBoth routes prepare exactly the same amplitudes.
- Compute tree resourcesThe typed root-RY/UCRY route yields (5,4,0,0).
- Compute factorized resourcesTwo disjoint RY gates yield (2,1,0,0).
- Apply lexicographic order2<5 closes strict dominance already on gate count.
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
Lean proves both typed primitive circuits prepare the same exact target. The generic root-RY plus one-control-UCRY circuit has cost (5,4,0,0); the factorized circuit contains two independent RY gates, cost (2,1,0,0). A named betterThan theorem certifies strict lexicographic improvement.
Eq. (1)- Grover–Rudolph's probability-amplitude target state
Eq. (3), Eq. (6)- the recursive refinement and controlled-rotation mechanism
betterThan- ASPBE's fixed lexicographic order: gates, depth, auxiliary qubits, oracle calls
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.
Generic tree
root split followed by a one-control conditional split
Use factorization
two independent identical RY rotations act on disjoint wires
Auditable evolution
Candidate and proof progression
Both points are proof-bearing typed circuits for the same target; only then is the resource comparison allowed.
Generic binary tree
Lean certifiedCorrect but structure-blind root plus UCRY route.
QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphTreeVerified_cost
Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[row sep=.4cm,column sep=.45cm]
\lstick{$q_1:\ket0$} & \gate{R_y(2\arccos(3/5))} & \ctrl{1} & \qw & \ctrl{1} & \qw \\
\lstick{$q_0:\ket0$} & \qw & \gate{R_y} & \targ{} & \gate{R_y} & \targ{}
\end{quantikz}
Factorized product route
Strictly better · Lean certifiedFactorization removes conditional branching and exposes two parallel rotations.
QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphFactorized_betterThan_tree
Edit and preview this stage →
Copy this stage as quantikz
\begin{quantikz}[row sep=.4cm,column sep=.65cm]
\lstick{$q_0:\ket0$} & \gate{R_y(2\arccos(3/5))} & \qw \\
\lstick{$q_1:\ket0$} & \gate{R_y(2\arccos(3/5))} & \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.}
\[
|\psi_{\mathrm{prod}}\rangle=\left(\frac35|0\rangle+\frac45|1\rangle\right)\otimes\left(\frac35|0\rangle+\frac45|1\rangle\right)=\frac{9|00\rangle+12|01\rangle+12|10\rangle+16|11\rangle}{25}.
\]
% Generic binary tree
\begin{quantikz}[row sep=.4cm,column sep=.45cm]
\lstick{$q_1:\ket0$} & \gate{R_y(2\arccos(3/5))} & \ctrl{1} & \qw & \ctrl{1} & \qw \\
\lstick{$q_0:\ket0$} & \qw & \gate{R_y} & \targ{} & \gate{R_y} & \targ{}
\end{quantikz}
% Factorized product route
\begin{quantikz}[row sep=.4cm,column sep=.65cm]
\lstick{$q_0:\ket0$} & \gate{R_y(2\arccos(3/5))} & \qw \\
\lstick{$q_1:\ket0$} & \gate{R_y(2\arccos(3/5))} & \qw
\end{quantikz}
English proof LaTeX
\paragraph{Proof.}
Lean proves both typed primitive circuits prepare the same exact target. The generic root-RY plus one-control-UCRY circuit has cost (5,4,0,0); the factorized circuit contains two independent RY gates, cost (2,1,0,0). A named betterThan theorem certifies strict lexicographic improvement.
\begin{enumerate}
\item Correct but structure-blind root plus UCRY route.
\item Factorization removes conditional branching and exposes two parallel rotations.
\end{enumerate}
Each advertised certificate is the named Lean declaration linked on this page.
Lean declaration retrieval block
import QuantumBlockEncoding
#check QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphProductTarget_normalized
#check QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphProductMatrix_unitary
#check QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphFactorized_prepares_target
#check QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphTree_prepares_target
#check QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphTreeVerified_cost
#check QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphFactorizedVerified_cost
#check QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphFactorized_betterThan_tree
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.StatePreparationBenchmarks.groverRudolphProductTarget_normalizedQuantumBlockEncoding/StatePreparationBenchmarksCoreFixed.lean:173QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphProductMatrix_unitaryQuantumBlockEncoding/StatePreparationBenchmarksCoreFixed.lean:200QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphFactorized_prepares_targetQuantumBlockEncoding/StatePreparationPrimitiveRoutes.lean:243QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphTree_prepares_targetQuantumBlockEncoding/StatePreparationPrimitiveRoutes.lean:249QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphTreeVerified_costQuantumBlockEncoding/StatePreparationPrimitiveRoutes.lean:274QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphFactorizedVerified_costQuantumBlockEncoding/StatePreparationPrimitiveRoutes.lean:269QuantumBlockEncoding.StatePreparationBenchmarks.groverRudolphFactorized_betterThan_treeQuantumBlockEncoding/StatePreparationPrimitiveRoutes.lean:279
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 replay | Gate-by-gate numerical screening | artifact available | executable-exports/SP-PAPERS-001/qiskit/export.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 | 7 named root(s) |
Numerically mirrors the factorized winner; Lean proves both candidate semantics and the resource ordering.
- Current runnable artifact
executable-exports/SP-PAPERS-001/qiskit/export.py- Command
python3 executable-exports/SP-PAPERS-001/qiskit/export.py --case grover-rudolph
- Source
- Grover–Rudolph Eq. (1), Eq. (3), Eq. (6), arXiv:quant-ph/0208112
- Contributor
- ASPBE authors
- Current boundary
- This is a finite product-distribution witness. The general efficiently-integrable distribution theorem and integration/arithmetic oracle compiler remain in Papers.