Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jun 3, 2024
1 parent 18b19b3 commit 15cb2c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/algorithms/changebonds/svdcut.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ function changebonds!(mpo::FiniteMPO, alg::SvdCut)
length(mpo) == 1 && return mpo

# left to right
O_left = transpose(mpo.opp[1], (3, 1, 2), (4,))
O_left = transpose(mpo.opp[1], ((3, 1, 2), (4,)))
local O_right
for i in 2:length(mpo)
U, S, V, = tsvd!(O_left; trunc=alg.trscheme, alg=TensorKit.SVD())
mpo.opp[i - 1] = transpose(U, (2, 3), (1, 4))
mpo.opp[i - 1] = transpose(U, ((2, 3), (1, 4)))
if i < length(mpo)
@plansor O_left[-3 -1 -2; -4] := S[-1; 1] * V[1; 2] * mpo.opp[i][2 -2; -3 -4]
else
Expand All @@ -51,7 +51,7 @@ function changebonds!(mpo::FiniteMPO, alg::SvdCut)
# right to left
for i in (length(mpo) - 1):-1:1
U, S, V, = tsvd!(O_right; trunc=alg.trscheme, alg=TensorKit.SVD())
mpo.opp[i + 1] = transpose(V, (1, 4), (2, 3))
mpo.opp[i + 1] = transpose(V, ((1, 4), (2, 3)))
if i > 1
@plansor O_right[-1; -3 -4 -2] := mpo.opp[i][-1 -2; -3 2] * U[2; 1] * S[1; -4]
else
Expand Down

0 comments on commit 15cb2c5

Please sign in to comment.