-
Notifications
You must be signed in to change notification settings - Fork 706
Open
Labels
bug 🐛Something isn't workingSomething isn't working
Description
Feature details
lightning.qubit and null.qubit handle StatePrep in a way that leads to confusing (potentially incorrect in the eyes of users) resource estimates/counts:
import pennylane as qml
import jax.numpy as jnp
qml.capture.enable()
qml.decomposition.enable_graph()
@qml.qjit
@qml.qnode(qml.device("lightning.qubit", wires=2))
def circuit():
qml.StatePrep(
jnp.array([1/jnp.sqrt(2), 1/jnp.sqrt(2)]), wires=1
)
qml.Hadamard(wires=0)
return qml.state()Running specs on this circuit shows the H gate only:
>>> print(qml.specs(circuit, level="device")()['resources'].gate_types)
defaultdict(<class 'int'>, {'Hadamard': 1})
Implementation
No response
How important would you say this feature is?
2: Somewhat important. Needed this quarter.
Additional information
No response
Metadata
Metadata
Assignees
Labels
bug 🐛Something isn't workingSomething isn't working