Skip to main content

Hyper optimized contraction trees for large tensor networks and einsums.

Project description

cotengra

tests codecov Docs PyPI Anaconda-Server Badge Pixi 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
  • simulated annealing as an alternative optimizing and slicing strategy
  • 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 autoray, 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.8.0.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cotengra-0.8.0-py3-none-any.whl (258.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cotengra-0.8.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cotengra-0.8.0.tar.gz
Algorithm Hash digest
SHA256 db07107bcd7ac880719d481b919d803c0051a49ba787734221e9bc30281151c6
MD5 0f2c0f9c525b601557ebc627f04ab923
BLAKE2b-256 4373cbdac3a5996d7806a47c6c3eaf86b0762cc571ef244c48c6480cf8009e05

See more details on using hashes here.

Provenance

The following attestation bundles were made for cotengra-0.8.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.8.0-py3-none-any.whl.

File metadata

  • Download URL: cotengra-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 258.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cotengra-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a66e61df93fea20dcab179b6c9404cfd89781ed87f0fd4581ca0b35aebb38e9d
MD5 967762407610891e3683265e7f8e4e4a
BLAKE2b-256 ff9b25769de0ecfc26ea1b66d52dc2a7ed261a47f9a30eaa29e7978c2b73095f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cotengra-0.8.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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page