joselado / dmrgpy

DMRGPy is a Python library to compute quasi-one-dimensional spin chains and fermionic systems using matrix product states with DMRG as implemented in ITensor. Most of the computations can be performed both with DMRG and exact diagonalization for small systems, which allows one to benchmark the results.
GNU General Public License v3.0
87 stars 20 forks source link

'Spin_Chain' object has no attribute 'get_dos' #8

Closed Vald20 closed 3 years ago

Vald20 commented 3 years ago

Hello. I need help in computing the density of state of a spin chain.

I tried to run the example name: "dos_spin_chain". But I got the following error:

AttributeError: 'Spin_Chain' object has no attribute 'get_dos'

How can I solve this problem?

joselado commented 3 years ago

Dear Vald20,

thank you for your message. The calculation of the full spectral density of states of the Hamiltonian is something I started implementing, yet it was not finished yet. In short, the sampling of the full Hilbert space with MPS in a uniform way (equivalent to ED) is required for get_dos, and this point has not been implemented in a robust way yet. For the sake of clarity, I will remove that example from the examples folder, and it will be included later.

There are several examples showing how to compute the spectral dynamical correlatiors in the folder dynamical_correlator, perhaps some of them can be useful for your purpose.

Thanks for bringing up this point!

Best regards, Jose

Vald20 commented 3 years ago

hi Jose Thanks for your answer. I will try it out!!