Skip to content
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

RQAOA producing wrong results #9

Closed
amitracal opened this issue Nov 23, 2020 · 2 comments
Closed

RQAOA producing wrong results #9

amitracal opened this issue Nov 23, 2020 · 2 comments

Comments

@amitracal
Copy link

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

@woodsp-ibm woodsp-ibm transferred this issue from qiskit-community/qiskit-aqua Jan 26, 2021
@t-imamichi
Copy link
Collaborator

t-imamichi commented Mar 12, 2021

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

@stefan-woerner
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants