cotengra


Namecotengra JSON
Version 0.6.1 PyPI version JSON
download
home_pagehttps://github.com/jcmgray/cotengra
SummaryHyper optimized contraction trees for large tensor networks and einsums.
upload_time2024-05-15 21:38:21
maintainerNone
docs_urlNone
authorJohnnie Gray
requires_python>=3.8
licenseApache
keywords tensor network contraction graph hypergraph partition einsum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="left"><img src="https://imgur.com/OM5XyaD.png" alt="cotengra" width="400px"></p>

[![tests](https://github.com/jcmgray/cotengra/actions/workflows/test.yml/badge.svg)](https://github.com/jcmgray/cotengra/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/jcmgray/cotengra/branch/main/graph/badge.svg?token=Q5evNiuT9S)](https://codecov.io/gh/jcmgray/cotengra)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/84f825f5a7044762be62600c0650473d)](https://app.codacy.com/gh/jcmgray/cotengra/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Docs](https://readthedocs.org/projects/cotengra/badge/?version=latest)](https://cotengra.readthedocs.io)
[![PyPI](https://img.shields.io/pypi/v/cotengra?color=teal)](https://pypi.org/project/cotengra/)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/cotengra/badges/version.svg)](https://anaconda.org/conda-forge/cotengra)

`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:

* drop-in ``einsum`` replacement
* 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 [`cotengra`](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>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jcmgray/cotengra",
    "name": "cotengra",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "tensor network contraction graph hypergraph partition einsum",
    "author": "Johnnie Gray",
    "author_email": "johnniemcgray@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ef/f8/29057fe6fec60b0aef78de8f1f426a84d485edf71be63c1bab50d3b54ef3/cotengra-0.6.1.tar.gz",
    "platform": null,
    "description": "<p align=\"left\"><img src=\"https://imgur.com/OM5XyaD.png\" alt=\"cotengra\" width=\"400px\"></p>\n\n[![tests](https://github.com/jcmgray/cotengra/actions/workflows/test.yml/badge.svg)](https://github.com/jcmgray/cotengra/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/jcmgray/cotengra/branch/main/graph/badge.svg?token=Q5evNiuT9S)](https://codecov.io/gh/jcmgray/cotengra)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/84f825f5a7044762be62600c0650473d)](https://app.codacy.com/gh/jcmgray/cotengra/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)\n[![Docs](https://readthedocs.org/projects/cotengra/badge/?version=latest)](https://cotengra.readthedocs.io)\n[![PyPI](https://img.shields.io/pypi/v/cotengra?color=teal)](https://pypi.org/project/cotengra/)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/cotengra/badges/version.svg)](https://anaconda.org/conda-forge/cotengra)\n\n`cotengra` is a python library for contracting tensor networks or einsum\nexpressions involving large numbers of tensors - the main docs can be found\nat [cotengra.readthedocs.io](https://cotengra.readthedocs.io/).\nSome of the key feautures of `cotengra` include:\n\n* drop-in ``einsum`` replacement\n* an explicit **contraction tree** object that can be flexibly built, modified and visualized\n* a **'hyper optimizer'** that samples trees while tuning the generating meta-paremeters\n* **dynamic slicing** for massive memory savings and parallelism\n* support for **hyper** edge tensor networks and thus arbitrary einsum equations\n* **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\n* **performing contractions** with tensors from many libraries via [`cotengra`](https://github.com/jcmgray/autoray),\n  even if they don't provide `einsum` or `tensordot` but do have (batch) matrix\n  multiplication\n\n<p align=\"center\"><img src=\"https://imgur.com/jMO138y.png\" alt=\"cotengra\" width=\"500px\"></p>\n",
    "bugtrack_url": null,
    "license": "Apache",
    "summary": "Hyper optimized contraction trees for large tensor networks and einsums.",
    "version": "0.6.1",
    "project_urls": {
        "Bug Reports": "https://github.com/jcmgray/cotengra/issues",
        "Homepage": "https://github.com/jcmgray/cotengra",
        "Source": "https://github.com/jcmgray/cotengra/"
    },
    "split_keywords": [
        "tensor",
        "network",
        "contraction",
        "graph",
        "hypergraph",
        "partition",
        "einsum"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "095fb32d69ec4fe03286256be513fa8165829fe8474f90da3705df9adce6eb80",
                "md5": "e38e3a31657cfc32cc6bd36a53bde625",
                "sha256": "e8a0e266eea656a261bb46f6b844debbc5780597ad71e9e0f3a78b8f58c72112"
            },
            "downloads": -1,
            "filename": "cotengra-0.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e38e3a31657cfc32cc6bd36a53bde625",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 177660,
            "upload_time": "2024-05-15T21:38:19",
            "upload_time_iso_8601": "2024-05-15T21:38:19.287829Z",
            "url": "https://files.pythonhosted.org/packages/09/5f/b32d69ec4fe03286256be513fa8165829fe8474f90da3705df9adce6eb80/cotengra-0.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eff829057fe6fec60b0aef78de8f1f426a84d485edf71be63c1bab50d3b54ef3",
                "md5": "05094b45f79b1aa5a27e2be38fb8fc90",
                "sha256": "69364e1c6d9e100b245f6250af2fc8ddd71899de786f94c7bafcf0a32ecf895d"
            },
            "downloads": -1,
            "filename": "cotengra-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "05094b45f79b1aa5a27e2be38fb8fc90",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3325862,
            "upload_time": "2024-05-15T21:38:21",
            "upload_time_iso_8601": "2024-05-15T21:38:21.197417Z",
            "url": "https://files.pythonhosted.org/packages/ef/f8/29057fe6fec60b0aef78de8f1f426a84d485edf71be63c1bab50d3b54ef3/cotengra-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-15 21:38:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jcmgray",
    "github_project": "cotengra",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cotengra"
}
        
Elapsed time: 0.28167s