Skip to content

Commit

Permalink
Fix cost_function argument order
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrehmer committed Jan 21, 2025
1 parent 9c7366d commit acbcece
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/optimization/peps_optimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function cost_and_grad!(cache::PEPSCostFunctionCache{T}, peps_vec::Vector{T}) wh
cache.alg.boundary_alg;
alg_rrule=cache.alg.gradient_alg,
)
cost = cost_function(ψ, cache.operator, env)
cost = cost_function(ψ, env, cache.operator)
ignore_derivatives() do # update cache
update!(cache.env, env)
cache.truncation_error = truncation_error
Expand Down

0 comments on commit acbcece

Please sign in to comment.