ITensor / ITensors.jl

A Julia library for efficient tensor computations and tensor network calculations
https://itensor.org
Apache License 2.0
522 stars 121 forks source link

Excited States in DMRG? #235

Closed vipasu closed 4 years ago

vipasu commented 4 years ago

Hi,

Thanks for the awesome work being put into this package!

I wanted to ask if the functionality for finding excited states with DMRG was on the roadmap any time soon? I tried looking at the dmrg.jl and examples but couldn't find a place to specify previously found wavefunctions. I'm interested in the low lying spectra of the critical transverse Ising model.

Thanks, Vincent

emstoudenmire commented 4 years ago

Hi Vincent, Yes, we are planning to add this feature before we go to 1.0 in about a month's time hopefully, though it could be 2 months. But we have a number of missing features (relative to C++) to still add, and the Julia version is not officially done yet. We plan to add all of the main features of C++ to the Julia 1.0 version.

Miles

emstoudenmire commented 4 years ago

Glad you are interested in this project. If you do need to do an excited state calculation right away, you could consider using the C++ version which as you likely know already has this excited state feature.

vipasu commented 4 years ago

Ok that's helpful to know, thanks!

emstoudenmire commented 4 years ago

We'll leave this bug open as a reminder to add the feature!

sujay-kazi commented 4 years ago

Do you currently have a way of doing this, even if it's not a built-in function? When I looked up online how to find excited states, the typical recommendation was to do the following:

  1. Take the original Hamiltonian H and find its ground state |psi>
  2. Create an adjusted Hamiltonian H' = H + K|psi><psi|, where K is large enough such that |psi> no longer has the lowest energy
  3. Rinse and repeat for as many excited states as you want to find

However, in the ITensors code, I don't see a feasible way to add a term of the form |psi><psi| to the Hamiltonian if you have already computed |psi>. It seems that the only way to create a Hamiltonian is to add a bunch of terms to an AutoMPO object (and these terms can only be Pauli spin operators or simple products of those) and then create a Hamiltonian using that.

Any help on how to do this (if it is possible) would be greatly appreciated.

emstoudenmire commented 4 years ago

Hi Sujay, so our excited-state DMRG code works in the way you described. To make adding |psi><psi| to the Hamiltonian efficient, the key is to wrap it in the basis defined by the current MPS being optimized, treating the bra and ket parts of |psi><psi| as separate factors.

See the new pull request linked above (#283) where I am about to finally add this feature to ITensors.jl, and you can use it for your work.

Please let me know if you have any questions about the method and how it works.

Best, Miles