From acbcece3d79ce26f81aa0338016c43745473f256 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Tue, 21 Jan 2025 13:55:08 +0100 Subject: [PATCH] Fix cost_function argument order --- src/algorithms/optimization/peps_optimization.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/optimization/peps_optimization.jl b/src/algorithms/optimization/peps_optimization.jl index 74ffbfef..d76bd71f 100644 --- a/src/algorithms/optimization/peps_optimization.jl +++ b/src/algorithms/optimization/peps_optimization.jl @@ -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