We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With the latest development version of PennyLane, we now support returning samples from the QNode, as well as expectation values and variance:
samples
@qml.qnode(dev) def circuit(x): qml.RX(x, wires=0) qml.CNOT(wires=[0, 1]) return expval(qml.PauliZ(0)), sample(qml.PauliZ(1))
Plugins can support this new feature by subclassing the Device.sample() method, returning the requested number of samples for a given observable.
Device.sample()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
With the latest development version of PennyLane, we now support returning
samples
from the QNode, as well as expectation values and variance:Plugins can support this new feature by subclassing the
Device.sample()
method, returning the requested number of samples for a given observable.The text was updated successfully, but these errors were encountered: