Closed chiamin closed 1 month ago
ExpM rely on diagonalization, which eigenvalues is not always real right? ExpH is the the one that can always guarantee that
You are right! I will close this issue.
Well, you should be careful, that if the matrix doesn't have a complete set of real eigenvalues then diagonalization is a really terrible way of calculating the exponential! There are much better ways of calculating the matrix exponential; I use https://www.maths.uq.edu.au/expokit/ that uses a Pade approximation. Scipy also uses Pade.
Yes. There are also other approximation methods via iteration.
On Sat, Oct 19, 2024, 05:26 Ian McCulloch @.***> wrote:
Well, you should be careful, that if the matrix doesn't have a complete set of real eigenvalues then diagonalization is a really terrible way of calculating the exponential! There are much better ways of calculating the matrix exponential; I use https://www.maths.uq.edu.au/expokit/ that uses a Pade approximation. Scipy also uses Pade.
— Reply to this email directly, view it on GitHub https://github.com/Cytnx-dev/Cytnx/issues/493#issuecomment-2423716418, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFCX3SKML6PZNYNOTRO6C3DZ4IQUJAVCNFSM6AAAAABQHF3XBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRTG4YTMNBRHA . You are receiving this because you commented.Message ID: @.***>
cytnx.linalg.ExpM(T)
returns a complex UniTensor even if the input tensor is real. It can be demonstrated as follows.