Skip to content

Commit

Permalink
Excise recursivevec (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos authored Nov 15, 2024
1 parent 08cf1dc commit f508663
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions src/operators/derivatives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ end
(H::PEPS_∂∂C)(x) = MPSKit.∂C(x, H.GL, H.GR)
(H::PEPS_∂∂AC)(x) = MPSKit.∂AC(x, (H.top, H.bot), H.GL, H.GR)

function MPSKit.∂AC(x::RecursiveVec, O::Tuple, GL, GR)
return RecursiveVec(
circshift(
map((v, O1, O2, l, r) -> ∂AC(v, (O1, O2), l, r), x.vecs, O[1], O[2], GL, GR), 1
),
function MPSKit.∂AC(x::Vector, O::Tuple, GL, GR)
return circshift(
map((v, O1, O2, l, r) -> ∂AC(v, (O1, O2), l, r), x, O[1], O[2], GL, GR), 1
)
end

Expand Down Expand Up @@ -203,20 +201,12 @@ end
(H::PEPO_∂∂C)(x) = MPSKit.∂C(x, H.GL, H.GR)
(H::PEPO_∂∂AC)(x) = MPSKit.∂AC(x, (H.top, H.bot, H.mid), H.GL, H.GR)

function MPSKit.∂AC(x::RecursiveVec, O::Tuple{T,T,P}, GL, GR) where {T,P}
return RecursiveVec(
circshift(
map(
(v, O1, O2, O3, l, r) -> ∂AC(v, (O1, O2, O3), l, r),
x.vecs,
O[1],
O[2],
O[3],
GL,
GR,
),
1,
function MPSKit.∂AC(x::Vector, O::Tuple{T,T,P}, GL, GR) where {T,P}
return circshift(
map(
(v, O1, O2, O3, l, r) -> ∂AC(v, (O1, O2, O3), l, r), x, O[1], O[2], O[3], GL, GR
),
1,
)
end

Expand Down

0 comments on commit f508663

Please sign in to comment.