Checked on this commit2,822 public declarationscommit 07559c3d051fBuild record
Foundation lesson · do not skip this if you are new
Before the cases: how a quantum algorithm gets access to data and matrices
A quantum algorithm is not given a NumPy array for free. Before discussing speedups, we must say how classical data, matrix entries, or a linear operator become quantum operations. State preparation, query oracles, and block encodings are three different access contracts.
State preparation
\[P|0^n\rangle=|\psi\rangle\]
Contract. Build a circuit P that creates the input quantum state you actually want to use.
Why it matters. Algorithms that start from amplitude-encoded data need this state before any later quantum subroutine can help. Preparation cost is therefore part of the end-to-end algorithm, not decorative preprocessing.
The Pauli-X and Hadamard cases show the smallest exact examples.
Contract. Ask a reversible black box for a matrix entry encoded in a work register.
Why it matters. Query-complexity theorems often count how many times the oracle is called, but a real fault-tolerant implementation must also build the arithmetic and memory circuit hidden inside that call.
The GHL Robin paper explicitly contrasts this model with its gate-level construction.
Contract. Embed a possibly non-unitary matrix A as the clean ancilla block of a larger unitary U_A.
Why it matters. Quantum hardware applies unitary gates. Block encoding is the interface that lets algorithms such as QSVT and Hamiltonian simulation manipulate a general structured matrix through a unitary circuit.
BE Case 1, the cubic diagonal family, and the Robin case all certify this contract.
How to read a quantum circuit
Follow the state from left to right
q0: |0>H●measurement
q1: |0>⊕measurement
wireA horizontal wire is one qubit/register. Time flows from left to right.
|0>A ket at the left fixes the input state of that wire.
H, X, RYA box is a gate. Its matrix acts when the state reaches that box.
controlA control dot means another gate acts only when the control condition is satisfied.
daggerU† means the inverse/conjugate-transpose circuit; it often uncomputes temporary information.
ancillaAn ancilla is workspace. A clean block-encoding proof normally requires selected ancillas to start and end in |0>.
measurementMeasurement converts quantum amplitudes into classical outcomes; it is different from the coherent unitary part of the circuit.
The H-plus-CNOT circuit above prepares the Bell state \((|00\rangle+|11\rangle)/\sqrt2\). The same visual grammar is used in the case studies; larger diagrams only add named registers and uncomputation.
A classical program updates bits. In the circuit model used here, a quantum program applies reversible linear transformations to complex amplitude vectors and reads classical outcomes through measurement.
A first two-qubit circuit: H creates a superposition and CNOT turns it into an entangled Bell pair.
q0|0>HcontrolBell pair
q1|0>X targetBell pair
\[|\Phi^+\rangle=(|00\rangle+|11\rangle)/\sqrt2\]
StateDescribe the information by complex amplitudes.
GateApply a unitary matrix; this is the reversible evolution step.
CircuitCompose gates from left to right in time.
MeasurementConvert amplitudes into classical outcome probabilities.
ASPBEUse those ingredients to prepare useful states and embed useful non-unitary matrices into unitaries.
How to read this site. Read the circuit picture first, switch to Math when the notation feels familiar, and switch to Lean only when you want the machine-checked statement.
Foundations, entanglement, circuits, algorithms, and error correction.
Guided reading
One foundation, two application tracks
Learn the finite matrix and circuit conventions once. Then follow
State Preparation or Block Encoding as a separate construction problem. The final
chapters explain how ASPBE searches, verifies, exports, and reports both.