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:
Define the problem qubo
Initialize QAOA workflow object q = QAOA()
Set QAOA properties via setter methods
Compile the object q.compile(qubo)
Run the optimization q.optimize()
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.
The method sorts the measurement outcomes (a dictionary) in the descending order of counts.
It computes the mean and standard deviation for the optimized set of measurement outcomes.
The function also optionally computes these quantities for all intermediate measurement outcomes during optimization if the user specifies.
The method should raise an error if the user requires statistics on all intermediate measurement outcomes but hasn't specified saving them during optimization.
Additional context
An approach adding statistical tools to understand QAOA results better
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:qubo
q = QAOA()
q.compile(qubo)
q.optimize()
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.mean
andstandard deviation
for the optimized set of measurement outcomes.Additional context
An approach adding statistical tools to understand QAOA results better