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

Parallel Optimization / Fitness evaluation #409

Open
dietmarwo opened this issue Aug 30, 2022 · 0 comments
Open

Parallel Optimization / Fitness evaluation #409

dietmarwo opened this issue Aug 30, 2022 · 0 comments

Comments

@dietmarwo
Copy link

dietmarwo commented Aug 30, 2022

What is the expected enhancement?

The following enhancements regarding optimization are proposed:

  • Parallel optimization restart.
  • Implementing an optimizer performing parallel fitness evaluation.

Alternatively an existing solution could be wrapped.

Modern many core CPUs scale very differently dependent on how parallelization is applied. For VQEs BLAS based parallelization can scale quite poorly. If you want to optimize the parameters of a VQE using simulation it may be better to execute the circuit simulation single threaded and call the whole fitness computation in parallel. Or even the whole optimization (parallel restart). In optimizing a VQE I did some comparisons using a 16 core CPU and {'qiskit-terra': '0.21.2', 'qiskit-aer': '0.10.4', 'qiskit-ignis': '0.7.1', 'qiskit-ibmq-provider': '0.19.2', 'qiskit': '0.37.2', 'qiskit-nature': '0.4.4', 'qiskit-optimization': '0.4.0'} based on maxcut applied to a 16 node graph. The results indicate that:

  • Parallel fitness evaluation can significantly speed up VQE optimization (> factor 10 for a 16 core CPU on linux compared to serial fitness evaluation).
  • Parallel restarts helps testing and comparing optimization algorithms/parameters (> factor 16 for a 16 core CPU on linux compared to serial restart, works with existing algos like SPSA).

Both require that a single simulation is performed single threaded - "backend.set_options(max_parallel_threads=1)".
Execute maxcut.py to reproduce.

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

No branches or pull requests

1 participant