-
Notifications
You must be signed in to change notification settings - Fork 2.6k
use XXPlusYYGate in excitation_preserving #14128
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
Conversation
One or more of the following people are relevant to this code:
|
Pull Request Test Coverage Report for Build 14271767169Details
💛 - Coveralls |
Thanks for this contribution to Qiskit.
|
The current code outputs:
The new code outputs:
|
Done. |
@@ -116,8 +116,7 @@ def excitation_preserving( | |||
theta = Parameter("θ") | |||
if num_qubits > 1: | |||
swap = QuantumCircuit(2, name="Interaction") | |||
swap.rxx(theta, 0, 1) | |||
swap.ryy(theta, 0, 1) | |||
swap.append(XXPlusYYGate(2 * theta), [0, 1]) |
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.
The factor of 2 is ugly but I added it to maintain equivalence with the previous code.
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.
Thanks for this contribution.
I have two minor comments, but other than that this PR looks good.
@Cryoris - do you have any further comments?
Summary
Fixes #14125
Details and comments