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

Add some more gates to CollectCliffords pass #13214

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

ShellyGarion
Copy link
Member

@ShellyGarion ShellyGarion commented Sep 24, 2024

Summary

Close #13138
Add an argument matrix_based to the CollectCliffords transpiler pass.
If the new parameter matrix_based=True, the CollectCliffords transpiler pass can collect Rz(pi/2) gates and other unitary gates that are Clifford gates for certain parameters.

Details and comments

The PR is based on the suggestion of @samanthavbarron in #13138 and discussions with @alexanderivrii

@ShellyGarion ShellyGarion added Changelog: New Feature Include in the "Added" section of the changelog mod: transpiler Issues and PRs related to Transpiler labels Sep 24, 2024
@ShellyGarion ShellyGarion added this to the 1.3.0 milestone Sep 24, 2024
@ShellyGarion ShellyGarion requested a review from a team as a code owner September 24, 2024 08:44
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Sep 24, 2024

Pull Request Test Coverage Report for Build 11016443174

Details

  • 11 of 13 (84.62%) changed or added relevant lines in 1 file are covered.
  • 10 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.006%) to 88.791%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/transpiler/passes/optimization/collect_cliffords.py 11 13 84.62%
Files with Coverage Reduction New Missed Lines %
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 2 88.26%
crates/qasm2/src/lex.rs 2 92.98%
qiskit/synthesis/two_qubit/xx_decompose/decomposer.py 6 90.91%
Totals Coverage Status
Change from base Build 11016050512: 0.006%
Covered Lines: 73497
Relevant Lines: 82775

💛 - Coveralls

@ShellyGarion ShellyGarion changed the title Add some more gates to CollectClifford pass Add some more gates to CollectCliffords pass Sep 24, 2024
@samanthavbarron
Copy link
Contributor

Awesome, thanks for doing this! :)

Copy link
Contributor

@alexanderivrii alexanderivrii left a comment

Choose a reason for hiding this comment

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

LGTM!

@alexanderivrii alexanderivrii added this pull request to the merge queue Oct 1, 2024
Merged via the queue into Qiskit:main with commit 5ef6344 Oct 1, 2024
15 checks passed
ElePT pushed a commit to ElePT/qiskit that referenced this pull request Oct 9, 2024
* add matrix_based option to CollectClifford pass
Co-authored-by: Samantha Barron <[email protected]>

* add a test to collect matrix_based gates

* add release notes

* minor update following review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog mod: transpiler Issues and PRs related to Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CollectCliffords pass ignores Rz's
5 participants