Skip to content
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

SWAP removal #36

Merged
merged 3 commits into from
Oct 10, 2024
Merged

SWAP removal #36

merged 3 commits into from
Oct 10, 2024

Conversation

eggerdj
Copy link
Collaborator

@eggerdj eggerdj commented Oct 8, 2024

Summary

This pass removes SWAP gates that do not have an effect on the final circuit.

Details and comments

  1. A new pass is introduced. This pass should be applied after the commuting 2Q block routing to remove any redundant SWAP gates that the swap strategy may have inserted.
  2. This pass is added to the predefined pass manager.
  3. A test is added.

@eggerdj eggerdj requested a review from ElePT as a code owner October 8, 2024 09:41
Copy link
Collaborator

@ElePT ElePT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Daniel! I agree that the dag iteration can be more efficient, but that can be left for a follow-up. I just left a small suggestion, else LGTM.

@ElePT ElePT merged commit f7b7ff0 into qiskit-community:main Oct 10, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants