Skip to content

Commit 72a980b

Browse files
authored
remove obsolete iszero checks (#213)
1 parent 0428ee4 commit 72a980b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/operators/mpohamiltonian.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,12 @@ function Base.:+(H₁::MPOH, H₂::MPOH) where {MPOH<:MPOHamiltonian}
432432
A₁ = H₁.A[i]
433433
A₁_inds = CartesianIndices((2:(size(H₁[i], 1) - 1), 1:1, 1:1,
434434
2:(size(H₁[i], 4) - 1)))
435-
iszero(A₁) || copyto!(W, A₁_inds, A₁, CartesianIndices(A₁))
435+
copyto!(W, A₁_inds, A₁, CartesianIndices(A₁))
436436

437437
A₂ = H₂.A[i]
438438
A₂_inds = CartesianIndices((size(H₁[i], 1):(size(W, 1) - 1), 1:1, 1:1,
439439
size(H₁[i], 4):(size(W, 4) - 1)))
440-
iszero(A₂) || copyto!(W, A₂_inds, A₂, CartesianIndices(A₂))
440+
copyto!(W, A₂_inds, A₂, CartesianIndices(A₂))
441441
end
442442

443443
if H₁ isa InfiniteMPOHamiltonian || i != 1

0 commit comments

Comments
 (0)