Do you know what numerical software computes an eigenvector basis for a unitary matrix?
Say I have a unitary matrix $U$. If its eigenvalues are simple (no multiplicities), then for instance Matlab computes an eigenbasis for $U$. However, if there are some eigenvalues with multiplicities, in the subspace for the eigenvalues with multiplicity the software does not find independent eigenvectors. If a matrix is symmetric or Hermitian, Matlab is programmed to output an eigenbasis (even if there are eigenvalues with multiplicities). No such thing for unitary matrices - as fas as I know.
I found a way to avoid this: if $λ$ is an eigenvalue with multiplicity, then I can form the matrix $B=A−λ⋅1$ and find the nullity of $B$. The only problem is that doing this for each possible eigenvalue is slow. I wonder if there is a better solution.
If that makes a difference, I can assume that my unitary matrix is real.
The question was also asked here https://cstheory.stackexchange.com/q/27874/ and here https://stackoverflow.com/q/27533637/ (no answer).