Expand description
Multi-tensor contraction with optimal contraction order.
This module provides functions to contract multiple tensors efficiently using einsum optimization via the tensorbackend (tenferro-backed implementation).
This module works with concrete types (DynIndex, IdxTensor) only.
§Main Functions
contract: Contracts one connected tensor networkcontract_with_options: Contracts one connected tensor network with retained indices
§Structured Tensor Handling
Diagonal and structured tensors contract through their compact payload and equality metadata. Logical dense materialization is reserved for APIs that explicitly request dense values; contraction itself preserves compact representation whenever the result remains structured.
Structs§
- Contraction
Options - Options for multi-tensor contraction.
- Pairwise
Contraction Options - Options for pairwise tensor contraction.
Functions§
- contract
- Contract a connected tensor network with the default semantics.
- contract_
owned - Contract owned tensors with the default connected-network semantics.
- contract_
owned_ with_ options - Contract owned tensors with advanced connected-network options.
- contract_
pair - Contract two tensors with the default pairwise semantics.
- contract_
pair_ with_ operand_ options - Contract two tensors with operand-level conjugation options.
- contract_
pair_ with_ options - Contract two tensors with explicit contraction options.
- contract_
with_ options - Contract a connected tensor network with advanced options.
- outer_
product - Compute the outer product of two tensors.
- print_
and_ reset_ contract_ profile - Print and clear the aggregated multi-tensor contraction profile.
- reset_
contract_ profile - Reset the aggregated multi-tensor contraction profile.
- tensordot
- Contract two tensors along explicitly specified index pairs.