Quantum value-query algorithms #
This module extends the phase-oracle quantum query model (Cslib.Quantum.run) to the quantum
value-query model (Cslib.Quantum.ValueState, Cslib.Quantum.valueOracle,
Cslib.Quantum.runValue) over an arbitrary finite query index type ι, finite value/answer
register V, and finite workspace W, where each oracle call applies an input-dependent unitary
step (x i) to the V register controlled by the query index i. Diagonal phase kickback
(Cslib.Quantum.phaseStep, recovering Cslib.Quantum.phaseOracle and Cslib.Quantum.run via
Cslib.Quantum.valueOracle_phaseStep and Cslib.Quantum.runValue_phaseStep), permutation oracles
(Cslib.Quantum.permStep), group-addition oracles (Cslib.Quantum.addStep), and XOR oracles
(BitString as an additive group) are special cases. Multi-outcome computational-basis readouts
(Cslib.Quantum.measureOut) are provided by
CslibFrontier/Foundations/Quantum/Measurement/Readout.lean.
For lower bounds, restricting a value-query algorithm to inputs taking only two values a₀ and
a₁ can be simulated in the Boolean phase-oracle model (Cslib.Quantum.run) on N = |ι| bits:
- When the relative step
(step a₀).symm.trans (step a₁)is an involution (such as an XOR oracle), one binary phase query simulates each value query (Cslib.Quantum.exists_sim_involution). - For an arbitrary unitary step
step : α → (EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V), simultaneously diagonalizing the Hermitian and skew-Hermitian parts of the relative unitary (UnitarySpectrum->LinearIsometryEquiv.exists_orthonormalBasis_eigenvectors) simulates each value query with two binary phase queries (Cslib.Quantum.exists_sim_value). - Index-returning
T-query algorithms that read one value can be turned into(T + 1)-query value-returning algorithms (Cslib.Quantum.exists_sim_index_to_value,Cslib.Quantum.exists_sim_index_to_value_perm).
Main definitions #
Cslib.Quantum.ValueState: quantum states overι × V × W.Cslib.Quantum.valueOracle,Cslib.Quantum.phaseStep,Cslib.Quantum.permStep,Cslib.Quantum.addStep: value-query oracles and canonical per-symbol steps.Cslib.Quantum.runValue: final state of aT-query value-query algorithm.Cslib.Quantum.embedOutcome: embedding value-query outcomes intoFin N × Bool × V × W.
Main results #
Cslib.Quantum.runValue_phaseStep:phaseStepidentifiesCslib.Quantum.runas a specialization ofrunValueonState N W = ValueState (Fin N) Bool W.Cslib.Quantum.norm_runValue: value-query algorithms preserve norms.Cslib.Quantum.exists_sim_involution: simulating a two-valued restriction with an involutive difference byTbinary phase queries.Cslib.Quantum.exists_sim_value: simulating an arbitrary two-valued restriction by2 * Tbinary phase queries.Cslib.Quantum.exists_sim_index_to_value,Cslib.Quantum.exists_sim_index_to_value_perm: simulating aT-query index-returning value-query algorithm withT + 1value queries.
Fibered unitary helpers #
Value-query model #
Value oracle: given per-symbol unitaries step : α → (ℂ^V ≃ₗᵢ[ℂ] ℂ^V) and an input
x : ι → α, applies step (x i) to the value register controlled by the query index i.
Coordinate evaluation of valueOracle step x ψ at (i, v, w).
Unitary step arising from a family of permutations π : α → Equiv.Perm V, acting as
|v⟩ ↦ |π a v⟩.
Coordinate evaluation of permStep π a φ.
Unitary step for an additive group value register V: |v⟩ ↦ |v + a⟩. This covers modular
addition on ZMod M as well as bitwise XOR on BitString m.
When every element of V has order dividing 2 (such as BitString m), the relative step
(addStep a₀).symm.trans (addStep a₁) is an involution.
Diagonal phase unitary on a Bool response qubit: |b⟩ ↦ (-1)^{b && bit} |b⟩.
Specializing valueOracle and runValue to phaseStep on State N W = ValueState (Fin N) Bool W
recovers Cslib.Quantum.phaseOracle and Cslib.Quantum.run.
The state after t queries of a value-query algorithm U starting from ψ₀ on input
x : ι → α.
Value-query algorithms preserve norms.
On State N W = ValueState (Fin N) Bool W, valueOracle phaseStep agrees with the controlled
phase oracle phaseOracle.
Simulating two-valued restrictions in the Boolean phase-oracle model #
1-query simulation for involutive relative step #
1-query simulation of an involutive two-valued oracle restriction: if
(step a₀).symm.trans (step a₁) is an involution, any T-query value-query algorithm restricted
to {a₀, a₁} along e : ι ≃ Fin N can be simulated by T binary phase-oracle queries.
2-query simulation for arbitrary unitary relative step #
2-query simulation of an arbitrary two-valued oracle restriction: any T-query
value-query algorithm restricted to {a₀, a₁} along e : ι ≃ Fin N can be simulated by 2 * T
binary phase-oracle queries.
Index-to-value (T + 1)-query simulation: given a T-query value-query algorithm
(U, ψ₀) returning a query index idx : ι × V × W → ι, a basis state ket v₀ and readout
read : V → α such that querying step (X i) prepares read v = X i with probability 1
turn it into a (T + 1)-query value-returning algorithm with the exact same outcome
distribution.
Index-to-value (T + 1)-query simulation specialized to a permutation oracle permStep π on
two values a₀, a₁ distinguished at v₀ : V.