Skip to main content

Crate ariadnetor_tensor

Crate ariadnetor_tensor 

Source
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§

BlockCoord
N-dimensional block coordinate.
BlockMeta
Metadata for a single block within a block-sparse tensor.
BlockSparseLayout
Interpretation half of the block-sparse tensor split.
BlockSparseStorage
Pure-data half of the block-sparse tensor split.
Complex
A complex number in Cartesian form.
ContractionPlan
Contraction plan identifying batch, contracted, and free indices for a 2-input einsum.
DenseLayout
Interpretation half of the dense tensor split.
DenseStorage
Pure-data half of the dense tensor split.
EinsumExpr
Parsed einsum expression with N inputs (indices as ASCII codes)
NativeBackend
Native backend using faer for GEMM and, with the hptt feature, HPTT for transpose (a naive kernel otherwise).
QNIndex
Quantum-number index for one tensor leg.
Tensor
Tensor wrapping a TensorData bundle.
TensorData
Joined storage + layout bundle.
U1Sector
U(1) symmetry sector (integer charge).
Z2Sector
Z₂ symmetry sector (values 0 or 1).

Enums§

ContractionError
Error raised while parsing or validating an Einstein-notation contraction.
Direction
Leg direction for flux computation (see each variant).
MemoryOrder
Memory layout order for tensor data.
TensorError
Errors raised by tensor construction and manipulation.

Traits§

ComputeBackend
Pluggable compute backend trait
ComputeBackendTensorExt
Extension trait for backend-aware tensor construction.
OpsFor
Compile-time marker: backend Self supports operations on storage flavor St. 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.
StorageFor
Compatibility marker between a Storage and a TensorLayout.
TensorLayout
Interpretation metadata for a paired Storage buffer.

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 to target, with Cow::Borrowed when the tensor is already in the target order.
reorder_data
Reorder a DenseTensorData<T> to the requested memory layout.

Type Aliases§

BlockSparseTensor
BlockSparse tensor alias.
BlockSparseTensorData
Backend-less BlockSparse tensor bundle = TensorData<BlockSparseStorage<T>, BlockSparseLayout<S>>.
DenseTensor
Dense tensor alias.
DenseTensorData
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.