diff --git a/src/algorithms/derivatives/hamiltonian_derivatives.jl b/src/algorithms/derivatives/hamiltonian_derivatives.jl index 47ee2b25a..438fe87ec 100644 --- a/src/algorithms/derivatives/hamiltonian_derivatives.jl +++ b/src/algorithms/derivatives/hamiltonian_derivatives.jl @@ -199,6 +199,15 @@ function AC2_hamiltonian( return prepare ? prepare_operator!!(H_AC2) : H_AC2 end +for f in (:AC_hamiltonian, :AC2_hamiltonian) + @eval function $f( + site::Int, below::WindowMPS, operator::WindowMPOHamiltonian, above::WindowMPS, + envs; kwargs... + ) + return $f(site, below, operator.finite_ham, above, envs; kwargs...) + end +end + function JordanMPO_AC2_Hamiltonian(GL::MPSTensor, W1::JordanMPOTensor, W2::JordanMPOTensor, GR::MPSTensor) # block accessors recompute a fresh `SparseBlockTensorMap` on every access, so bind # them once and reuse the locals throughout diff --git a/src/operators/windowhamiltonian.jl b/src/operators/windowhamiltonian.jl index f4ace7c45..a0833aa56 100644 --- a/src/operators/windowhamiltonian.jl +++ b/src/operators/windowhamiltonian.jl @@ -44,6 +44,7 @@ end Base.parent(h::WindowMPOHamiltonian) = h.finite_ham Base.copy(h::WindowMPOHamiltonian) = WindowMPOHamiltonian(copy(h.left_ham), copy(h.finite_ham), copy(h.right_ham)) +Base.conj(h::WindowMPOHamiltonian) = WindowMPOHamiltonian(conj(h.left_ham), conj(h.finite_ham), conj(h.right_ham)) function Base.:+(a::WindowMPOHamiltonian, b::WindowMPOHamiltonian) # the finite window carries full Jordan virtual spaces at its boundaries, so it has to be