Skip to content

Commit dbe0383

Browse files
committed
Replace similar with appropriate allocate_GL
1 parent b37bb42 commit dbe0383

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/operators/mpo.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,7 @@ function TensorKit.dot(bra::FiniteMPS{T}, mpo::FiniteMPO{<:MPOTensor},
308308
end
309309
function TensorKit.dot(bra::InfiniteMPS, mpo::InfiniteMPO, ket::InfiniteMPS;
310310
ishermitian=false, krylovdim=30, kwargs...)
311-
ρ₀ = similar(bra.AL[1],
312-
left_virtualspace(ket, 1) * left_virtualspace(mpo, 1)
313-
left_virtualspace(bra, 1))
311+
ρ₀ = allocate_GL(bra, mpo, ket, 1)
314312
randomize!(ρ₀)
315313

316314
val, = fixedpoint(TransferMatrix(ket.AL, parent(mpo), bra.AL), ρ₀, :LM; ishermitian,

0 commit comments

Comments
 (0)