-
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
[ITensors] Call out to TensorOperations.jl for optimal sequence finding #1637
Conversation
|
Can you update the docs (https://github.com/ITensor/ITensors.jl/blob/main/docs/src/ContractionSequenceOptimization.md) as well? |
|
I updated the docs. I also updated the version to |
I think we should update to v0.9, since it is technically a breaking change. Could you add a NEWS item about that here: https://github.com/ITensor/ITensors.jl/blob/main/README.md#news? |
Co-authored-by: Matt Fishman <[email protected]>
|
Sure, I went to |
It's a bit annoying, but when we make breaking releases we also have to bump that compat entry in docs/Project.toml: Line 11 in c10e4e4
|
|
Huh not sure what's going on with the docs... Maybe it is better to just remove the compat entry for ITensors from docs/Project.toml for now and we can look into that later. |
|
Hmm, the docs build is erroring saying it can't find the docstring for |
|
I see, maybe the issue is that the docstring is defined in the package extension, probably it should be defined on the version of the function in src/tensor_operations/tensor_algebra.jl. |
Co-authored-by: Matt Fishman <[email protected]>
|
Looks good, thanks @JoeyT1994! |
Description
This PR removes the internal
optimal_contraction_sequence(As)functions inITensors.jland outsources to theoptimal treefunction fromTensorOperations.jl. Thereforeoptimal_contraction_sequencerequiresTensorOperationsto be loaded, which is now a weak dependency ofITensors.jl.Contraction sequence finding is now much faster, with orders of magnitude speedups manifesting for even relatively small vectors of
Tensors.How Has This Been Tested?
The tests from
test/lib//ContractionSequenceOptimization/test_itensor_contract.jlhave moved totest/ext/ITensorsTensorOperationsExt/runtests.jland reflect the changes made to theoptimal_contraction_sequencefunction.