-
Notifications
You must be signed in to change notification settings - Fork 128
[ITensors] Call out to TensorOperations.jl for optimal sequence finding #1637
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
Merged
mtfishman
merged 20 commits into
ITensor:main
from
JoeyT1994:ContractionSequenceFinding
Mar 26, 2025
Merged
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
79193c4
Remove optimal sequence finding functions in favour of TensorOperations
JoeyT1994 5997fb0
Updated Project.toml
JoeyT1994 d0e2984
Formatting and delete file
JoeyT1994 fff38d3
Remove redendant file from tests
JoeyT1994 8354875
Updated Project.toml
JoeyT1994 7e6d3c9
Update Docs
JoeyT1994 93c4bbc
Merged upstream
JoeyT1994 5611fa0
Updated version
JoeyT1994 50fa467
DocString for optimal_constraction_sequence
JoeyT1994 96afe54
Update docs/src/ContractionSequenceOptimization.md
JoeyT1994 9bed32f
News item
JoeyT1994 377333d
update Docs version
JoeyT1994 0cd521e
Update compat in docs/Project.toml
JoeyT1994 431ff5d
Revert docs version
JoeyT1994 205d819
Update Docs Version
JoeyT1994 cab6d63
Remove compat for ITensors in docs/Project.toml
JoeyT1994 b003332
Move docstring to src
JoeyT1994 f3b93a4
Update ext/ITensorsTensorOperationsExt/ITensorsTensorOperationsExt.jl
JoeyT1994 373eaf2
Update ext/ITensorsTensorOperationsExt/ITensorsTensorOperationsExt.jl
JoeyT1994 18ec610
Merge branch 'main' into ContractionSequenceFinding
mtfishman 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,7 +1,7 @@ | ||
| name = "ITensors" | ||
| uuid = "9136182c-28ba-11e9-034c-db9fb085ebd5" | ||
| authors = ["Matthew Fishman <[email protected]>", "Miles Stoudenmire <[email protected]>"] | ||
| version = "0.8.9" | ||
| version = "0.9.0" | ||
|
|
||
| [deps] | ||
| Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" | ||
|
|
@@ -29,11 +29,13 @@ Zeros = "bd1ec220-6eb4-527a-9b49-e79c3db6233b" | |
|
|
||
| [weakdeps] | ||
| HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" | ||
| TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" | ||
| VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8" | ||
| ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" | ||
|
|
||
| [extensions] | ||
| ITensorsHDF5Ext = "HDF5" | ||
| ITensorsTensorOperationsExt = "TensorOperations" | ||
| ITensorsVectorInterfaceExt = "VectorInterface" | ||
| ITensorsZygoteRulesExt = "ZygoteRules" | ||
|
|
||
|
|
@@ -58,6 +60,7 @@ SimpleTraits = "0.9.4" | |
| SparseArrays = "<0.0.1, 1.10" | ||
| StaticArrays = "0.12, 1.0" | ||
| Strided = "1.1, 2" | ||
| TensorOperations = "5.1.4" | ||
| TimerOutputs = "0.5.5" | ||
| TupleTools = "1.2" | ||
| VectorInterface = "0.4, 0.5" | ||
|
|
@@ -68,5 +71,6 @@ julia = "1.10" | |
| [extras] | ||
| ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" | ||
| HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" | ||
| TensorOperations = "6aa20fa7-93e2-5fca-9bc0-fbd0db3c71a2" | ||
| VectorInterface = "409d34a3-91d5-4945-b6ec-7529ddf182d8" | ||
| ZygoteRules = "700de1a5-db45-46bc-99cf-38207098b444" | ||
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
16 changes: 16 additions & 0 deletions
16
ext/ITensorsTensorOperationsExt/ITensorsTensorOperationsExt.jl
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 @@ | ||
| module ITensorsTensorOperationsExt | ||
|
|
||
| using ITensors: ITensors, ITensor, dim, inds | ||
| using NDTensors.AlgorithmSelection: @Algorithm_str | ||
| using TensorOperations: TensorOperations, optimaltree | ||
|
|
||
| function ITensors.optimal_contraction_sequence( | ||
| As::Union{Vector{<:ITensor},Tuple{Vararg{ITensor}}} | ||
| ) | ||
| network = collect.(inds.(As)) | ||
| inds_to_dims = Dict(i => Float64(dim(i)) for i in unique(reduce(vcat, network))) | ||
| seq, _ = optimaltree(network, inds_to_dims) | ||
| return seq | ||
| end | ||
|
|
||
| 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
42 changes: 0 additions & 42 deletions
42
src/lib/ContractionSequenceOptimization/src/ContractionSequenceOptimization.jl
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.