entropicalabs / openqaoa

Multi-backend SDK for quantum optimisation
MIT License
113 stars 59 forks source link

Add result statistics on measurement outcomes in QAOAResult object #235

Closed vishal-ph closed 1 year ago

vishal-ph commented 1 year ago

Prerequisites

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

The QAOAResult object stores information regarding the QAOA optimization routine. This result object can be accessed post optimization through the QAOA workflow object via the following steps:

  1. Define the problem qubo
  2. Initialize QAOA workflow object q = QAOA()
  3. Set QAOA properties via setter methods
  4. Compile the object q.compile(qubo)
  5. Run the optimization q.optimize()
  6. Obtain the results of optimization as qaoa_result = q.result

Add a method under the QAOAResult class that computes some statistical quantities for the measurement outcomes.

Describe the solution you'd like

The QAOA object can store measurement outcomes (i.e. counts) from each circuit evaluation in the QAOAResult object.

Additional context

An approach adding statistical tools to understand QAOA results better

WingCode commented 1 year ago

@vishal-ph I would like to take a stab at this issue. Could you assign it to me?

vishal-ph commented 1 year ago

@WingCode, sure! Thanks!

TerraVenil commented 1 year ago

@Q-lds please assign this issue to me. Thanks.

Q-lds commented 1 year ago

@TerraVenil, thanks for your contribution! :)