diff --git a/src/environments/FinEnv.jl b/src/environments/FinEnv.jl index 42cc3220..0f2c9f8e 100644 --- a/src/environments/FinEnv.jl +++ b/src/environments/FinEnv.jl @@ -93,10 +93,6 @@ function environments( ) end -function environments(below, opp::TimedOperator, above, leftstart, rightstart) - return environments(below, opp.op, above, leftstart, rightstart) -end - function environments(Ψ::WindowMPS, windowH::Window) lenvs = environments(Ψ.left_gs, windowH.left) renvs = environments(Ψ.right_gs, windowH.right) diff --git a/src/operators/multipliedoperator.jl b/src/operators/multipliedoperator.jl index b3c7ff84..a542e6a2 100644 --- a/src/operators/multipliedoperator.jl +++ b/src/operators/multipliedoperator.jl @@ -63,4 +63,4 @@ Base.:*(x::MultipliedOperator, v) = x(v); # don't know a better place to put this # environment for MultipliedOperator -environments(st, x::MultipliedOperator) = environments(st, x.op) +environments(st,x::MultipliedOperator,args...;kwargs...) = environments(st,x.op,args...;kwargs...) diff --git a/test/algorithms.jl b/test/algorithms.jl index d4251099..a25d7190 100644 --- a/test/algorithms.jl +++ b/test/algorithms.jl @@ -147,9 +147,9 @@ end alg = TDVP() # with regular MPOHamiltonian - H0left = simpleH - H0middle = repeat(simpleH, 20) # (= Hmiddle) - H0right = simpleH + H0left = simpleH; + H0middle = repeat( simpleH, 20); + H0right = simpleH; Ψ = InfiniteMPS([ℂ^2], [ℂ^20]) Ψwindow = WindowMPS(Ψ, 20) diff --git a/test/states.jl b/test/states.jl index a773722b..3d9e857e 100644 --- a/test/states.jl +++ b/test/states.jl @@ -219,17 +219,8 @@ end period = rand(1:4) Ψ = InfiniteMPS(fill(d, period), fill(D, period)) - Ψwindow = WindowMPS(rand, ComplexF64, rand(5:10), d, D, Ψ) #does copy Ψ or not? - - @test Ψwindow.left_gs !== Ψwindow.right_gs # not the same reference - @test Ψwindow.left_gs ≈ Ψwindow.right_gs # but the same state - - Ψwindow.left_gs.AC[1] *= 2 - @test abs(norm(Ψwindow.left_gs) - norm(Ψwindow.right_gs)) > 0.5 - @test abs(norm(Ψwindow.left_gs) - norm(Ψ)) > 0.5 - - Ψwindow = WindowMPS(rand, ComplexF64, rand(5:10), d, D, Ψ, Ψ) - @test Ψwindow.left_gs == Ψwindow.right_gs # the same reference + Ψwindow = WindowMPS(rand, ComplexF64, rand(5:10), d, D, Ψ, Ψ); # version that does not copy + @test Ψwindow.left_gs === Ψwindow.right_gs # the same reference Ψwindow_copied = copy(Ψwindow) @test Ψwindow_copied.left_gs !== Ψwindow_copied.right_gs # not the same reference