Skip to content

Commit

Permalink
Excise recursivevec
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Nov 14, 2024
1 parent 08cf1dc commit 4390b01
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

Check warning on line 53 in src/operators/derivatives.jl

View check run for this annotation

Codecov / codecov/patch

src/operators/derivatives.jl#L51-L53

Added lines #L51 - L53 were not covered by tests
)
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(

Check warning on line 205 in src/operators/derivatives.jl

View check run for this annotation

Codecov / codecov/patch

src/operators/derivatives.jl#L204-L205

Added lines #L204 - L205 were not covered by tests
map(
(v, O1, O2, O3, l, r) -> ∂AC(v, (O1, O2, O3), l, r), x, O[1], O[2], O[3], GL, GR

Check warning on line 207 in src/operators/derivatives.jl

View check run for this annotation

Codecov / codecov/patch

src/operators/derivatives.jl#L207

Added line #L207 was not covered by tests
),
1,
)
end

Expand Down

0 comments on commit 4390b01

Please sign in to comment.