Skip to content

Conversation

@Yue-Zhengyuan
Copy link
Member

Changes:

  • Restricts some structs and functions about the singular value spectrum (most notably SUWeight and sdiag_pow) to work with DiagonalTensorMaps.
  • Some refactoring of simple update.
  • Added an example of Heisenberg model simple update. It will later be expanded with examples on NTU and full update.

@codecov
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 82.50000% with 7 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/utility/util.jl 76.47% 4 Missing ⚠️
src/algorithms/ctmrg/sparse_environments.jl 0.00% 2 Missing ⚠️
src/algorithms/time_evolution/simpleupdate.jl 91.66% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/PEPSKit.jl 87.50% <ø> (ø)
src/algorithms/time_evolution/evoltools.jl 100.00% <100.00%> (ø)
src/states/infiniteweightpeps.jl 93.50% <100.00%> (+0.17%) ⬆️
src/algorithms/time_evolution/simpleupdate.jl 86.90% <91.66%> (-1.01%) ⬇️
src/algorithms/ctmrg/sparse_environments.jl 29.62% <0.00%> (ø)
src/utility/util.jl 54.00% <76.47%> (+1.36%) ⬆️

@Yue-Zhengyuan
Copy link
Member Author

The failed tasks involve the backprop of sdiag_pow which now only works with DiagonalTensorMap, although the forward pass is fine. I may need help on fixing this since I'm not familiar with Zygote, ChainRules etc...

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.

The rrule you have looks fine, the tests are just complaining because you removed the implementations of these functions for the TensorMap case, which I don't think is necessary.

(In any case we still have to support TensorMap for now since the projector onto the diagonal type is currently not working properly, and we might lose that information. See also QuantumKitHub/TensorKit.jl#208.

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! In principle, the examples could do with some clean up, but maybe we can leave that for when we uniformize the documentation.
(Also, if possible in the future to split of different topics into different PRs that would be great).

After updating with the master and my final comment this should be good to go for me.

@lkdvos lkdvos requested a review from pbrehmer February 4, 2025 16:18
Copy link
Collaborator

@pbrehmer pbrehmer left a comment

Choose a reason for hiding this comment

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

Thanks for the work @Yue-Zhengyuan, this looks good! As long as we make sure to credit the YASTN code bits and adapt the naming to our internal conventions in the follow-up PR, I'm happy to merge this :)

@lkdvos lkdvos merged commit 1124602 into QuantumKitHub:master Feb 5, 2025
27 checks passed
@Yue-Zhengyuan Yue-Zhengyuan deleted the su-diagtm branch February 7, 2025 02:19
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