Skip to main content

Hyper optimized contraction trees for large tensor networks and einsums.

Project description

cotengra

tests codecov Codacy Badge Docs PyPI Anaconda-Server Badge

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. Some of the key feautures of cotengra include:

  • drop-in einsum and ncon 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, opt_einsum, quimb among others
  • performing contractions with tensors from many libraries via cotengra, even if they don't provide einsum or tensordot but do have (batch) matrix multiplication

cotengra

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cotengra-0.7.0.tar.gz (2.8 MB view details)

Uploaded Source

Built Distribution

cotengra-0.7.0-py3-none-any.whl (189.8 kB view details)

Uploaded Python 3

File details

Details for the file cotengra-0.7.0.tar.gz.

File metadata

  • Download URL: cotengra-0.7.0.tar.gz
  • Upload date:
  • Size: 2.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for cotengra-0.7.0.tar.gz
Algorithm Hash digest
SHA256 8ad9fabee899ac2f7b72359ace79a5496f15fd89b19049656082ef7773ca2b69
MD5 873b2d13b324f4a9a4af26a306dfa84c
BLAKE2b-256 c9a6c8af5aae49b37d2468ae0069a2b7c94e6a9836448fec94385accc1963264

See more details on using hashes here.

Provenance

The following attestation bundles were made for cotengra-0.7.0.tar.gz:

Publisher: pypi-release.yml on jcmgray/cotengra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cotengra-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: cotengra-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 189.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for cotengra-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca1c75fec462fb75130a3a826db2d4565bbbf0641d5ce0a617e643211cd98307
MD5 04dd2755bfc9a7065183be6e6c26874a
BLAKE2b-256 10fbcfdd2fd83b3ed1d3dd9682e2c561c7ce9f4f625d03fe7ec5062077264882

See more details on using hashes here.

Provenance

The following attestation bundles were made for cotengra-0.7.0-py3-none-any.whl:

Publisher: pypi-release.yml on jcmgray/cotengra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page