Metadata-Version: 2.1
Name: einsum_benchmark
Version: 0.1.3
Summary: Wrapper package for the einsum benchmark dataset and code to create new instances of the various types used in the benchmark
Author-Email: Christoph Staudt <christoph.staudt@uni-jena.de>, Mark Blacher <mark.blacher@uni-jena.de>, Maurice Wenig <maurice.wenig@uni-jena.de>, Niklas Merk <niklas.merk@uni-jena.de>
License: MIT
Requires-Python: >=3.10
Requires-Dist: numpy>=1.26.4
Requires-Dist: opt-einsum>=3.3.0
Requires-Dist: pooch>=1.8.1
Requires-Dist: pandas>=2.2.2; extra == "util"
Requires-Dist: openpyxl>=3.1.3; extra == "util"
Requires-Dist: networkx>=3.3; extra == "generators"
Requires-Dist: quimb>=1.8.1; extra == "generators"
Requires-Dist: cgreedy>=0.0.2; extra == "path"
Requires-Dist: kahypar>=1.3.5; extra == "path"
Requires-Dist: optuna>=3.6.1; extra == "path"
Provides-Extra: util
Provides-Extra: generators
Provides-Extra: path
Description-Content-Type: text/markdown

# Einsum Benchmark Data

Benchmark data repository accompanying the paper: "Einsum Benchmark: Enabling the Development of Next-Generation Tensor Execution Engines". It includes a package to easily work with the benmark data and all methods we used to convert and create our instances so you can create new ones yourself.

## Installation

Install our base package, you will need at least python 3.10:

```bash
pip install einsum_benchmark
```

## Basic Usage

Now you can load and run an instance like this:

```python
import opt_einsum as oe
import einsum_benchmark

instance = einsum_benchmark.instances["qc_circuit_n49_m14_s9_e6_pEFGH_simplified"]

opt_size_path_meta = instance.paths.opt_size
print("Size optimized path")
print("log10[FLOPS]:", round(opt_size_path_meta.flops, 2))
print("log2[SIZE]:", round(opt_size_path_meta.size, 2))
result = oe.contract(
    instance.format_string, *instance.tensors, optimize=opt_size_path_meta.path
)
print("sum[OUTPUT]:", result.sum(), instance.result_sum)
```

For more information please read our [docs](https://benchmark.einsum.org/docs/guides/getting-started/).
