Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/algorithms/derivatives/hamiltonian_derivatives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/operators/windowhamiltonian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading