-
Notifications
You must be signed in to change notification settings - Fork 27
Gauge improvements #101
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
Gauge improvements #101
Conversation
src/orthogonalize.jl
Outdated
| λ₁ᴿᴺ, v₁ᴿᴺ = λ⃗₁ᴿᴺ[1], v⃗₁ᴿᴺ[1] | ||
|
|
||
| if size(TT, 2) > 1 && TT[2, 1] != 0 | ||
| @warn("Largest transfer matrix eigenvector is not real?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a bit funny to make this a question. Can't you check if it is real?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it isn't a definitive check, it would be better to phrase it as "Largest transfer matrix eigenvector might not be real.".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be "Non-unique largest eigenvector" (or the eigenvector shouldn't be real)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what it really means is that it is not unique, this results in complex conjugate eigenvalue pairs (hence checking the TT[2, 1], TT[1:2,1:2] = [real(lambda) imag(lambda); -imag(lambda) real(lambda)] or something like that).
|
Nice to see it get more general and simpler! |
|
@lkdvos it seems that using |
|
That's interesting... The only difference should be that it is checking every iteration if the tolerance has been reached, instead of waiting until the full krylov subspace is populated. Basically, it's probably not fair to expect that you reach the same tolerance for the eigenvector hermiticity as you would get for the eigenvector itself. If you don't put |
|
Sounds like we should play around with different tolerances when checking for Hermiticity, I don't think there is anything magical about the current choice besides that it has worked so far for catching issues while not being too strict. |
|
I noticed a bug with julia> p = orthogonalize(ψ.AL, : ; tol=1e-14)
p2 = orthogonalize(p.AL, :)
ERROR: In `isapprox(::ITensor, ::ITensor)`, the indices of the ITensors do not
match. The first ITensor has indices:
#.... |
Got it, I don't have time to look into that but feel free to make a PR. |
|
@mtfishman is this good to go? |
Co-authored-by: Matt Fishman <[email protected]>
Co-authored-by: Matt Fishman <[email protected]>
|
Can you bump the package version? |
|
Sure thing! |
This implements two improvements:
finite_mpscan now have its gauge center be on the first site instead of the last siteorthogonalizeensures a real Hermitian transfer matrix eigenvector thanks toschursolve(shout out @lkdvos for the tip)The first change is a small speed improvement for long
finite_mpscalls ascorrelation_matrixwill immediately move the orthogonality center to the first siteThe second change includes the additional "gauge fixing" of the output of vumps in the Hubbard example, which should probably always be done so that the state you want to measure has a more consistent
Cmatrix.