Einsums’s documentation#

Version: 0.6.0

Useful links: Source Repository | Issue Tracker

Einsums provides compile-time contraction pattern analysis to determine optimal tensor operation to perform. Einsums is a package for scientific computing in C++. It is a C++ library that provides a multidimensional tensor object and an assortment of functions for fast operations on tensors, including mathematical, shape manipulation, sorting, I/O, discrete Fourier transforms, basic linear algebra, and tensor algebra.

As a short example, the following call to einsum will optimize at compile-time to a BLAS dgemm call:

using einsums;                        // Provides Tensor, create_tensor, and create_random_tensor
using einsums::tensor_algebra;        // Provides einsum and Indices
using einsums::tensor_algebra::index; // Provides i, j, k

Tensor<2> A = create_random_tensor("A", 7, 7);
Tensor<2> B = create_random_tensor("B", 7, 7);
Tensor<2> C = create_tensor("C", 7, 7);

einsum(Indices{i, j}, &C, Indices{i, k}, A, Indices{k, j}, B);

Getting Started

New to Einsums? Check out the Absolute Beginner’s Guide. It contains an introduction to Einsums’ main concepts and links to additional tutorials.

User Guide

The user guide provides in-depth information on the key concepts of Einsums with useful background information and explanation.

API Reference

The reference guide contains a detailed description of the functions, modules, and objects included in Einsums. The reference describes how the methods work and how to use the parameters. It assumes you have an understanding of key concepts.

Contributor’s Guide

Want to add to the codebase? The contributing guidelines will guide you through the process of improving Einsums.

Indices and tables#