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.
It is possible to access the state of the device via dev.state / dev.access_state(). In tape mode, this state does not seem to get updated after gates are applied.
Expected behavior: Device statevector should be equal to the state immediately before measurement.
Actual behavior: Device statevector is always |00...0>
Reproduces how often: Always.
System information: (post the output of import pennylane as qml; qml.about())
Issue description
It is possible to access the state of the device via
dev.state
/dev.access_state()
. In tape mode, this state does not seem to get updated after gates are applied.Expected behavior: Device statevector should be equal to the state immediately before measurement.
Actual behavior: Device statevector is always |00...0>
Reproduces how often: Always.
System information: (post the output of
import pennylane as qml; qml.about()
)Uses master branch at this commit.
Source code and tracebacks
Please include any additional code snippets and error tracebacks related to the issue here.
This should be [0, 1] after applying X. It works if tape mode is disabled:
Output: