Skip to content

Added random single-qubit CUE and Clifford gates #6670

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

Conversation

gauravgyawali
Copy link
Contributor

Working from Seneca's last PR that provided class RandomizedMeasurements, I

  1. added an additional argument to the __call__ function to include unitary_ensemble: str = "pauli" which can be set to either "pauli", "clifford" or "cue"
  2. added functions for generating random single-qubit Clifford and cue gates.
  3. replaced unitaries_to_moment function with random_single_qubit_unitary_moment to incorporate all three unitary ensembles instead of just Pauli

@gauravgyawali gauravgyawali requested review from vtomole, cduck and a team as code owners July 19, 2024 18:37
@CirqBot CirqBot added the size: M 50< lines changed <250 label Jul 19, 2024
@gauravgyawali gauravgyawali changed the title Added random single-qubtt CUE and Clifford gates Added random single-qubit CUE and Clifford gates Jul 19, 2024
Copy link
Collaborator

@NoureldinYosri NoureldinYosri left a comment

Choose a reason for hiding this comment

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

just an initial review

Copy link
Collaborator

@senecameeks senecameeks left a comment

Choose a reason for hiding this comment

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

LGTM % a few nits
I'm OOO today so don't wait on my approval :)

Thanks Gaurav for improving this transformer!

Copy link
Collaborator

@senecameeks senecameeks left a comment

Choose a reason for hiding this comment

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

LGTM % passing coverage CI (just add one more test), and signing google contributor agreement.

Thanks for working on this!

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.82%. Comparing base (45a6bbb) to head (63051c3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6670      +/-   ##
==========================================
- Coverage   97.82%   97.82%   -0.01%     
==========================================
  Files        1072     1072              
  Lines       92030    92047      +17     
==========================================
+ Hits        90028    90041      +13     
- Misses       2002     2006       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@senecameeks senecameeks merged commit bc4cd6d into quantumlib:main Jul 23, 2024
34 checks passed
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* added cue and clifford gates

* promoted rng check to the parent function

* rename variables

* minor fixes

* minor formatting fix

* added test coverage for ValueError

* more formatting change

---------

Co-authored-by: Seneca Meeks <[email protected]>
BichengYing pushed a commit to BichengYing/Cirq that referenced this pull request Jun 20, 2025
* added cue and clifford gates

* promoted rng check to the parent function

* rename variables

* minor fixes

* minor formatting fix

* added test coverage for ValueError

* more formatting change

---------

Co-authored-by: Seneca Meeks <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: M 50< lines changed <250
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants