Changelog
All notable changes to omeco are documented here.
The format follows Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
Added
- Comprehensive mdBook documentation following tropical-gemm standard
- Pretty printing for Python
NestedEinsumwith ASCII tree visualization - PyTorch integration guide and examples
- GPU optimization guide with
rw_weightconfiguration - Slicing strategy guide for memory-constrained environments
- Troubleshooting guide with common issues and solutions
- API reference for Python and Rust APIs
- Performance benchmarks comparing Rust vs Julia
- Algorithm comparison guide (Greedy vs TreeSA)
Changed
- Migrated documentation from scattered markdown files to structured mdBook
- Improved Python bindings with better
__str__and__repr__methods
Deprecated
- Legacy
docs/score_function_guide.md(migrated to mdBook)
[0.2.1] - 2024-01-XX
Fixed
- Issue #6: Hyperedge index preservation in contraction operations (PR #7)
- Fixed
contract_tree!macro to correctly preserve tensor indices during contraction - Added regression tests to verify hyperedge handling
- Ensures contraction order matches input tensor order specified in
ixs
- Fixed
Added
- Test suite for hyperedge index preservation
- CI improvements for better test coverage
[0.2.0] - 2024-01-XX
Added
- TreeSA (Tree-based Simulated Annealing) optimizer
TreeSA.fast()preset for quick high-quality optimization- Slicing support with
TreeSASlicerfor memory reduction ScoreFunctionfor configurable optimization objectivescontraction_complexityandsliced_complexityfunctions- Python bindings via PyO3
optimize_codegeneric function accepting optimizer instances- Read-write complexity (rwc) metric for GPU optimization
Changed
- Improved API ergonomics with preset methods
- Better default parameters for optimizers
Performance
- 1.4-1.5x faster than Julia OMEinsumContractionOrders.jl on benchmarks
- Efficient TreeSA implementation with better exploration
[0.1.0] - 2023-XX-XX
Added
- Initial release
- GreedyMethod optimizer
- Basic contraction order optimization
- Support for tensor networks with arbitrary indices
- Complexity calculation (time and space)
- Rust core library
- Basic documentation
Features
- Greedy algorithm with configurable parameters
- Stochastic variants for improved solutions
- Efficient index handling with generic types
- HashMap-based dimension tracking
Version Numbering
omeco follows Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for new functionality in a backward compatible manner
- PATCH version for backward compatible bug fixes
Release Process
- Update version in
Cargo.tomlfiles - Update
CHANGELOG.mdwith release notes - Tag release:
git tag v0.X.Y - Push tags:
git push --tags - Publish to crates.io:
cargo publish - Publish to PyPI:
maturin publish(Python bindings)
Links
Contributing
See CONTRIBUTING.md for guidelines on contributing to omeco.
Migration Guides
Migrating from 0.1.x to 0.2.x
Major Changes:
-
New
optimize_codefunction: Unified API for all optimizers# Old (0.1.x) tree = optimize_greedy(ixs, out, sizes) tree = optimize_treesa(ixs, out, sizes) # New (0.2.x) - unified interface from omeco import optimize_code, GreedyMethod, TreeSA tree = optimize_code(ixs, out, sizes) # Uses GreedyMethod by default tree = optimize_code(ixs, out, sizes, TreeSA.fast()) -
ScoreFunction configuration:
# New in 0.2.x from omeco import ScoreFunction, TreeSA score = ScoreFunction(tc_weight=1.0, sc_weight=1.0, rw_weight=10.0, sc_target=30.0) tree = optimize_code(ixs, out, sizes, TreeSA(score=score)) -
Slicing support:
# New in 0.2.x from omeco import slice_code, TreeSASlicer sliced = slice_code(tree, ixs, sizes, TreeSASlicer.fast())
Breaking Changes:
- Removed
optimize_greedy()andoptimize_treesa()from Python exports - Use
optimize_code(...)instead withGreedyMethod()orTreeSA()optimizers - Rust API unchanged
Migrating from Julia OMEinsumContractionOrders.jl
Index Differences:
- Julia: 1-based indexing
- Rust/Python: 0-based indexing (or use arbitrary hashable types)
# Julia
ixs = [[1, 2], [2, 3], [3, 1]]
sizes = Dict(1 => 10, 2 => 20, 3 => 10)
# Python (0-based)
ixs = [[0, 1], [1, 2], [2, 0]]
sizes = {0: 10, 1: 20, 2: 10}
Function Names:
| Julia | omeco (Python/Rust) |
|---|---|
optimize_greedy | optimize_code(..., GreedyMethod()) |
optimize_treesa | optimize_code(..., TreeSA.fast()) |
contraction_complexity | contraction_complexity |
slicing | slice_code |
API Compatibility: Most functions have similar signatures and behavior.