From 61e130b84bbbf59b1a3eec980d850a0a2599043b Mon Sep 17 00:00:00 2001 From: Simon Yin <54009146+rsoftone@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:53:13 +1000 Subject: [PATCH] Update mlpack_optimizer.cpp - cmaes lower and upper were swapped --- xacc/optimizer/mlpack/mlpack_optimizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xacc/optimizer/mlpack/mlpack_optimizer.cpp b/xacc/optimizer/mlpack/mlpack_optimizer.cpp index 948d6ea73..6b32f82b4 100644 --- a/xacc/optimizer/mlpack/mlpack_optimizer.cpp +++ b/xacc/optimizer/mlpack/mlpack_optimizer.cpp @@ -192,7 +192,7 @@ OptResult MLPACKOptimizer::optimize(OptFunction &function) { if (options.keyExists("mlpack-cmaes-lower-bound")) { lower = options.get("mlpack-cmaes-lower-bound"); } - CMAES<> optimizer(lambda, upper, lower, 1, maxiter, tol); + CMAES<> optimizer(lambda, lower, upper, 1, maxiter, tol); results = optimizer.Optimize(f, coordinates); #else xacc::error("Cannot run mlpack cmaes algorithm, lapack not found."); @@ -240,4 +240,4 @@ OptResult MLPACKOptimizer::optimize(OptFunction &function) { } // namespace xacc -REGISTER_OPTIMIZER(xacc::MLPACKOptimizer) \ No newline at end of file +REGISTER_OPTIMIZER(xacc::MLPACKOptimizer)