This repository was archived by the owner on Jan 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Insert projectors to PEPS optimizations #18
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
44baa13
Add rrule for split_links
LinjianMa 9bb1b9f
Insert projectors to PEPS optimizations
LinjianMa 2c8aa86
Get gradient optimization with approximation peps contraction working
LinjianMa a4cbdec
Rewrite rrule for split_network
LinjianMa 3eee8e3
Refactor bmps out from split_network, rewrite rrule for split_network
LinjianMa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using ChainRulesCore | ||
| using ..ITensorNetworks | ||
| using ..ITensorNetworks: split_network, default_projector_center | ||
|
|
||
| function ChainRulesCore.rrule( | ||
| ::typeof(split_network), | ||
|
LinjianMa marked this conversation as resolved.
|
||
| tn::Matrix{ITensor}; | ||
| projector_center=default_projector_center(tn), | ||
| ) | ||
| function pullback(dtn_split::Matrix{ITensor}) | ||
| dtn = map(t -> replaceprime(t, 1 => 0), dtn_split) | ||
| return (NoTangent(), dtn, NoTangent()) | ||
| end | ||
| return split_network(tn; projector_center=projector_center), pullback | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to implement a more direct
prime(siteinds, ::PEPS, ...)function to complementprime(linkinds, ::PEPS, ...). I'll add that as an issue.