Add eigsolve-style rrule for CTMRG fixed-point gradient#126
Conversation
Codecov ReportAttention: Patch coverage is
|
|
I had a go at adding this after a suggestion from @Jutho, for now mainly just so I didn't forget about it again. From what I can tell solving the fixed-point gradient linear problem like this is actually very fast and stable for all the examples. It's also the method of choice for the VUMPS pullback in VUMPSAutoDiff.jl. However, there seems to be a problem with the gradient tests for Do you have an idea why |
|
This is super interesting, thanks for adding this. I will try to take a closer look the next few days. Regarding |
|
I noticed a few things but I can't claim I have really understood what's going on. The problem seems to be that So when choosing One can also enable The difference between |
pbrehmer
left a comment
There was a problem hiding this comment.
Thanks again for the addition, this really seems like an efficient approach to differentiating CTMRG! Perhaps this should be the new default? I will try to benchmark against LinSolver and see what seems best in a different PR.
Co-authored-by: Paul Brehmer <paul.brehmer@univie.ac.at>
Good catch, I had not thought of that! I added a default |
|
Sorry to dismiss the reviews, but I was maybe too quick in un-drafting this since there were two things that still needed to be addressed before merging:
If this doesn't break anything, should be good to go then |
Solving the Sylvester problem as an eigenvalue equation, applied to the CTMRG fixed-point gradient linear problem.
Idea after:
https://github.com/Jutho/KrylovKit.jl/blob/fb56bbc7ee952bc8a6af6d278c42e78e553aa62e/ext/KrylovKitChainRulesCoreExt/eigsolve.jl#L167-L290
Actual implementation after:
https://github.com/tangwei94/VUMPSAutoDiff.jl/blob/57afc1cbcb2af9c596197c7d07adfb26ebabcd7a/src/vumps.jl#L161-L203