PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
Given the observable is Z (see non-workking example below) and it's a one-shot simulation, I expect the values returned by the circuits to be either -1.0 or 1.0
Actual behavior
The result returned by the folded circuits is 0.23688169075891283 no matter the scale factor, that is,
Expected behavior
Given the observable is Z (see non-workking example below) and it's a one-shot simulation, I expect the values returned by the circuits to be either
-1.0
or1.0
Actual behavior
The result returned by the folded circuits is
0.23688169075891283
no matter the scale factor, that is,for the example below (before extrapolation.)
Additional information
For debugging the partial results before extrapolation, you want to print the
results
array in https://github.com/PennyLaneAI/pennylane/blob/ae1f57298f626d9a825f8a0773ff16969e1fbb01/pennylane/transforms/mitigate.py#L590This issue was noticed while working on https://github.com/PennyLaneAI/qml/pull/1207 @rmoyard and @dime10 are already aware of the issue.
Source code
Tracebacks
No response
System information
Existing GitHub issues