cotengra


Namecotengra JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://github.com/jcmgray/cotengra
SummaryHyper optimized contraction trees for large tensor networks and einsums.
upload_time2024-04-10 21:39:00
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/45/ce/9239a7efe1c8afe35411551a403f6f6af8685a25dc9cb8b66475757f1582/cotengra-0.6.0.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.0",
    "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": "99429548f9c1e2f2188caddd2cb5f1c9614d16b0036ec77900a03108a288acf4",
                "md5": "d0ab0e29ca54cc2022ada1b659a06c71",
                "sha256": "39b564cecc71b4b54b555854aacb06c32c74555dbcfb4c102634130709b043a0"
            },
            "downloads": -1,
            "filename": "cotengra-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d0ab0e29ca54cc2022ada1b659a06c71",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 171850,
            "upload_time": "2024-04-10T21:38:57",
            "upload_time_iso_8601": "2024-04-10T21:38:57.044945Z",
            "url": "https://files.pythonhosted.org/packages/99/42/9548f9c1e2f2188caddd2cb5f1c9614d16b0036ec77900a03108a288acf4/cotengra-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "45ce9239a7efe1c8afe35411551a403f6f6af8685a25dc9cb8b66475757f1582",
                "md5": "934298558a9565ac8b25f719e23682f4",
                "sha256": "dbd2d682d5eb40177246e8646dbabf0235650ca11f4986967b6ea9ee63549273"
            },
            "downloads": -1,
            "filename": "cotengra-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "934298558a9565ac8b25f719e23682f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 3322113,
            "upload_time": "2024-04-10T21:39:00",
            "upload_time_iso_8601": "2024-04-10T21:39:00.010289Z",
            "url": "https://files.pythonhosted.org/packages/45/ce/9239a7efe1c8afe35411551a403f6f6af8685a25dc9cb8b66475757f1582/cotengra-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-10 21:39:00",
    "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.22266s