We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a257c8 commit ec126baCopy full SHA for ec126ba
src/lib/ITensorMPS/src/mpo.jl
@@ -836,15 +836,14 @@ function ITensors.contract(
836
N = length(A)
837
N != length(B) &&
838
throw(DimensionMismatch("lengths of MPOs A ($N) and B ($(length(B))) do not match"))
839
- ResultType = typeof(B)
840
# Special case for a single site
841
- N == 1 && return ResultType([A[1] * B[1]])
+ N == 1 && return typeof(B)([A[1] * B[1]])
842
A = orthogonalize(A, 1)
843
B = orthogonalize(B, 1)
844
A = sim(linkinds, A)
845
sA = siteinds(uniqueinds, A, B)
846
sB = siteinds(uniqueinds, B, A)
847
- C = ResultType(N)
+ C = typeof(B)(N)
848
lCᵢ = Index[]
849
R = ITensor(true)
850
for i in 1:(N - 2)
0 commit comments