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

Methods for GPI, GPI2, and AAMS gates. #1395

Merged
merged 39 commits into from
May 16, 2024
Merged

Conversation

michaelontiveros
Copy link
Contributor

Description

  1. Fix GPI2 in pytket (a typo in the binder would cause c.GPI2 to return c.GPI).

  2. Add symbolic GPI, GPI2, and AAMS gates.

  3. Add methods to decompose the following gates to GPI, GPI2, and AAMS:
    -Rx, Ry, Rz,
    -XXPhase, YYPhase, ZZPhase,
    -TK1, TK2.

  4. Support the target gateset (GPI, GPI2, AAMS) in the auto_rebase_pass.

  5. Add the transform rebase_ionq. It decomposes the gates in the source circuit to the IonQ native gateset (GPI, GPI2, AAMS). It does not push the Rz's in the source circuit to the end of the target circuit using commutation relations with the target gates.

Related issues

Resolves #1361.

Checklist

  • I have performed a self-review of my code.
  • I have commented hard-to-understand parts of my code.
  • I have made corresponding changes to the public API documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have updated the changelog with any user-facing changes.

@cqc-alec cqc-alec self-requested a review May 15, 2024 11:45
Copy link
Collaborator

@cqc-alec cqc-alec left a comment

Choose a reason for hiding this comment

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

Thanks! Please could you also add a method to convert a CX gate, and add some C++ tests to get the coverage up? Otherwise looks great.

pytket/binders/circuit/Circuit/add_op.cpp Show resolved Hide resolved
pytket/docs/changelog.rst Outdated Show resolved Hide resolved
pytket/tests/transform_test.py Show resolved Hide resolved
@michaelontiveros
Copy link
Contributor Author

I added CX_using_AAMS(), and changed the rebase pass to use it instead of TK2_using_AAMS().
I added CircPool and Symbolic tests.

Copy link
Collaborator

@cqc-alec cqc-alec left a comment

Choose a reason for hiding this comment

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

Thank you for your work on this.

@cqc-alec cqc-alec merged commit bc8c11c into CQCL:main May 16, 2024
33 of 34 checks passed
@michaelontiveros
Copy link
Contributor Author

My pleasure.

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.

Add methods to convert TK1 gates to GPI and GPI2, and TK2 gates to AAMS
2 participants