Skip to content

Commit

Permalink
fix multiplication of MPOHamiltonian
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Mar 3, 2025
1 parent 4d1af8e commit 858446e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/operators/mpohamiltonian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,11 @@ function VectorInterface.scale!(dst::MPOHamiltonian, src::MPOHamiltonian,
isstarting = I[1] == 1 &&
((isfinite(dst) && i == N && I[4] == size(src[i], 4)) ||
((!isfinite(dst) || i != N) && I[4] > 1))
dst[i][I] = scale!(dst[i][I], v, isstarting ? λ : One())
if v isa BraidingTensor && !isstarting
dst[i][I] = v
else
dst[i][I] = scale!(dst[i][I], v, isstarting ? λ : One())
end
end
end
return dst
Expand Down

0 comments on commit 858446e

Please sign in to comment.