From 060f98fe23613fe629606e295f374813fb1a7a48 Mon Sep 17 00:00:00 2001 From: Ben Corbett Date: Mon, 10 Jun 2024 16:31:57 -0700 Subject: [PATCH] Fix bug with merge_terms --- src/OpIDSum.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpIDSum.jl b/src/OpIDSum.jl index ba527dc..0f3c8a2 100644 --- a/src/OpIDSum.jl +++ b/src/OpIDSum.jl @@ -144,7 +144,7 @@ end end end -@timeit function merge_terms!(os::OpIDSum)::Nothing +@timeit function merge_terms!(os::OpIDSum{C})::Nothing where {C} uniqueTermLocations = Dict{ SubArray{OpID,1,Vector{OpID},Tuple{UnitRange{Int64}},true},Int }() @@ -155,7 +155,7 @@ end loc == i && continue add_to_scalar!(os, loc, scalar) - set_scalar!(os, i, 0.0) + set_scalar!(os, i, zero(C)) end return nothing