entropicalabs / openqaoa

Multi-backend SDK for quantum optimisation
MIT License
116 stars 58 forks source link

Integrate ZNE from Mitiq into OpenQAOA #207

Open MaldoAlberto opened 1 year ago

MaldoAlberto commented 1 year ago

Prerequisites

Before raising this feature request, I have made sure:

Is your feature request related to a problem? Please describe.

Proposal a method into the object QAOA to indicate the parameters necessaries for Mitiq and try to mitigate the error for the problem.

Describe the solution you'd like

Add mitiq on OpenQAOA using ZNE mitigation error and implement in the QAOA class.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

victor-onofre commented 9 months ago

Hi @Q-lds and all OpenQAOA team! As part of the Quantum Open Source Foundation Mentorship program, we want to add this feature to OpenQAOA.

The project mentors are going to be @MaldoAlberto and me. The team is going to be @AdrianoLusso, @mar-ven and @Abhinaba925. We already have done a small example of integrating ZNE with Mitiq in a handmade QAOA (the code is here). We need to figure out the workflow to modify compile() in OpenQAOA. We expect to have a plan by the end of the week.

Also, Alberto has talked to the maintainers of Mitiq, and they said there is no issue with integrating the features of Mitiq with OpenQAOA.

Hope to finish this new feature soon!

Thanks!

Q-lds commented 9 months ago

Amazing! Let me tag the rest of the team too: @KilianPoirier @vishal-ph @shahidee44

I'm very excited about the prospect of bringing error mitigation to OpenQAOA :)

Let us know if we can be of help!

victor-onofre commented 9 months ago

Hi @KilianPoirier, @vishal-ph and @shahidee44. The team has been working on the planning, and we have a couple of questions. Here are the important points:

Adriano_OpenQAOA

Thanks for the help!

victor-onofre commented 7 months ago

Hi @KilianPoirier, @vishal-ph and @shahidee44. Here is an update on the project:

  1. We managed to create a wrapper for ZNE. You can check the current version here. At the moment the code is messy but we will improve it during the rest of the tests.

  2. We have some preliminary results with a random instance of the Max-Cut problem using noise models. These results are unoptimized, but they show the wrapper is working. Here, you can check the parameters of the simulation. Here is a cost history plot of the results: 3 2qaoa_qaoanoise_qaoazne_maxcut_cost

  3. We are currently working on benchmarking with the Max cut and Knapsack problem (Obtaining optimal solution in a noiseless simulation and then applying the noise model to find the optimal parameters of the ZNE method )