Skip to content

Add some more gates to CollectCliffords pass#13214

Merged
alexanderivrii merged 5 commits intoQiskit:mainfrom
ShellyGarion:collect_rz_cliffords
Oct 1, 2024
Merged

Add some more gates to CollectCliffords pass#13214
alexanderivrii merged 5 commits intoQiskit:mainfrom
ShellyGarion:collect_rz_cliffords

Conversation

@ShellyGarion
Copy link
Copy Markdown
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: Added Add an "Added" entry in the GitHub Release 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
Copy Markdown
Collaborator

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

  • @Qiskit/terra-core

@coveralls
Copy link
Copy Markdown

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
Comment thread releasenotes/notes/add-gates-to-collect-clifford-af88dd8f7a2a4bf9.yaml Outdated
@samanthavbarron
Copy link
Copy Markdown
Contributor

Awesome, thanks for doing this! :)

Copy link
Copy Markdown
Member

@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
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 <samantha.v.barron@ibm.com>

* 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: Added Add an "Added" entry in the GitHub Release 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