-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Add ZSXX basis to 1q euler decomposer #5937
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
818d970
to
155bf21
Compare
We might want to wait on this one until #5827 is ready. That PR has some fixes for the ZSX basis which would also apply here. |
This commit adds a new basis ZSXX to the 1q euler decomposer. This basis is identical to the ZSX basis except it does an additional simplification pass so that instead of having 2 sx gates in the synthesized output a single X gate is used instead. Fixes Qiskit#5722
mtreinish
commented
Mar 16, 2021
mtreinish
added a commit
to levbishop/qiskit-terra
that referenced
this pull request
Mar 16, 2021
This commit merges the zsxx-basis branch from Qiskit#5937 into this branch. From that PR: This commit adds a new basis ZSXX to the 1q euler decomposer. This basis is identical to the ZSX basis except it does an additional simplification pass so that instead of having 2 sx gates in the synthesized output a single X gate is used instead. Fixes Qiskit#5722
kdk
reviewed
Mar 16, 2021
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.
Can you add ZSXX to the bases for the randomized synthesis tests?
kdk
reviewed
Mar 16, 2021
kdk
reviewed
Mar 16, 2021
This has been superseded by: #5827 which included this commit so closing this now. |
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Jun 17, 2025
In the TwoQubitBasisDecomposer there was a special code path to do pulse optimal decomposition. This code path could occasionally result in a 0 degree angle rz gate being emitted. This would mean the sequence of SX - RZ(0) - SX would be generated which is just an X gate. This commit updates the decomposition to just use an X gate in these cases if they're encountered. This is essentially the same optimization that was done in Qiskit#5937/Qiskit#5827 for the single qubit euler decomposer but this applies it to the pulse optimal 2q decomposition.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 7, 2025
* Adjust pulse optimal cx two qubit decomposer to avoid RZ(0) In the TwoQubitBasisDecomposer there was a special code path to do pulse optimal decomposition. This code path could occasionally result in a 0 degree angle rz gate being emitted. This would mean the sequence of SX - RZ(0) - SX would be generated which is just an X gate. This commit updates the decomposition to just use an X gate in these cases if they're encountered. This is essentially the same optimization that was done in #5937/#5827 for the single qubit euler decomposer but this applies it to the pulse optimal 2q decomposition. * Add tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This commit adds a new basis ZSXX to the 1q euler decomposer. This basis
is identical to the ZSX basis except it does an additional
simplification pass so that instead of having 2 sx gates in the
synthesized output a single X gate is used instead.
Details and comments
Fixes #5722
This PR depends on #5928 (and will be on hold until that merges)