Modifying DMRG-X to target specific excited State of H

Hello!

I would like to use DMRG-X from the ITensorTDVP.jl package to obtain a number n_s of states close to some target eigenvalue \lambda of H. According to this post:(Problem using DMRG-X) , it is possible to modify the DMRG-X implementation to target a specific eigenvalue easily but I am stuck with which part I must modify. I have two ideas about where I would need to make changes:

  1. Modify the diagonalization step by diagonalizing a different effective Hamiltonian created by adding a constant shift \lambda to H. This would be similar to how excited states are obtained in normal DMRG by adding \lambda | \psi\rangle \langle \psi | to push out the ground state from H. However, I would like to modify this method to use the invert and shift method to target highly excited states but am unsure how. Moreover, I am unsure about how to interact with the Hamiltonian during this step as there are several dangling indices.
  2. Perform the full diagonalization of the effective Hamiltonian, as is done in the current implementation, and then look for states near a targeted energy level. Since I have all of the eigenvectors at this step, I could just sort through them and grab the closest state in energy that also has large overlap with the current retained state from the previous step.

My naive intuition says tells me that 2) is easy but relatively computationally expensive as the whole spectrum is obtained which will limit the sizes of bond dimensions I can explore. Thus, method 1) would be preferred as it saves lots of computation time but feels harder to implement as it would require more careful thoughts about how to target specific states in the MPO form of H.

Ideally, id like to obtain the largest amount of excited states that I can, just like was done in the DMRG-X reference paper: https://arxiv.org/abs/1509.00483, but it would also be sufficient to just target some of the total spectrum since I know beforehand what the spectrum of H should be before hand.

Any input would be appreciated!

Reading a little bit more on the ITensorTDVP.jl package, I believe I can use the KrylovKit.jl package to help in my targeting of several eigenvalues near some prescribed \lambda. Specifically, I can merge the code from the dmrg.jl and dmrg_x.jl files into my custom solver.

I would need to use eigsolve() from KrylovKit, like its used in the DMRG example, except I have to pass different arguments. In particular I would need to change howmany to be my choice of n and have to add in ClosestTo() for my chosen \lambda for the which key word. Then I would use the bit of code from dmrg_x.jl to then chose the state with the largest overlap with my previous one. The only issue I have with this is that I would like to ideally obtain all of the n closest states near the given energy level, whereas during the dmrg process I only retain one. Can I save this state and enforce orthogonality to it like is done for the excited state args for normal dmrg or is there a best way to proceed here?

I would also like to possibility of passing a non Hermitian MPO (I would like to look at eigenvalues of the time evolution operator) which I can do by setting the solver method to be arnoldi correct?

It would seem that that is the easiest fix no? Let me know if there is an easier way! (Although this seems better as I avoid diagonalizing the whole matrix)