Two reflections rotate a plane #
Let a and e span a plane in a module over ℝ or ℂ, and write v(φ) = cos φ • a + sin φ • e
for the vector at angle φ from a towards e. Suppose a linear map R_a negates a and fixes
e, and a linear map R_b negates b = v(π/2 - γ) and fixes the vector v(-γ) orthogonal to it.
Then R_b R_a maps v(φ) to -v(φ - 2γ)
(Cslib.LinearAlgebra.reflection_comp_reflection), so T rounds map v(φ) to
(-1)^T v(φ - 2Tγ) (Cslib.LinearAlgebra.iterate_reflection_comp_reflection). The hypotheses
mention only the plane, so they can be checked one vector at a time in a larger space; no inner
product is assumed. Mathlib's Module.reflection_mul_reflection_pow_apply computes the powers of a
product of two Module.reflections through Chebyshev polynomials; it is not used here because
R_a and R_b are arbitrary linear maps, constrained only on the plane.
This is the geometry of Grover's algorithm, as Shi uses it to rotate a state that is almost
orthogonal to a onto a chosen real direction Shi, §4.2 (proof of Lemma 4.5, Figure 1).
There a = 0̂, e = 1̂ and b = 1̃, and R_a is Λ̄(σ_z), Shi's reflection along 1̂. Shi's
reflection along 1̃ is R = T_θ^{⊗k} (-Λ̄(σ_z)) T_θ^{⊗k}, which fixes 1̃. The map R_b here
negates 1̃ instead: it is T_θ^{⊗k} Λ̄(σ_z) T_θ^{⊗k} = -R. Hence Shi's Grover iterate is
(R Λ̄(σ_z))^T = (-1)^T (R_b R_a)^T, which maps v(φ) to v(φ - 2Tγ); the sign (-1)^T comes
from negating b here rather than fixing it.
Main results #
Cslib.LinearAlgebra.reflection_comp_reflection: one round of two reflections.Cslib.LinearAlgebra.iterate_reflection_comp_reflection:Trounds.
References #
- Y. Shi, Both Toffoli and Controlled-NOT need little help to do universal quantum computation, §4.2 (arXiv:quant-ph/0205115v2)
Two reflections rotate a plane. Let Ra negate a and fix e, and let Rb negate
sin γ • a + cos γ • e and fix cos γ • a - sin γ • e. Then Rb ∘ Ra maps the vector at angle φ
from a towards e to minus the vector at angle φ - 2γ.
Iterated reflections rotate a plane, the geometry of Grover's algorithm: T rounds of
Rb ∘ Ra move the vector at angle φ to (-1) ^ T times the vector at angle φ - 2Tγ.