Expand description
Tensor storage library
Provides backend-agnostic data structures for tensor storage and
the user-facing Tensor<St, L> type that joins them. The tensor
carries no backend; operations take it explicitly at the call site.
Structs§
- Block
Coord - N-dimensional block coordinate.
- Block
Meta - Metadata for a single block within a block-sparse tensor.
- Block
Sparse Layout - Interpretation half of the block-sparse tensor split.
- Block
Sparse Storage - Pure-data half of the block-sparse tensor split.
- Complex
- A complex number in Cartesian form.
- Contraction
Plan - Contraction plan identifying batch, contracted, and free indices for a 2-input einsum.
- Dense
Layout - Interpretation half of the dense tensor split.
- Dense
Storage - Pure-data half of the dense tensor split.
- Einsum
Expr - Parsed einsum expression with N inputs (indices as ASCII codes)
- Native
Backend - Native backend using faer for GEMM and, with the
hpttfeature, HPTT for transpose (a naive kernel otherwise). - QNIndex
- Quantum-number index for one tensor leg.
- Tensor
- Tensor wrapping a
TensorDatabundle. - Tensor
Data - Joined storage + layout bundle.
- U1Sector
- U(1) symmetry sector (integer charge).
- Z2Sector
- Z₂ symmetry sector (values 0 or 1).
Enums§
- Contraction
Error - Error raised while parsing or validating an Einstein-notation contraction.
- Direction
- Leg direction for flux computation (see each variant).
- Memory
Order - Memory layout order for tensor data.
- Tensor
Error - Errors raised by tensor construction and manipulation.
Traits§
- Compute
Backend - Pluggable compute backend trait
- Compute
Backend Tensor Ext - Extension trait for backend-aware tensor construction.
- OpsFor
- Compile-time marker: backend
Selfsupports operations on storage flavorSt. Implemented selectively per (backend, storage) pair, so a backend that cannot operate on a given storage simply omits the impl. - Scalar
- Scalar type for tensor elements (sealed trait).
- Sector
- Abelian symmetry sector.
- Storage
- Pure-data tensor element container.
- Storage
For - Compatibility marker between a
Storageand aTensorLayout. - Tensor
Layout - Interpretation metadata for a paired
Storagebuffer.
Functions§
- add_all
- Sum of dense tensors (all coefficients = 1).
- compute_
permutation - Compute permutation from current to target order
- flat_
index - Compute flat index for given coordinates in the specified memory order.
- linear_
combine - Linear combination of dense tensors:
Σ_i coefs[i] * tensors[i]. - normalize_
to_ data - Normalize a
DenseTensorData<T>’s memory order totarget, withCow::Borrowedwhen the tensor is already in the target order. - reorder_
data - Reorder a
DenseTensorData<T>to the requested memory layout.
Type Aliases§
- Block
Sparse Tensor - BlockSparse tensor alias.
- Block
Sparse Tensor Data - Backend-less BlockSparse tensor bundle =
TensorData<BlockSparseStorage<T>, BlockSparseLayout<S>>. - Dense
Tensor - Dense tensor alias.
- Dense
Tensor Data - Backend-less Dense tensor bundle =
TensorData<DenseStorage<T>, DenseLayout>. - Host
- The default host compute substrate, aliased so signatures name it through one stable alias rather than spelling the concrete backend type; repointing the substrate is then a one-line change.