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 diff --git a/src/schemes/trg.jl b/src/schemes/trg.jl index ed1cbaa..099d0e7 100644 --- a/src/schemes/trg.jl +++ b/src/schemes/trg.jl @@ -17,17 +17,12 @@ function step!(scheme::TRG, trunc::TensorKit.TruncationScheme) U, S, V, _ = tsvd(scheme.T, ((1, 4), (2, 3)); trunc=trunc) - # Flip legs to their original domain (to mitigate space mismatch at the end) - U = permute(U, ((1,), (2, 3))) - V = permute(V, ((1, 2), (3,))) - @plansor begin - C[-1; -2 -3] := U[-1; -2 1] * sqrt(S)[1; -3] - D[-1 -2; -3] := sqrt(S)[-1; 1] * V[1 -2; -3] + C[-1 -2; -3] := U[-1 -2; 1] * sqrt(S)[1; -3] + D[-1; -2 -3] := sqrt(S)[-1; 1] * V[1; -2 -3] end - # @plansor complains here, not sure why - @tensor scheme.T[-1 -2; -3 -4] := D[-1 1; 4] * B[-2; 3 1] * C[3; 2 -3] * A[4 2; -4] + @tensor scheme.T[-1 -2; -3 -4] := D[-1; 1 4] * B[-2; 3 1] * C[3 2; -3] * A[4 2; -4] return scheme end