use crate::types::causal_tensor_network::causal_tensor_train::CausalTensorTrain;
use crate::types::causal_tensor_network::truncation::Truncation;
use crate::{CausalTensor, CausalTensorError};
use deep_causality_algebra::ConjugateScalar;
pub trait TensorTrainOperator<T: ConjugateScalar>: Sized {
fn apply(
&self,
state: &CausalTensorTrain<T>,
trunc: &Truncation<<T as ConjugateScalar>::Real>,
) -> Result<CausalTensorTrain<T>, CausalTensorError>;
fn compose(
&self,
other: &Self,
trunc: &Truncation<<T as ConjugateScalar>::Real>,
) -> Result<Self, CausalTensorError>;
fn round(
&self,
trunc: &Truncation<<T as ConjugateScalar>::Real>,
) -> Result<Self, CausalTensorError>;
fn transpose(&self) -> Self;
fn to_dense(&self) -> Result<CausalTensor<T>, CausalTensorError>;
}