-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure to reproduce quantum approximate optimization algorithm results of linked paper #1459
Comments
Here is a plot showing how the qiskit extended stabilizer results diverge from the correct QAOA expectation values as the number of qubits increases. For each number of qubits (x axis) I generated 10 circuits, sent them to the compute algorithm (blue dots) and the extended stabilizer subroutine in qiskit with the same parameters as I gave above (red dots) and computed the QAOA expectation value at gamma = 0.1. As you can see below about 31 qubits the extended stabilizer values are close to the true values, but then they rapidly diverge, becoming essentially random noise by 40 qubits. |
I have tested your scripts with small changes to run all the qubits and use all system threads, and then got following results:
The above looks similar to blue dots, I think. Modified
|
Yes, I agree. I just tested it again and the problem is present in aer release version 10.3 but seems to be fixed in 10.4. I guess this issue should be closed then. |
Sounds good, thanks for confirming! |
Information
What is the current behavior?
Implementing the QAOA algorithm for the Max E3LIN2 as described in the paper (pages 12-14 and especially figure 4 on page 14) leads to incorrect results. Note that this is the paper which the AER extended stabilizer simulator is based on.
At gamma = pi/10 and the parameters given we should obtain QAOA expectation values around -7 (see figure 4a of the linked paper), qiskit's implementation of the extended stabilizer/metropolis simulator produces expectation values around 0.05 (values close to zero are consistent with "junk", randomly sampling bitstrings that are not related to the QAOA instance).
Steps to reproduce the problem
Code available here
https://gist.github.com/or1426/4faf96f5a71151f3aa4a3165cc8db72e
Note that the sample code takes around 10 minutes to run on my computer, to get results much faster set gamma on line 100 to (e.g.) 0.025*pi. At this gamma the correct expectation value is about -2.52, but qiskit produces values around 0.05 in my tests.
The gist above contains some code to randomly generate instances of QAOA circuits, and a fixed QAOA polynomial provided for reproducibility.
Relevant parameters (taken from linked paper):
What is the expected behavior?
Producing approximately correct values as the authors claim their algorithm does in the paper.
Suggested solutions
Notes
Simulating the QAOA circuits using the extended stabilizer simulator at smaller qubit counts produces correct results. The qiskit results diverge from the true QAOA expectation values at around 31 qubits, and are completely incorrect by around 40 qubits.
Using the same code but simulating the circuits instead with the compute algorithm I am in the process of implementing (pull request #1273) produces correct results.
The text was updated successfully, but these errors were encountered: