Metadata-Version: 2.1
Name: cotengra
Version: 0.3.2
Summary: Hyper optimized contraction trees for large tensor networks and einsums.
Home-page: https://github.com/jcmgray/cotengra
Author: Johnnie Gray
Author-email: johnniemcgray@gmail.com
License: Apache
Project-URL: Bug Reports, https://github.com/jcmgray/cotengra/issues
Project-URL: Source, https://github.com/jcmgray/cotengra/
Keywords: tensor network contraction graph hypergraph partition einsum
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: autoray
Requires-Dist: cytoolz
Requires-Dist: optuna
Requires-Dist: tqdm
Provides-Extra: docs
Requires-Dist: furo ; extra == 'docs'
Requires-Dist: ipython !=8.7.0 ; extra == 'docs'
Requires-Dist: myst-nb ; extra == 'docs'
Requires-Dist: setuptools-scm ; extra == 'docs'
Requires-Dist: sphinx-autoapi ; extra == 'docs'
Requires-Dist: sphinx-copybutton ; extra == 'docs'
Requires-Dist: sphinx >=2.0 ; extra == 'docs'
Provides-Extra: recommended
Requires-Dist: kahypar ; extra == 'recommended'
Requires-Dist: networkx ; extra == 'recommended'
Requires-Dist: opt-einsum ; extra == 'recommended'
Requires-Dist: ray ; extra == 'recommended'
Provides-Extra: test
Requires-Dist: altair ; extra == 'test'
Requires-Dist: baytune ; extra == 'test'
Requires-Dist: chocolate ; extra == 'test'
Requires-Dist: dask ; extra == 'test'
Requires-Dist: distributed ; extra == 'test'
Requires-Dist: kahypar ; extra == 'test'
Requires-Dist: matplotlib ; extra == 'test'
Requires-Dist: networkx ; extra == 'test'
Requires-Dist: nevergrad ; extra == 'test'
Requires-Dist: numpy ; extra == 'test'
Requires-Dist: opt-einsum ; extra == 'test'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: seaborn ; extra == 'test'
Requires-Dist: skopt ; extra == 'test'

<p align="left"><img src="https://imgur.com/OM5XyaD.png" alt="cotengra" width="300px"></p>

`cotengra` is a python library for contracting tensor networks or einsum
expressions involving large numbers of tensors - the main docs can be found
at [cotengra.readthedocs.io](https://cotengra.readthedocs.io/).
Some of the key feautures of `cotengra` include:

* an explicit **contraction tree** object that can be flexibly built, modified and visualized
* a **'hyper optimizer'** that samples trees while tuning the generating meta-paremeters
* **dynamic slicing** for massive memory savings and parallelism
* support for **hyper** edge tensor networks and thus arbitrary einsum equations
* **paths** that can be supplied to [`numpy.einsum`](https://numpy.org/doc/stable/reference/generated/numpy.einsum.html), [`opt_einsum`](https://dgasmith.github.io/opt_einsum/), [`quimb`](https://quimb.readthedocs.io/en/latest/) among others
* **performing contractions** with tensors from many libraries via [`autoray`](https://github.com/jcmgray/autoray),
  even if they don't provide `einsum` or `tensordot` but do have (batch) matrix
  multiplication

<p align="center"><img src="https://imgur.com/jMO138y.png" alt="cotengra" width="500px"></p>
