You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before raising this issue, I have already checked that I am:
running the latest version
made sure that this issue has not already been filed
Describe the bug
Running a QAOA computation on a QPU and attempting to dump the results fails because some QPUs return their measurement_outcome probabilities as a numpy.float, which is not python serializable. This issue may also happen for statevector simulators, where the measurement_outcomes are wavefunctions which are complex arrays.
To Reproduce
Steps to reproduce the behavior:
Run a QAOA computation on a QPU or a statevector simulator
Attempt to dump the QAOA results in a JSON file
Expected behavior
OpenQAOA should convert all non-serializable outputs to native python types, so that QPU results including measurement outcomes can be dumped into a JSON
The text was updated successfully, but these errors were encountered:
Prerequisites
Before raising this issue, I have already checked that I am:
Describe the bug
Running a QAOA computation on a QPU and attempting to dump the results fails because some QPUs return their measurement_outcome probabilities as a
numpy.float
, which is not python serializable. This issue may also happen for statevector simulators, where the measurement_outcomes are wavefunctions which are complex arrays.To Reproduce
Steps to reproduce the behavior:
dump
the QAOA results in a JSON fileExpected behavior
OpenQAOA should convert all non-serializable outputs to native python types, so that QPU results including measurement outcomes can be
dump
ed into a JSONThe text was updated successfully, but these errors were encountered: