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
Broadcasted parameters should work with counts.
The following code returns:
Counts: {'0000011010010010100000000001000000010110000000000000000101001110100011010000000001010111001001100001': 1, '0000111100001000111010000101010001101000010001010001000110010010011000101000010001111000010001010000': 1} Counts: {'1010011011000010100111010011101000000100001000000000001100000000110000000000100100010011000000010111': 1}
import pennylane as qml dev = qml.device('default.qubit', wires=2, shots=100) @qml.qnode(dev, interface="autograd", diff_method=None) def circuit(param): # These two gates represent our QML model. qml.RX(param, wires=0) qml.CNOT(wires=[0, 1]) return qml.counts(wires=0) counts = circuit(qml.numpy.array([1.123, 1.1])) print(f"Counts: {counts}") counts = circuit(qml.numpy.array([1.123])) print(f"Counts: {counts}")
No response
-
The text was updated successfully, but these errors were encountered:
timmysilv
Successfully merging a pull request may close this issue.
Expected behavior
Broadcasted parameters should work with counts.
Actual behavior
The following code returns:
Additional information
Source code
Tracebacks
No response
System information
Existing GitHub issues
The text was updated successfully, but these errors were encountered: