I posted a similar question yesterday but I deleted it since I think that I had to reformulate it after some insights.
I want to calculate $$ \exp(-i\Delta t\,\mathcal{H}) = V\,\mathrm{diag}(\{\exp(-i\Delta t\,\epsilon_k\})\,V^{-1} ~~~~~~~~~~~~~(*) $$ where $\mathcal{H}$ is a hermitian matrix (the hamilton matrix) and $V$, $\epsilon_k$ are its eigenvectors and -values.
Since I'm implementing this in a given DFT package, I make use of the existing eigensolver routine. All numerics are done by ScaLAPACK. It first computes the Cholesky factorization of the overlap matrix $S_{ij}=\langle\phi_i|\phi_j\rangle$: $$ S = U^TU $$ where $U$ is the upper triangular matrix. In the next step, $U$ is inverted for further usage. It then solves the eigenvalue problem for the transformed hamilton matrix $$ \mathcal{H}' = U^{-\dagger}\mathcal{H}\,U^{-1} $$ which yields the eigenvectors $V'$. This is done since we have a generalized eigenvalue problem because a non-orthogonal basis set is used. The eigenvectors are afterwards backtransformed via $$ V = U^{-1} V'. $$
I tried to calculate $(*)$ by inverting $V$ which needs a LU decomposition since $V$ is a non-hermitian matrix. This turned out to be unstable after some iterations although it initially produced correct results.
I found a different way to circumvent inverting $V$ which uses the not backtransformed eigenvectors $V'$. Here, the exponential is explicitly calculated via $$ (U^{-1}V')\,\mathrm{diag}(\{\exp(-i\Delta t\,\epsilon_k\})(U^{-1}V')^{-1}=U^{-1}V'\,\mathrm{diag}(\{\exp(-i\Delta t\,\epsilon_k\})V'^\dagger U $$ where $V^{-1}=V'^{\dagger}$ can be applied since $V'$ is unitary. Unfortunately, this yields oscillating solutions around the right solution (e.g. total energy).
I'm not sure why this isn't working and I'm quite new to the field. I tried $S^{-1}$ and $S$ in above formula instead of $U^{-1}$ and $U$ but it didn't help, also I tried a lot more modifications but I just can't figure out where the problem could be.
I would really appreciate some help. Thanks and best regards!