The quantum Fourier transform over ZMod N #
The quantum Fourier transform over the cyclic group ZMod N is the unitary matrix
F_N(j, k) = ω^{jk} / √N with ω = e^{2πi/N} (Cslib.Quantum.qft), acting on a register whose
computational basis is ZMod N. Its entries are ZMod.stdAddChar (j * k) / √N, and its
unitarity is the orthogonality of the characters of ZMod N (AddChar.sum_mulShift). As a map on
amplitude vectors it is √N times Mathlib's inverse discrete Fourier transform ZMod.dft.symm
(𝓕⁻), whose sign convention it shares; it is the transform A_q of Shor, §4,
eq. (4.1), with q = N, and F_N of de Wolf, §4.1 and §4.4. For N = 2 it is the
Hadamard gate.
This module gives the transform as a matrix; it does not give a circuit for it. The
polynomial-size circuit for N = 2^n (de Wolf, §4.5) is not formalized.
Main definitions #
Cslib.Quantum.qft: the quantum Fourier transform overZMod N, as a unitary matrix.
Main results #
Cslib.Quantum.qft_apply: its entriesstdAddChar (j * k) / √N.Cslib.Quantum.qft_apply_eq_exp: its entriesexp(2πi · j k / N) / √N.Cslib.Quantum.qft_mulVec: it acts on amplitude vectors as√N • 𝓕⁻.Cslib.Quantum.sqrt_inv_mul_sqrt_inv: the normalization identity(√N)⁻¹ (√N)⁻¹ = N⁻¹.
References #
The entries of the quantum Fourier transform are exp(2πi · j k / N) / √N, computed from the
canonical representatives j.val, k.val ∈ [0, N).