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
I tried to track down the problem, which is centered on _qpy_replay. But there are no documentation or comments describing _qpy_replay and several adjacent structures and functions.
Note
The following script is not a minimal description of the bug. But it is an example abstracted from using EstimatorQNN and NeuralNetworkClassifier from qiskit-machine-learning on a real IBM device (in this case, ibm_kyiv). It's unlikely that simple workflows involving EstimatorQNN will work when this bug is present.
I checked and this bug is present in the public api for qpy too. Calling qiskit.qpy.dump() will trigger the bug if the parameter expression as defined in the reproducer is used on a gate. qpy.binary_io.value.dumps_value is not part of the public api so I just wanted to rule out that it's not an issue from calling the internals directly.
@mtreinish, that's important. It would have been better if I included an explicit user-level API example in the bug report. I think both things are useful. Showing that a user will encounter the bug, and a minimal example.
This came up in code from collaborators. It's a simple machine learning example. I think most of the code is from a tutorial. It works fine on a fake backend. But fails with a real backend because of the qpy serialiazation. On the application side, QNNEstimator has only been supported on real V2 backends for a couple of months. I have not seen any other mention of people running into this problem.
Certain
ParameterExpression
s cause QPY serialization v13 to throw. QPY v12 does not throw.Note
After opening this issue I found the following much simpler script for triggering the bug:
There is no error with QPY version 12.
When running the script above, the error,
is thrown here at line 40
qiskit/qiskit/qpy/binary_io/value.py
Lines 39 to 42 in d9b8a18
I tried to track down the problem, which is centered on
_qpy_replay
. But there are no documentation or comments describing_qpy_replay
and several adjacent structures and functions.Note
The following script is not a minimal description of the bug. But it is an example abstracted from using
EstimatorQNN
andNeuralNetworkClassifier
from qiskit-machine-learning on a real IBM device (in this case,ibm_kyiv
). It's unlikely that simple workflows involvingEstimatorQNN
will work when this bug is present.Running this script will trigger the bug:
If I replace
versions=13
withversion=12
, I see no apparent problem.The text was updated successfully, but these errors were encountered: