{"id":16977871,"url":"https://github.com/jcmgray/cotengra","last_synced_at":"2025-05-15T11:08:03.052Z","repository":{"id":55050603,"uuid":"167026547","full_name":"jcmgray/cotengra","owner":"jcmgray","description":"Hyper optimized contraction trees for large tensor networks and einsums","archived":false,"fork":false,"pushed_at":"2025-05-14T00:01:43.000Z","size":11843,"stargazers_count":204,"open_issues_count":10,"forks_count":33,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-14T01:57:25.348Z","etag":null,"topics":["contraction-order","einsum","opt-einsum","quimb","tensor","tensor-contraction","tensor-network","tensor-networks"],"latest_commit_sha":null,"homepage":"https://cotengra.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcmgray.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-01-22T16:22:26.000Z","updated_at":"2025-05-14T00:01:13.000Z","dependencies_parsed_at":"2023-11-15T23:28:14.750Z","dependency_job_id":"a3c278da-d63f-453e-bcb6-b5b4c937fd8f","html_url":"https://github.com/jcmgray/cotengra","commit_stats":{"total_commits":342,"total_committers":5,"mean_commits":68.4,"dds":0.0292397660818714,"last_synced_commit":"c63550d3d491198056fa2b2da678524f1406e21f"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fcotengra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fcotengra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fcotengra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fcotengra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcmgray","download_url":"https://codeload.github.com/jcmgray/cotengra/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249350,"owners_count":22039053,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contraction-order","einsum","opt-einsum","quimb","tensor","tensor-contraction","tensor-network","tensor-networks"],"created_at":"2024-10-14T01:30:00.099Z","updated_at":"2025-05-15T11:08:03.037Z","avatar_url":"https://github.com/jcmgray.png","language":"Python","readme":"\u003cp align=\"left\"\u003e\u003cimg src=\"https://imgur.com/OM5XyaD.png\" alt=\"cotengra\" width=\"400px\"\u003e\u003c/p\u003e\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\u0026utm_medium=referral\u0026utm_content=\u0026utm_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`` and ``ncon`` 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* **simulated annealing** as an alternative optimizing and slicing strategy\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 [`autoray`](https://github.com/jcmgray/autoray),\n  even if they don't provide `einsum` or `tensordot` but do have (batch) matrix\n  multiplication\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://imgur.com/jMO138y.png\" alt=\"cotengra\" width=\"500px\"\u003e\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcmgray%2Fcotengra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcmgray%2Fcotengra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcmgray%2Fcotengra/lists"}