Skip to content

Commit ec126ba

Browse files
committed
Removed ResultType.
1 parent 5a257c8 commit ec126ba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lib/ITensorMPS/src/mpo.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -836,15 +836,14 @@ function ITensors.contract(
836836
N = length(A)
837837
N != length(B) &&
838838
throw(DimensionMismatch("lengths of MPOs A ($N) and B ($(length(B))) do not match"))
839-
ResultType = typeof(B)
840839
# Special case for a single site
841-
N == 1 && return ResultType([A[1] * B[1]])
840+
N == 1 && return typeof(B)([A[1] * B[1]])
842841
A = orthogonalize(A, 1)
843842
B = orthogonalize(B, 1)
844843
A = sim(linkinds, A)
845844
sA = siteinds(uniqueinds, A, B)
846845
sB = siteinds(uniqueinds, B, A)
847-
C = ResultType(N)
846+
C = typeof(B)(N)
848847
lCᵢ = Index[]
849848
R = ITensor(true)
850849
for i in 1:(N - 2)

0 commit comments

Comments
 (0)