Expand description
Operator composition for Tree Tensor Networks.
This module provides traits and functions for working with operators on TreeTN states, including composing multiple non-overlapping operators into a single operator.
§Key Types
Operator: Trait for objects that can act as operators on tensor network statesLinearOperator: MPO wrapper with index mapping for automatic transformationsIndexMapping: Mapping between true site indices and internal MPO indicescompose_exclusive_linear_operators: Compose non-overlapping LinearOperators into a single operator
§Example
use tensor4all_core::{DynIndex, IndexLike};
use tensor4all_treetn::{apply_linear_operator, compose_exclusive_linear_operators, IndexMapping};
let mapping = IndexMapping {
true_index: DynIndex::new_dyn(2),
internal_index: DynIndex::new_dyn(2),
};
assert_eq!(mapping.true_index.dim(), mapping.internal_index.dim());
let _apply = apply_linear_operator::<tensor4all_core::TensorDynLen, usize>;
let _compose = compose_exclusive_linear_operators::<tensor4all_core::TensorDynLen, usize>;Structs§
- Apply
Options - Options for
apply_linear_operator. - ArcLinear
Operator - LinearOperator with Arc-based Copy-on-Write semantics.
- Index
Mapping - Mapping between true site indices and internal MPO indices.
- Linear
Operator - LinearOperator: Wraps an MPO with index mapping for automatic transformations.
Traits§
- Operator
- Trait for operators that can act on tensor network states.
Functions§
- apply_
linear_ operator - Apply a LinearOperator to a TreeTN state: compute
A|x⟩. - are_
exclusive_ operators - Check if a set of operators are exclusive (non-overlapping) on the target network.
- build_
identity_ operator_ tensor - Build an identity operator tensor for a gap node.
- compose_
exclusive_ linear_ operators - Compose exclusive LinearOperators into a single LinearOperator.