How to obtain full spectrum of given Model?

How do I use this algorithm? What does that parameter do?
Post Reply
Ozaru9000
Posts: 9
Joined: 01 Nov 2019, 18:29

How to obtain full spectrum of given Model?

Post by Ozaru9000 »

I want to obtain the full spectrum of some model and what is crucial - all MPSs representing all possible states. I believe, that for sufficiently large bond_dimension this shouldn't be a problem (at least for a small physical system).

I wanted to use for this purpose DMRG, which is executed with an argument "orthogonal_to". I first did an exact diagonalization to obtain some benchmark results. Then I run DMRG without any conservation of quantum numbers. Finally, I used DMRG with conservation of 'Sz'. I obtained the following results for a SpinChain with 3 SpinSites (with spin 1/2):

Code: Select all

===== EXACT DIAGONALIZATION =====
[-1.0000000e+00+0.j  1.2171636e-16+0.j  5.0000000e-01+0.j -1.0000000e+00+0.j  5.0000000e-01+0.j  0.0000000e+00+0.j 5.0000000e-01+0.j 5.0000000e-01+0.j]

===== DMRG - NO CONSERVATION =====
[-1.0, -1.0, -1.6833599511052614e-16, -7.783179800973695e-17, -7.783179800973695e-17, -7.783179800973695e-17, -7.783179800973695e-17, 3.4663131977831515e-17]

===== DMRG - CONSERVATION OF Sz =====
[-1.0, -1.0, -1.1148336360798884e-16, -1.3877787807814466e-17, -7.320883228133898e-18, -2.4903616914531226e-18, 0.5, 0.5]
The whole code, that I've used for this purpose, is in the attachment.

It seems, like DMRG is performing well on the subspace on which it is launched. E.g. with conservation of Sz it runs on a smaller subspace and is able to obtain at lest the groundstate of this subspace.

What am I doing wrong? Or maybe there is some other way to get what I want? I thought about using ExactDiag and then casting obtained vectors to MPSs, but I would like to stick with the DMRG.
Attachments
Full spectrum.zip
(5.17 KiB) Downloaded 252 times
User avatar
Johannes
Site Admin
Posts: 413
Joined: 21 Jul 2018, 12:52
Location: TU Munich

Re: How to obtain full spectrum of given Model?

Post by Johannes »

Clearly, you can only do this for small system sizes, where you can also do a full exact diagonalization.
DMRG really is not a good algorithm at finding excited states, as I explained in the earlier posting
You should just use exact diagonalization to find (all) the excited states, and then convert them to MPS afterwards, if you really need that.

There is a class tenpy.algorithms.exact_diag.ExactDiag that can do parts of the work (although TeNPy was not built for that!).
Something along the lines of the following should work (although I didn't test it!):

Code: Select all

ED = ExactDiag(model)
ED.build_full_H_from_mpo()
ED.full_diagonalization()
# now ED.E is energies, ED.V has eigenvectors as columns
for i in range(ED.V.shape[1]):
   psi = ED.V[:, i]
   psi_mps = ED.full_to_MPS(psi)
Post Reply