Support OMEinsumContractionOrders optimizers in contract_network#146
Merged
Conversation
Enables OMEinsumContractionOrders optimizers (`TreeSA`, `GreedyMethod`, `KaHyParBipartite`, ...) to be passed as the contraction-order algorithm to `contract_network`. The `Exact` order-algorithm dispatch now forwards any optimizer that operates on the flattened product to `optimize_evaluation_order`, so ITensorBase's `Greedy`/`Optimal` and any OMEinsumContractionOrders optimizer all work. Builds on the extension added in ITensor/ITensorBase.jl#209.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
==========================================
+ Coverage 84.80% 84.89% +0.09%
==========================================
Files 14 15 +1
Lines 658 662 +4
==========================================
+ Hits 558 562 +4
Misses 100 100
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Move the `contraction_order` dispatch for OMEinsumContractionOrders' `CodeOptimizer` into a new package extension, keeping the core `contraction_order` method restricted to `EvaluationOrderAlgorithm`. Both share the same flattened-product optimization path.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Enables OMEinsumContractionOrders optimizers (
TreeSA,GreedyMethod,KaHyParBipartite, ...) to be used as the contraction-order algorithm incontract_network. A package extension adds acontraction_ordermethod for OMEinsumContractionOrders'CodeOptimizer, reusing the same flattened-product optimization path as the built-inGreedy/Optimal. Builds on the extension added in ITensor/ITensorBase.jl#209.