We describe solutions of the matrix equation $exp(z(A-I_n))=A$, where $z in {mathbb C}$. Applications in quantum computing are given. Both normal and nonnormal matrices are studied. For normal matrices, the Lambert W-function plays a central role.