Closed albi3ro closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.67%. Comparing base (
9b3060f
) to head (204ff56
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Context:
A user was doing
qml.CRY(0.1, wires=((0,1), 2)
. In this case, the control wire should be a single wire with a value(0,1)
. Yes, this is weird, but this is how wires work in pennylane. Instead, it was being interpretted as having two control wires, even thoughCRY
is only for singly-controlledRY
gates.Description of the Change:
Some minor slicing changes in how we handle special controlled ops.
Now we have:
Which is consistent with how we treat wires elsewhere in pennylane.
Benefits:
Don't end up with a two qubit gate on three qubits.
Possible Drawbacks:
Still weird, and still not what the user was looking for when they provided wires like that. But at least now they'll get a better error.
Related GitHub Issues: