tensor4all_simplett/mpo/tt_contraction.rs
1//! Contraction operations for tensor trains (TT-TT)
2//!
3//! This module re-exports TT contraction operations from `tensor4all-simplett`.
4//! These operations are conceptually MPO-MPO contractions where the MPO
5//! has trivial (dimension 1) "operator" indices.
6//!
7//! # Available operations
8//!
9//! - [`dot`]: Inner product (returns scalar)
10//!
11//! # Example
12//!
13//! ```
14//! use tensor4all_simplett::mpo::tt_contraction::{dot, TensorTrain};
15//!
16//! let tt1 = TensorTrain::<f64>::constant(&[2, 3], 2.0);
17//! let tt2 = TensorTrain::<f64>::constant(&[2, 3], 3.0);
18//!
19//! // Inner product
20//! let inner = dot(&tt1, &tt2).unwrap();
21//! assert_eq!(inner, 36.0);
22//! ```
23
24// Re-export TT contraction types and functions from tensor4all-simplett
25pub use crate::contraction::{dot, ContractionOptions};
26
27// Also re-export TensorTrain for convenience
28pub use crate::TensorTrain;