Menu

Imaginary Hamiltonians

Technical
2014-11-18
2020-01-08
  • Daniel Jaschke

    Daniel Jaschke - 2014-11-18

    Dear all,

    up-to-now there seems to be no possibility to input Hamiltonians with complex values, e.g. sigma_y. It can be given as input in the python files, but the fortran seems to use real values only for the Hamiltonians. No errors are raised in this case.

    Wei and I put this on our to-do list, any comments are welcome.

    Best regards,

    Daniel

     
    • Michael L Wall

      Michael L Wall - 2014-11-19

      Hi Daniel,

      This is indeed the case. Mostly, this was motivated by the fact that for
      real Hamiltonians we have real eigenvectors, so we can use all real numbers
      in the calculation. This is, of course, faster than using complex MPSs.
      In order to keep this same speedup when the Hamiltonian is real, the code
      would need a switch which only uses the complex routines when complex
      parameters are passed. All of the (Fortran) computation is written in a
      generic way which can deal with complex Hamiltonians, the change would only
      be in choosing whether to use real or complex routines based on input from
      python.

      -Michael

      On Tue, Nov 18, 2014 at 1:22 PM, Daniel Jaschke djaschke@users.sf.net
      wrote:

      Dear all,

      up-to-now there seems to be no possibility to input Hamiltonians with
      complex values, e.g. sigma_y. It can be given as input in the python files,
      but the fortran seems to use real values only for the Hamiltonians. No
      errors are raised in this case.

      Wei and I put this on our to-do list, any comments are welcome.

      Best regards,

      Daniel

      Imaginary Hamiltonians
      https://sourceforge.net/p/openmps/discussion/tech/thread/452f5f73/?limit=25#cd97


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/openmps/discussion/tech/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Daniel Jaschke

    Daniel Jaschke - 2015-01-14

    I'll start working on the imaginary Hamiltonian part. So if anyone starts working on this, you may ask me before for some pieces ...

     
  • Fangli Liu

    Fangli Liu - 2018-06-09

    Hi Daniel,

    Insead of implementing a Hamiltonian with complex value, is there any possiblitity to make observables to be comples? --say, if I have a spin model, how could I measure the site magnetization and correlation function for sigma_y?

    Thanks for your help in advance!

     
  • Daniel Jaschke

    Daniel Jaschke - 2018-06-14

    Hello,

    You add the sigma_y to your operators:

    Operators = mps.BuildSpinOperators(spin=0.5)
    Operators['sy'] = np.array([[0, -1.0j], [1.0j, 0]], dtype=np.complex128)

    Then, you can add the sigma_y observable as measurement as you would add any other site observable.

    myObs = mps.Observables(Operators)
    myObs.AddObservable('site', 'sy', name='<y>')</y>

    OSMPS will switch to complex numbers for the variational ground state search then even if sigma_y is not in the Hamiltonian. Correlations will work the same way.

    Let me know if you have any more questions.

    Best regards,

    Daniel

     
  • Rafael Barfknecht

    Hello all,

    I am trying to include a hopping term in a Hubbard Hamiltonian which looks like

    -t \sum_j exp(i \phi) a_j^\dagger a_j + H.c.

    and, although the simulations does run, I get

    ComplexWarning: Casting complex values to real discards the imaginary part
    Hstring = '%30.15E'%(self.weight[ii])

    I tried adding the complex part either as the value of the hopping parameter itself and also as the weight in the definition of the operator, but the warning remains there. Is there a way to get around this issue?

    Best regards,

    Rafael

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.