corrected mixing_matrix so it works also for complex Hamiltonians
mixing matrix now works also for complex matrices