  We develop a new approach of the quantum phase in an Hilbert space of finite
dimension which is based on the relation between the physical concept of phase
locking and mathematical concepts such as cyclotomy and the Ramanujan sums. As
a result, phase variability looks quite similar to its classical counterpart,
having peaks at dimensions equal to a power of a prime number. Squeezing of the
phase noise is allowed for specific quantum states. The concept of phase
entanglement for Kloosterman pairs of phase-locked states is introduced.
