Skip to content

Support OMEinsumContractionOrders optimizers in contract_network#146

Merged
mtfishman merged 4 commits into
mainfrom
mf/omeinsum-contraction-order
Jul 2, 2026
Merged

Support OMEinsumContractionOrders optimizers in contract_network#146
mtfishman merged 4 commits into
mainfrom
mf/omeinsum-contraction-order

Conversation

@mtfishman

@mtfishman mtfishman commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

Enables OMEinsumContractionOrders optimizers (TreeSA, GreedyMethod, KaHyParBipartite, ...) to be used as the contraction-order algorithm in contract_network. A package extension adds a contraction_order method for OMEinsumContractionOrders' CodeOptimizer, reusing the same flattened-product optimization path as the built-in Greedy/Optimal. Builds on the extension added in ITensor/ITensorBase.jl#209.

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

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.89%. Comparing base (a8454f6) to head (f5d112c).

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              
Flag Coverage Δ
docs 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

mtfishman added 3 commits July 2, 2026 18:44
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.
@mtfishman mtfishman changed the title [WIP] Support OMEinsumContractionOrders optimizers in contract_network Support OMEinsumContractionOrders optimizers in contract_network Jul 2, 2026
@mtfishman mtfishman marked this pull request as ready for review July 2, 2026 23:41
@mtfishman mtfishman enabled auto-merge (squash) July 2, 2026 23:42
@mtfishman mtfishman merged commit 49325bc into main Jul 2, 2026
25 of 28 checks passed
@mtfishman mtfishman deleted the mf/omeinsum-contraction-order branch July 2, 2026 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant