-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add equivalence-library rules between rzz
and cp
#13019
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
features_circuits: | ||
- | | ||
New equivalence rules in the standard equivalence library mean that the transpiler can now | ||
directly convert between two-qubit continuous Pauli rotations, rather than always decomposing | ||
into a discrete two-CX-based solution. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1438,7 +1438,6 @@ def test_control_zero_operand_gate(self, num_ctrl_qubits): | |
@data( | ||
RXGate, | ||
RYGate, | ||
RZGate, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why did you need to remove this test? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test is asserting that a failure occurs, and for most of the gates in the list, they shouldn't really fail - we've got enough equivalence and translation rules that it should be possible to translate the gate into one we can represent better. The As a side effect of this PR, the RZ path now happens to convert things to |
||
RXXGate, | ||
RYYGate, | ||
RZXGate, | ||
|
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.
Did it always decompose into CX? There are some existing 2q Pauli equivalences that should allow to convert between some two-qubit rotations, no? 🙂
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.
I'll tweak this note - I wrote it under the same false assumption about how the basis translator works that's alluded to in the PR comment. We need a new translation algorithm to make any choice of translation reliable - the current system is good at finding an arbitrary valid translation, but not at finding the best translation (for any definition of "best").
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.
I've written a new version of the release note in bbe529b.