  We propose a method for solving the hidden subgroup problem in nilpotent
groups. The main idea is iteratively transforming the hidden subgroup to its
images in the quotient groups by the members of a central series, eventually to
its image in the commutative quotient of the original group; and then using an
abelian hidden subgroup algorithm to determine this image. Knowing this image
allows one to descend to a proper subgroup unless the hidden subgroup is the
full group. The transformation relies on finding zero sum subsequences of
sufficiently large sequences of vectors over finite prime fields. We present a
new deterministic polynomial time algorithm for the latter problem in the case
when the size of the field is constant. The consequence is a polynomial time
exact quantum algorithm for the hidden subgroup problem in nilpotent groups
having constant nilpotency class and whose order only have prime factors also
bounded by a constant.
