-
Notifications
You must be signed in to change notification settings - Fork 33
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
leading_boundary
using GradientGrassman
fails on multiline MPOs
#98
Comments
The whole Grassmann stuff needs a major overhaul. @maartenvd , if I am correct, the motivation for the current rather complicated implementation is that, if you just use the standard gradient of the left canonical form, and then put the translation to the proper gradient (multiplying with regularised inverse of right reduced matrix), the problem was that the OptimKit methods terminate to soon, because the Euclidean norm of this left canonical gradient is not the physical norm, and the physical norm can still be much bigger. The best solution would be to just have a better / controllable termination condition in OptimKit. A better choice would probably be |
See also #53 |
Essentially, yes. I do recall optimkit's linesearch also terminating too early when you work with the "true" gradient. The problem is that the gradient with respect to AL is g = v*C', where v is the gradient with respect to AC. Optimkit and its linesearch only look at the norm of the gradient, which converges way faster than the norm of v. The preconditioned gradient is defined as Pg = v * C' * pinv(C * C'), so in an ideal situation optimkit could be configured to look at <gradient | preconditioned>, which is approximately the norm of v. On the other hand, if we don't want to change optimkit, I had to redefine both the derivative and the inner product so that the inner product of the new gradient with itself becomes the norm of v. I defined:
but the inner product then often (always) involves multiplying rho with its exact inverse, so I cobled together PrecGrad, which stores (vC', vC'*inverse(rho),rho). That way I could get away with never having to multiply the inverse of rho with rho, as that is another source of inaccuracy. There was another complication that made it so that I had to structure the code in a weird way, instead of how it used to be https://github.com/maartenvd/MPSKit.jl/blob/2a9af1f8d3b7c2887608a899a7a6e3e69ea63f37/src/algorithms/grassmann.jl ... |
Thanks for the clarification, this is indeed how I also remember it. But clearly, modifying OptimKit to have a custom termination criterion, with a default that is |
leading_boundary(ψ::MPSMultiline, O::MPOMultiline, alg::GradientGrassmann)
currently fails for non-trivial multiline MPOs. It seems the cost function definition for the multiline stat mech case is wrong, but it should be fairly straightforward to fix.For example, when running
it can go wrong in any of the following ways depending on initialization:
or get stuck indefinitely on
or get stuck indefinitely on
The text was updated successfully, but these errors were encountered: