  In a quantum system having a finite number $N$ of orthogonal states, two
orthonormal bases $\{a_i\}$ and $\{b_j\}$ are called mutually unbiased if all
inner products $<a_i|b_j>$ have the same modulus $1/\sqrt{N}$. This concept
appears in several quantum information problems. The number of pairwise
mutually unbiased bases is at most $N+1$ and various constructions of $N+1$
such bases have been found when $N$ is a power of a prime number. We study
families of formulas that generalize these constructions to arbitrary
dimensions using finite rings.We then prove that there exists a set of $N+1$
mutually unbiased bases described by such formulas, if and only if $N$ is a
power of a prime number.
