OMEinsumContractionOrders is a Julia package that provides an optimize_code function for finding optimal contraction orders for tensor networks. It is designed to work with multiple tensor network packages, such as: OMEinsum.jl package and ITensorNetworks.jl. A high-performance Rust port with Python bindings is available as OMECO.
On same-server benchmarks with matched 90 s budgets, contraction orders found by this package beat cotengra's hyper-optimizer on every tested instance — e.g. tc 39.22 vs 69.04 on the king graph (≈10⁹× fewer flops), 28.03 vs 41.15 on dbn_13, and 48.98 vs 54.03 on surface code d=21 (lower tc = fewer flops). The Rust port OMECO pushes these records further.
To install OMEinsumContractionOrders, please follow these steps:
- Open Julia's interactive session (known as REPL) by typing
juliain your terminal. - Press the ] key in the REPL to enter the package mode.
- Type
add OMEinsumContractionOrdersto install the stable release of the package.
For using, please check the documentation.
For a contributor guide, please refer to CLAUDE.md for details.
If you find this package useful in your research, please cite the relevant papers in CITATION.bib.