From fbffcd3399afd154f2524265dbdbb265120301d3 Mon Sep 17 00:00:00 2001 From: victor Date: Fri, 14 Feb 2025 17:23:41 +0100 Subject: [PATCH] implement the optimal contraction ordering for `BTRG` --- src/schemes/btrg.jl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/schemes/btrg.jl b/src/schemes/btrg.jl index a633e48..1e1c46f 100644 --- a/src/schemes/btrg.jl +++ b/src/schemes/btrg.jl @@ -54,11 +54,13 @@ function step!(scheme::BTRG, trunc::TensorKit.TruncationScheme) S1 = scheme.S1 S2 = scheme.S2 - @tensor opt = true scheme.T[-1 -2; -3 -4] := D[-1 1; 8] * S1[2; 1] * B[-2; 3 2] * - S2[3; 4] * - C[4; 5 -3] * - S1[5; 6] * A[7 6; -4] * S2[8; 7] - + @tensor scheme.T[-1 -2; -3 -4] := D[-1 7; 4] * + S1[1; 7] * + B[-2; 3 1] * + S2[3; 2] * + C[2; 8 -3] * + S1[8; 5] * + A[6 5; -4] * S2[4; 6] scheme.S1 = S1′ scheme.S2 = S2′ return scheme