-
Notifications
You must be signed in to change notification settings - Fork 19
Network solvers redesign #242
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
Open
emstoudenmire
wants to merge
25
commits into
main
Choose a base branch
from
network_solvers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,264
−690
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
eef7d0f
Delete and move some files to make space for new code
emstoudenmire b15d045
Add redesigned solver codes
emstoudenmire 3edcc3d
Update solvers codes to latest versions
emstoudenmire 8930d80
Remove previous solver includes
emstoudenmire 9235349
Add ConstructionBase dependency
emstoudenmire d70bf03
Adapt new solver codes into ITensorNetworks module
emstoudenmire c081dfb
Continue adapting code and improve DMRG test
emstoudenmire e5047fc
Rename tdvp to time_evolve. Add tests.
emstoudenmire 3f7442f
Change default outputlevel in tests
emstoudenmire 8ef353f
Rename and reorder some arguments
emstoudenmire 7391c0c
Rename test files
emstoudenmire 735fa7e
Bump version number to 0.14.0
emstoudenmire 1d1dbc0
Rename permute_indices to align_indices
emstoudenmire b918731
Rename file
emstoudenmire 8928162
Implement many style changes
emstoudenmire 0a4db77
Improve time_steps calculation code
emstoudenmire 9abc732
Change name of callbacks and use overloading
emstoudenmire 7719cc2
Improve import/using code style
emstoudenmire 751902c
Rename region_iterator_action to region_step
emstoudenmire ddafd9f
Change callbacks and printer to take problem
emstoudenmire 31a86d3
Remove older region_plans.jl file
emstoudenmire 3882692
Change extracter etc to extract, update, insert. Change related kwarg…
emstoudenmire ad874a5
Fix line of code in time_evolve
emstoudenmire 4a5f686
Merge branch 'network_solvers' of https://github.com/ITensor/ITensorN…
emstoudenmire ba9c1ef
Commit fitting code and test
emstoudenmire 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
name = "ITensorNetworks" | ||
uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7" | ||
authors = ["Matthew Fishman <[email protected]>, Joseph Tindall <[email protected]> and contributors"] | ||
version = "0.13.12" | ||
version = "0.14.0" | ||
|
||
[deps] | ||
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" | ||
Combinatorics = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" | ||
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20" | ||
ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" | ||
DataGraphs = "b5a273c3-7e6c-41f6-98bd-8d7f1525a36a" | ||
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" | ||
Dictionaries = "85a47980-9c8c-11e8-2b9f-f7ca1fa99fb4" | ||
|
@@ -53,6 +54,7 @@ AbstractTrees = "0.4.4" | |
Adapt = "4" | ||
Combinatorics = "1" | ||
Compat = "3, 4" | ||
ConstructionBase = "1.6.0" | ||
DataGraphs = "0.2.3" | ||
DataStructures = "0.18" | ||
Dictionaries = "0.4" | ||
|
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,32 @@ | ||
|
||
# | ||
# TupleRegionIterator | ||
# | ||
# Adapts outputs to be (region, region_kwargs) tuples | ||
# | ||
# More generic design? maybe just assuming RegionIterator | ||
# or its outputs implement some interface function that | ||
# generates each tuple? | ||
# | ||
|
||
mutable struct TupleRegionIterator{RegionIter} | ||
region_iterator::RegionIter | ||
end | ||
|
||
region_iterator(T::TupleRegionIterator) = T.region_iterator | ||
|
||
function Base.iterate(T::TupleRegionIterator, which=1) | ||
state = iterate(region_iterator(T), which) | ||
isnothing(state) && return nothing | ||
(current_region, region_kwargs) = current_region_plan(region_iterator(T)) | ||
return (current_region, region_kwargs), last(state) | ||
end | ||
|
||
""" | ||
region_tuples(R::RegionIterator) | ||
The `region_tuples` adapter converts a RegionIterator into an | ||
iterator which outputs a tuple of the form (current_region, current_region_kwargs) | ||
at each step. | ||
""" | ||
region_tuples(R::RegionIterator) = TupleRegionIterator(R) |
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,16 @@ | ||
|
||
function align_indices(tn) | ||
si = siteinds(tn) | ||
ptn = copy(tn) | ||
for v in vertices(tn) | ||
is = inds(tn[v]) | ||
ls = setdiff(is, si[v]) | ||
isempty(ls) && continue | ||
new_is = [first(ls), si[v]...] | ||
if length(ls) >= 2 | ||
new_is = vcat(new_is, ls[2:end]) | ||
end | ||
ptn[v] = permute(tn[v], new_is) | ||
end | ||
return ptn | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Maybe we can come up with a name that is more descriptive, like
RegionIteratorWithKwargs
.Tuple
is a bit vague.