Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output eigenvalue from ITensorTDVP.dmrg and dmrg_x #71

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

mtfishman
Copy link
Member

Output the eigenvalue along with the eigenvector from ITensorTDVP.dmrg and dmrg_x in a tuple.

The eigenvalue is returned as the first argument, following the convention of many eigensolvers in Julia, like LinearAlgebra.eigen, KrylovKit.eigsolve, Arpack.eigs, IterativeSolvers.lobpcg, and ITensors.ITensorMPS.dmrg.

User code like:

psi = dmrg_x(H, psi0; nsweeps=10, maxdim=100, cutoff=1e-6)
psi = ITensorTDVP.dmrg(H, psi0; nsweeps=10, maxdim=100, cutoff=1e-6)

will need to be changed to:

energy, psi = dmrg_x(H, psi0; nsweeps=10, maxdim=100, cutoff=1e-6)
energy, psi = ITensorTDVP.dmrg(H, psi0; nsweeps=10, maxdim=100, cutoff=1e-6)

@emstoudenmire @amilsted

@mtfishman mtfishman merged commit 4669573 into main May 6, 2024
8 of 9 checks passed
@mtfishman mtfishman deleted the dmrg_energy branch May 6, 2024 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant