TensorOperations.jl

Julia package for tensor contractions and related operations

https://github.com/QuantumKitHub/TensorOperations.jl

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

einstein-summation index-notation tensor tensor-contraction tensor-operations tensor-permutation tensor-trace tensor-transposition
Last synced: 6 months ago · JSON representation ·

Repository

Julia package for tensor contractions and related operations

Basic Info
Statistics
  • Stars: 536
  • Watchers: 20
  • Forks: 62
  • Open Issues: 22
  • Releases: 52
Topics
einstein-summation index-notation tensor tensor-contraction tensor-operations tensor-permutation tensor-trace tensor-transposition
Created almost 12 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

TensorOperations.jl logo

TensorOperations.jl

Fast tensor operations using a convenient Einstein index notation.

| Documentation | Digital Object Identifier | Downloads | |:-----------------:|:-----------------------------:|:-------------:| | | DOI | TensorOperations Downloads |

| Build Status | PkgEval | Coverage | Quality assurance | |:----------------:|:------------:|:------------:|:---------------------:| | CI | PkgEval | Codecov | Aqua QA |

What's new in v5

  • Support for cuTENSOR v2 and with that more recent versions of CUDA.jl.

  • Improved support for automatic differentiation using reverse-mode rules with ChainRulesCore.jl.

  • Improved and extended support for backends and allocation strategies, with in particular support for allocating temporary objects using Bumper.jl.

  • Breaking changes to part of the interface to make it more sustainable for future improvements and extensions.

What's new in v4

  • The @tensor macro now accepts keyword arguments to facilitate a variety of options that help with debugging, contraction cost and backend selection.

  • Experimental support for automatic differentiation has been added by adding reverse-mode chainrules.

  • The interface for custom types has been changed and thoroughly documented, making it easier to know what to implement. This has as a consequence that more general element types of tensors are now also possible.

  • There is a new interface to work with backends, to allow for dynamic switching between different implementations of the primitive tensor operations or between different strategies for allocating new tensor objects.

  • The support for CuArray objects is moved to a package extension, to avoid unnecessary CUDA dependencies for Julia versions >= 1.9

  • The cache for temporaries has been removed due to its inconsistent and intricate interplay with multithreading. However, the new feature of specifying custom allocation strategies can be used to experiment with novel cache-like behaviour in the future.

WARNING: TensorOperations 4.0 contains several breaking changes and cannot generally be expected to be compatible with previous versions.

Code example

TensorOperations.jl is mostly used through the @tensor macro which allows one to express a given operation in terms of index notation format, a.k.a. Einstein notation (using Einstein's summation convention).

julia using TensorOperations α = randn() A = randn(5, 5, 5, 5, 5, 5) B = randn(5, 5, 5) C = randn(5, 5, 5) D = zeros(5, 5, 5) @tensor begin D[a, b, c] = A[a, e, f, c, f, g] * B[g, b, e] + α * C[c, a, b] E[a, b, c] := A[a, e, f, c, f, g] * B[g, b, e] + α * C[c, a, b] end

In the second to last line, the result of the operation will be stored in the preallocated array D, whereas the last line uses a different assignment operator := in order to define and allocate a new array E of the correct size. The contents of D and E will be equal.

For more detailed information, please see the documentation.

Citing

See CITATION.bib for the relevant reference(s).

Owner

  • Name: QuantumKitHub
  • Login: QuantumKitHub
  • Kind: organization

Citation (CITATION.bib)

@software{TensorOperations.jl,
	author  = {Lukas Devos <lukas.devos@ugent.be>, Maarten Van Damme <maartenvd1994@gmail.com>, Jutho Haegeman <jutho.haegeman@ugent.be> and contributors},
	title   = {TensorOperations.jl},
	url     = {https://github.com/Jutho/TensorOperations.jl},
	version = {v4.0.7},
	doi		= {10.5281/zenodo.3245496},
	year    = {2023},
	month   = {10}
}

GitHub Events

Total
  • Watch event: 3
  • Issue comment event: 2
  • Push event: 2
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 3
Last Year
  • Watch event: 3
  • Issue comment event: 2
  • Push event: 2
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 3

Dependencies

.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/ci.yml actions
  • actions/checkout v2 composite
  • codecov/codecov-action v1 composite
  • julia-actions/julia-buildpkg latest composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest latest composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/Documentation.yml actions
  • actions/checkout v4 composite
  • julia-actions/setup-julia latest composite
.github/workflows/FormatCheck.yml actions
  • actions/checkout v4 composite
  • julia-actions/setup-julia latest composite