pub fn contract_zipup<T: SVDScalar>(
mpo_a: &MPO<T>,
mpo_b: &MPO<T>,
options: &ContractionOptions,
) -> Result<MPO<T>>Expand description
Perform zip-up contraction of two MPOs
This computes C = A * B where the contraction is over the shared physical index (s2 of A contracts with s1 of B), with on-the-fly compression at each step.
The zip-up algorithm:
- Start from the left with a remainder tensor R = [[1]]
- At each site: a. Contract R with A[i] and B[i] b. Reshape to matrix c. Factorize into left and right factors d. Store left factor as result tensor e. Use right factor as new remainder R
- At the last site, just store the contracted tensor
§Arguments
mpo_a- First MPOmpo_b- Second MPOoptions- Contraction options (tolerance, max_bond_dim, method)
§Returns
The contracted and compressed MPO C