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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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 11013369525

Details

  • 11 of 13 (84.62%) changed or added relevant lines in 1 file are covered.
  • 24 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.02%) to 88.776%

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 3 92.73%
qiskit/synthesis/two_qubit/xx_decompose/decomposer.py 7 90.91%
crates/qasm2/src/parse.rs 12 97.15%
Totals Coverage Status
Change from base Build 10966478124: -0.02%
Covered Lines: 73484
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 on lines 6 to 7
can collect :class:`.RZGate(np.pi/2)` gates and other unitary gates that are :class:`.Clifford()`gates
for certain parameters.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
can collect :class:`.RZGate(np.pi/2)` gates and other unitary gates that are :class:`.Clifford()`gates
for certain parameters.
can collect :class:`.RZGate(np.pi/2)` gates and other unitary gates that are :class:`.Clifford()` gates
for certain parameters.

Note the extra space before "gates" -- I believe this is what's responsible for CI failures :).

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch!
The CI failure is not related. it's due to QPY backwards tests. should be fixed after #13202 is merged.

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
4 participants