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

Fix FullInfiniteProjector #107

Merged
merged 6 commits into from
Dec 19, 2024

Conversation

Yue-Zhengyuan
Copy link
Contributor

  • In Corboz's original way (PRL 113 046402) to get projectors from the full-infinite environment, he first performs QR on the two halves and then SVD on the two R tensors. However, it is later refined in PRB 98 235148 that there's no need to do QR first, and we can directly do SVD on the two halves. This PR implements the latter method to replace the original (instead of adding an option to switch between the two).

  • Before SVD, the indices in the lower half of the two half-infinite environments should be contracted instead of multiplied (as two linear maps; see original here) to include fermion signs.

  • This will also fix the warning message reported in Warning when precompiling: using OhMyThreads.@set in module PEPSKit conflicts with an existing identifier #104.

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 30.00000% with 28 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/algorithms/ctmrg/sparse_environments.jl 0.00% 16 Missing ⚠️
src/algorithms/contractions/ctmrg_contractions.jl 20.00% 8 Missing ⚠️
src/algorithms/ctmrg/ctmrg.jl 60.00% 4 Missing ⚠️
Files with missing lines Coverage Δ
src/PEPSKit.jl 87.50% <ø> (ø)
src/algorithms/ctmrg/projectors.jl 94.59% <100.00%> (-0.28%) ⬇️
src/algorithms/ctmrg/simultaneous.jl 98.33% <100.00%> (-0.18%) ⬇️
src/algorithms/ctmrg/ctmrg.jl 86.53% <60.00%> (-7.22%) ⬇️
src/algorithms/contractions/ctmrg_contractions.jl 66.89% <20.00%> (-3.48%) ⬇️
src/algorithms/ctmrg/sparse_environments.jl 30.76% <0.00%> (-10.05%) ⬇️

@pbrehmer
Copy link
Collaborator

Thanks for the fix! Doing just the SVD simplifies things and perhaps makes the full-infinite scheme more stable in the reverse-mode differentiation.

I will quickly adapt the fixes to the code convention (i.e. outsource the contractions to the contraction file and naming). Also I will add some tools for working the the actual full-infinite environment which I coded up for #99 but then didn't use because of the QR. (This will make it possible to use function-handle SVDs for the full-infinite algorithm in the future such that the environments don't have to be constructed as dense tensors.)

@pbrehmer pbrehmer requested a review from lkdvos December 19, 2024 13:08
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 to me! The codecov is complaining slightly that some of the sparse methods and related contractions aren't tested, but I am okay with keeping that as is for now, until we actually start using them.

@pbrehmer
Copy link
Collaborator

The codecov is complaining slightly that some of the sparse methods and related contractions aren't tested, but I am okay with keeping that as is for now, until we actually start using them.

Yes that was the plan. I'll write up tests once we fully implement sparse CTMRG :-)

@pbrehmer pbrehmer merged commit 3158c04 into QuantumKitHub:master Dec 19, 2024
26 of 27 checks passed
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