Skip to content

Commit

Permalink
removed duplicate in derivatives.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanMaertens committed Sep 15, 2023
1 parent f1be338 commit 4d987f8
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions src/algorithms/derivatives.jl
Original file line number Diff line number Diff line change
Expand Up @@ -329,25 +329,4 @@ MultipliedOperator(∂∂AC2(pos::Int,mps,opp.op,cache),opp.f)
SumOfOperators( map((op,openv)->∂∂AC(pos,mps,op,openv),opp.ops,cache.envs) )

∂∂AC2(pos::Int,mps,opp::SumOfOperators,cache::MultipleEnvironments) =
SumOfOperators( map((op,openv)->∂∂AC2(pos,mps,op,openv),opp.ops,cache.envs) )


# MultipliedOperator and SumOfOperators
∂∂C(pos::Int,mps,opp::MultipliedOperator,cache) =
MultipliedOperator(∂∂C(pos::Int,mps,opp.op,cache),opp.f)

∂∂AC(pos::Int,mps,opp::MultipliedOperator,cache) =
MultipliedOperator(∂∂AC(pos::Int,mps,opp.op,cache),opp.f)

∂∂AC2(pos::Int,mps,opp::MultipliedOperator,cache) =
MultipliedOperator(∂∂AC2(pos::Int,mps,opp.op,cache),opp.f)

∂∂C(pos::Int,mps,opp::SumOfOperators,cache::MultipleEnvironments) =
SumOfOperators( map((op,openv)->∂∂C(pos,mps,op,openv),opp.ops,cache.envs) )

∂∂AC(pos::Int,mps,opp::SumOfOperators,cache::MultipleEnvironments) =
SumOfOperators( map((op,openv)->∂∂AC(pos,mps,op,openv),opp.ops,cache.envs) )

∂∂AC2(pos::Int,mps,opp::SumOfOperators,cache::MultipleEnvironments) =
SumOfOperators( map((op,openv)->∂∂AC2(pos,mps,op,openv),opp.ops,cache.envs) )

SumOfOperators( map((op,openv)->∂∂AC2(pos,mps,op,openv),opp.ops,cache.envs) )

0 comments on commit 4d987f8

Please sign in to comment.