0
$\begingroup$

In the original Qiskit QAOA implementation, the sample uses COBYLA as the classical optimizer in the following code segment:

from scipy.optimize import minimize


expectation = get_expectation(G)

res = minimize(expectation, [1.0, 1.0], method='COBYLA')
res

However, if I try to use BFGS, the optimizer does not optimize my angles. I know that you can pass a jacobian function, but I believe that the documentation says that this is optional for BFGS.

$\endgroup$

1 Answer 1

1
$\begingroup$

In the referenced textbook article, in the prior cell, it is executing what the optimizer ends up processing using the qasm simulator with 512 shots. The result that the optimizer sees will be noisy (shot noise) due to the sampling (shot) noise. While COBYLA may be able to work in such an environment other optimizers may fail because of the noise. While that article is directly using a scipy optimizer, Qiskit provides optimizers, some based-on/using scipy optimizers internally, but it has some, like SPSA designed to cater to noise. There is also a package scikit-quant that seeks to provide optimizers for quantum computing - they have a page describing this and the issue with noise here that may be of interest https://qat4chem.lbl.gov/software.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.