Closed Thevendran closed 1 year ago
Your code uses an optimizer to minimize a cost function (see the line MinimumEigenOptimizer(qaoa_instance)
). The solver will execute your circuit and subsequently update parameters to return the final result. You could use print(result.min_eigen_solver_result)
to read the number of circuit evaluations. As it is, this looks to work as intended, which means that indeed many tasks will be executed.
Steps to reproduce the problem
What is the current behavior?
Code gets executed multiple times (as back-to-back tasks in Braket), before the result returned back to local development environment.
What is the expected behavior?
Expecting the code to be executed just once.