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

Implement full-infinite projector algorithm #99

Merged
merged 21 commits into from
Dec 12, 2024
Merged

Conversation

pbrehmer
Copy link
Collaborator

This PR will implement the full-infinite projector algorithm which SVDs the full 4x4 CTMRG environment, as suggested in #93.

To do this we will need to break up the expand/projectors/renormalize pattern we currently use to implement the CTMRG routine.

@pbrehmer pbrehmer marked this pull request as draft November 28, 2024 17:34
Copy link

codecov bot commented Nov 28, 2024

@pbrehmer pbrehmer marked this pull request as ready for review December 6, 2024 19:38
@pbrehmer
Copy link
Collaborator Author

pbrehmer commented Dec 6, 2024

This should almost be finished. CTMRG is now refactored with both HalfInfiniteProjector and FullInfiniteProjector running, at least in the forward pass. Somehow FullInfiniteProjector does not yet differentiate but I'll look at that on Monday. I have also added the new projector algorithm to the test suite.

@lkdvos Perhaps you could take a look at the refactoring whenever you have time? Thanks :-)

Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good!

I would say that I am a bit torn on using a flavor over a separate struct now, given that we are separating the algorithms in their own files and this results in having to come up with new names for functions that are doing the same thing, albeit via a different implementation. Maybe just something like this:

abstract type CTMRGAlgorithm end
struct SequentialCTMRG
  # fields....
end
struct SimultaneousCTMRG
end

could also work, although that is of course the same as the type aliases we had before. I like this slightly better since it doesn't require symbols, which are hard to constrain/remember the exact form of.

The projector code looks good, I think I would separate it into its own file, since it's now a substantial amount of code.

The remark about the race conditions is probably not super urgent, just wanted to at least mention it somewhere because I had noticed it and don't want to forget.

src/algorithms/contractions/ctmrg_contractions.jl Outdated Show resolved Hide resolved
src/algorithms/contractions/ctmrg_contractions.jl Outdated Show resolved Hide resolved
src/algorithms/ctmrg/ctmrg.jl Show resolved Hide resolved
src/algorithms/ctmrg/ctmrg.jl Outdated Show resolved Hide resolved
src/algorithms/ctmrg/ctmrg.jl Outdated Show resolved Hide resolved
src/algorithms/contractions/ctmrg_contractions.jl Outdated Show resolved Hide resolved
src/algorithms/ctmrg/sequential.jl Outdated Show resolved Hide resolved
src/algorithms/ctmrg/simultaneous.jl Outdated Show resolved Hide resolved
@pbrehmer
Copy link
Collaborator Author

pbrehmer commented Dec 9, 2024

So most things should work now. Again, the truncation space coordinates for the projectors really confused the hell out of me but FixedSpaceTruncation now works properly again.

Somehow FullInfiniteProjector still doesn't work for the :fixed mode differentiation (the others seem to work), so I'll have to see tomorrow where the problem lies.

@pbrehmer
Copy link
Collaborator Author

pbrehmer commented Dec 10, 2024

It should now differentiate also in the :fixed mode. It seems that the full-infinite projectors are just a bit unstable in general when it comes to differentiation (I think this is known?), so this leaves some room for experimentation. But from the implementation side this should be good to go, I hope.

I also updated the gauge-fixing test such that it hopefully is more stable now.

@pbrehmer pbrehmer requested a review from lkdvos December 10, 2024 15:36
lkdvos
lkdvos previously approved these changes Dec 10, 2024
Copy link
Member

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

One remark might be that maybe we try to merge #97 first, since I don't want to make Yue have to rewrite his code (again). Could you have a look at that PR and tell us what you think?

@pbrehmer
Copy link
Collaborator Author

Yes, I'll take a look and then we can merge #97 first!

@pbrehmer pbrehmer mentioned this pull request Dec 10, 2024
4 tasks
@pbrehmer pbrehmer requested a review from lkdvos December 12, 2024 14:47
@pbrehmer pbrehmer merged commit 7d79cb9 into master Dec 12, 2024
27 checks passed
@pbrehmer pbrehmer deleted the pb-full-inf-proj branch December 12, 2024 15:40
@Yue-Zhengyuan
Copy link
Contributor

@pbrehmer Thanks for the great work! I'll adapt my code with the latest changes and open a PR on full update soon.

@pbrehmer pbrehmer changed the title Implement half-infinite projector algorithm Implement full-infinite projector algorithm Dec 19, 2024
@pbrehmer pbrehmer restored the pb-full-inf-proj branch December 19, 2024 11:32
@pbrehmer pbrehmer deleted the pb-full-inf-proj branch December 19, 2024 12:56
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.

3 participants