From 66c6df93634b1a0d81b761db80020298658a9a26 Mon Sep 17 00:00:00 2001 From: Iago Leal Date: Thu, 19 Dec 2024 19:27:06 -0500 Subject: [PATCH] Create MPO from zero coefficients --- src/solver.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solver.jl b/src/solver.jl index e87e5d7..c0dd682 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -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