Exponentials like exp(itA)

33 views
Skip to first unread message

Tyler Guglielmo

unread,
May 30, 2021, 7:16:57 PM5/30/21
to expokit
To whom it may concern,

I am new to using expokit, and will be using it with large, real, symmetric matrices "A".  However, I would like to compute exp(i * t * A) where "i" is the imaginary number.  Should the standard symmetric/Hermitian expokit function work if I use a complex symmetric matrix "iA?" or should the code be modified somehow due to any kind of instability issues?
 Would really appreciate any help on this,  thanks in advance for your time!

Best,
Tyler

Pranav Gupta

unread,
May 30, 2021, 9:11:04 PM5/30/21
to exp...@googlegroups.com
I would use zgexpv in Fortran to do the calculations, but you might be able to use zhexpv by doing some clever transformations. You can't directly use zhexpv here. In am assuming you are using Fortran.

--
You received this message because you are subscribed to the Google Groups "expokit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to expokit+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/expokit/6e5d7da3-ea90-400d-963d-c05db1534458n%40googlegroups.com.

Tyler Guglielmo

unread,
May 31, 2021, 12:21:12 AM5/31/21
to exp...@googlegroups.com
Thank you for the response Pranav, I am unfortunately having to translate all of this code into C -- so I am not too worried about the direct usage of the program.  I am mainly concerned about the algorithm and convergence issues with the Lanczos method.  Are you familiar with this?  Essentially I am trying to compute exp(itA) with A either symmetric or Hermitian so I would like to only use symmetric matrix multiplication.

Best,
Tyler

You received this message because you are subscribed to a topic in the Google Groups "expokit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/expokit/0e3bQN11i_Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to expokit+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/expokit/CAFQ4HZt4_k4BJK4bL8i8ysPrhe3b85oWC228KFKMrUEWyHF7Dg%40mail.gmail.com.


--
Tyler Guglielmo
Ph.D. Candidate, Physics
University of Texas at Austin

Tyler Guglielmo

unread,
May 31, 2021, 12:46:45 AM5/31/21
to exp...@googlegroups.com
On a separate note, I have noticed some behavior that may be undefined in the "zhexpv.f" code.  Specifically, 

1    p2 = p1 - 1.0d0
     p3 = p2 + p2 + p2
     eps = ABS( p3-1.0d0 )
     if ( eps.eq.0.0d0 ) go to 1
It looks to me that this could be an infinite loop if eps == 0.0 b/b p1 has not changed.  However, it does not seem like it is ever possible to have eps = 0.0 with double precision arithmetic.  
Something else that looks confusing to me is the following call to compute the Pade approximation:

call ZGPADM( ideg, mx, sgn*t_step, wsp(ih),mh,
     .                wsp(ifree),lfree, iwsp, iexph, ns, iflag )
As far as I can tell, "iexph" has not been set at this point in the program.  Am I reading this correctly?  Thanks for your time again!
Best,
Tyler


Tyler Guglielmo

unread,
May 31, 2021, 12:57:10 PM5/31/21
to exp...@googlegroups.com
Ah I see what happens with iexph.  It simply just gets returned with new value iput.  So no worries, but I still think the goto 1 statement is potentially bad behavior.

Tyler
Reply all
Reply to author
Forward
0 new messages