Empirical/CSD: Grover's search as a flow on Σ #
Category: 3-Local (CSD-side twin of Empirical/QM/Algorithms/Grover.lean).
Empirical/QM/Algorithms/Grover.lean proves the search algorithm on the QM side: after k Grover
steps from the uniform superposition the marked item w is measured with probability
sin²((2k+1)θ) (grover_success). This file is the same algorithm on the CSD side. The Grover
step is a unitary matrix on the n-qubit register (the oracle and the diffusion operator are
reflections, 1 − 2|v⟩⟨v|), so it is a Circuit and hence a flow on the register's sector
Σ = ℂℙ^{2ⁿ − 1} (CircuitFlow.lean); k runs are the flow iterated k times; and the readout
is the record basin of the outcome w. The headline reads the algorithm's success probability
off the basin's Born weight at the flowed ready point.
reflectionMatrix v = 1 − 2|v⟩⟨v|— the reflection through a unit vector, withreflectionMatrix_conjTranspose_mul(unitary) andtoEuclideanLin_reflectionMatrix(ψ ↦ ψ − 2⟪v, ψ⟫ v);oracleMatrix w,diffusionMatrix n,groverMatrix w— Grover's operators as matrices, withtoEuclideanLin_groverMatrix: they act asgroverStep w;groverCircuit w : Circuit (Fin n → Fin 2)— the search as a circuit, hence(groverCircuit w).flowis the search as aΣ-flow;groverReady— the uniform superposition as a point of the sector;- ★★
grover_flow_born— Grover onΣ: at the point reached from the ready point bykruns of the flow, the record basin of the marked item has Born weightsin²((2k+1)θ); and ★grover_flow_certain, certainty at the optimal count.
⚠️ Honest scope. The QM-side theorem carries the mathematics; this file adds the ontic
reading (a flow on Σ, a basin as readout) and no new analysis of the algorithm. What the
RegisterFlow.lean note says applies: the flow is the time-one map of the projective action, no
Hamiltonian generating the step is modelled (R-015). The oracle is a reflection given as a
matrix; no query model is claimed, as in the QM file.
References: Empirical/QM/Algorithms/Grover.lean; Empirical/CSD/Algorithms/CircuitFlow.lean;
specs/BACKLOG.md #34; specs/future-work.md.
Reflections as matrices #
The reflection through a unit vector v, as a matrix: 1 − 2|v⟩⟨v|.
Equations
Instances For
A reflection is Hermitian.
A reflection through a unit vector is an involution.
A reflection through a unit vector is unitary.
|v⟩⟨v| acts as ψ ↦ ⟪v, ψ⟫ v.
A reflection acts as ψ ↦ ψ − 2⟪v, ψ⟫ v.
Grover's operators as matrices #
The oracle 1 − 2|w⟩⟨w|, the reflection through the marked basis state.
Equations
Instances For
The diffusion operator 2|s⟩⟨s| − 1, minus the reflection through the uniform
superposition.
Equations
Instances For
One Grover step as a matrix: diffusion after the oracle.
Equations
Instances For
The Grover matrix acts as the Grover step.
The Grover matrix is unitary.
The search as a circuit and as a flow #
Grover's search as a circuit on the n-qubit register.
Equations
- CSD.Empirical.CSDBridge.Algorithms.groverCircuit w = { U := CSD.Empirical.CSDBridge.Algorithms.groverMatrix w, conjTranspose_mul := ⋯ }
Instances For
The uniform superposition, enumerated.
Equations
Instances For
The ready point: the uniform superposition as a point of the register's sector.
Equations
Instances For
★★ Grover on Σ. At the point reached from the ready point by k runs of the search
flow, the record basin of the marked item w has Born weight sin²((2k+1)θ), sin θ = 1/√2ⁿ:
the algorithm's success probability, read as the ontic typicality volume of the outcome's
basin at the flowed point.
★ Certainty at the optimal count, on Σ: when (2k+1)θ = π/2 the marked item's basin
has full weight at the flowed ready point.