-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
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
update usages of ControlledQubitUnitary in tests #1047
base: master
Are you sure you want to change the base?
Conversation
Hello. You may have forgotten to update the changelog!
|
Do not merge, until the PL deprecation PR's 6839 6840 get merged |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1047 +/- ##
===========================================
- Coverage 97.15% 27.36% -69.79%
===========================================
Files 233 29 -204
Lines 39079 2646 -36433
===========================================
- Hits 37966 724 -37242
- Misses 1113 1922 +809 ☔ View full report in Codecov by Sentry. |
@AmintorDusko Here I investigated the Current test fails are expected. |
@@ -844,7 +844,7 @@ def test_cnot_controlled_qubit_unitary(self, control_wires, target_wires, tol, l | |||
tape = qml.tape.QuantumScript( | |||
[ | |||
qml.StatePrep(init_state, wires=range(n_qubits)), | |||
qml.ControlledQubitUnitary(U, control_wires=control_wires, wires=target_wires), | |||
qml.ControlledQubitUnitary(U, wires=control_wires+target_wires), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qml.ControlledQubitUnitary(U, wires=control_wires+target_wires), | |
qml.ControlledQubitUnitary(U, wires=control_wires + target_wires), |
@@ -450,8 +450,7 @@ def circuit(): | |||
qml.StatePrep(init_state, wires=range(n_qubits)) | |||
qml.ControlledQubitUnitary( | |||
U, | |||
control_wires=control_wires, | |||
wires=target_wires, | |||
wires=control_wires+target_wires, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wires=control_wires+target_wires, | |
wires=control_wires + target_wires, |
@@ -617,7 +616,7 @@ def test_cnot_controlled_qubit_unitary(control_wires, target_wires, tol): | |||
|
|||
def circuit(): | |||
qml.StatePrep(init_state, wires=range(n_qubits)) | |||
qml.ControlledQubitUnitary(U, control_wires=control_wires, wires=target_wires) | |||
qml.ControlledQubitUnitary(U, wires=control_wires+target_wires) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qml.ControlledQubitUnitary(U, wires=control_wires+target_wires) | |
qml.ControlledQubitUnitary(U, wires=control_wires + target_wires) |
Thank you @JerryChen97 for tagging me! We are evaluating the situation. cc: @tomlqc, @maliasadi
|
Context:
Due to the deprecations of
ControlledQubitUnitary
input args PennyLaneAI/pennylane#6839 PennyLaneAI/pennylane#6840, we need to update several tests of lightning that use deprecated interfaces.Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues:
[sc-80842]