Skip to content

Commit

Permalink
Create MPO from zero coefficients
Browse files Browse the repository at this point in the history
  • Loading branch information
iagoleal committed Dec 20, 2024
1 parent b679925 commit 66c6df9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function tensorize(sites, Q::AbstractArray{T}, Qs...; cutoff = 1e-8) where T
tensorize!(os, sites, x; cutoff)
end

return MPO(T, os, sites)
return isempty(os) ? MPO(T,sites) : MPO(T, os, sites)
end

tensorize!(os, sites, ::Nothing; cutoff = 1e-8) = os
Expand Down

0 comments on commit 66c6df9

Please sign in to comment.