qiskit-optimization
qiskit-optimization copied to clipboard
RQAOA producing wrong results
Information
Qiskit Aqua version: 'qiskit-terra': '0.16.0', 'qiskit-aer': '0.7.0', 'qiskit-ignis': '0.5.0', 'qiskit-ibmq-provider': '0.11.0', 'qiskit-aqua': '0.8.0', 'qiskit': '0.23.0'
Python version: 3.7.6
Operating system: Windows 10
What is the current behavior?
RQAOA results are wrong as shown in the "Final" tab of the excel inside attached zip file, values should match with Cplex (in dark blue), RQAOA values are in sky blue.
Steps to reproduce the problem
Run the notebooks
What is the expected behavior?
Cplex and RQAOA values should be same (please let me know if want me to run some other way) Github Issues batch Nov 23 2020.zip
Suggested solutions
None
I checked the code with the latest qiskit-optimization. This is the code and output. I slightly tweaked qiskit-optimization to output the correlation table and intermediate problems. I see that absolute correlation value is not always large enough (e.g., -0.5) and resulted in a wrong variable substitution. It might be good to stop the recursive problem contraction when the correlation is not significantly large. What do you think, @stefan-woerner?
You can see the maximum absolute value of correlation in the line staring with "cor:". For example,
cor: x5 x4 -0.29367643729384246
Gist of my code and output: https://gist.github.com/t-imamichi/586dafb66c47a8006b386379fada62b8
Thanks @t-imamichi! This is a heuristic, so that's a behavior that can happen. Indeed, if the correlation turns out to be rather small (below some threshold) we could consider alternative strategies. There are different options but that requires more careful analysis and testing and I wouldn't change it for now.