Character sums over a subgroup of ZMod N #
For d ∣ N, the standard additive character ZMod.stdAddChar summed over the subgroup of
multiples of d is the indicator of its annihilator, the multiples of N / d, scaled by the
subgroup's size N / d. This is the orthogonality relation behind exact quantum period finding.
Main results #
ZMod.stdAddChar_natCast_mul_eq_one_iff:stdAddChar (d * y) = 1 ↔ N / d ∣ y.val.ZMod.sum_dvd_val_stdAddChar_mul:∑_{d ∣ h.val} stdAddChar (h * y)isN / dwhenN / d ∣ y.val, and0otherwise.
Orthogonality over a subgroup. For d ∣ N, the sum of stdAddChar (h * y) over the
residues h with d ∣ h.val (the subgroup generated by d) is N / d when N / d ∣ y.val (that
is, y annihilates the subgroup) and 0 otherwise.