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 a supported_gates function #277

Merged
merged 8 commits into from
Jun 21, 2023
Merged

Add a supported_gates function #277

merged 8 commits into from
Jun 21, 2023

Conversation

caleb-johnson
Copy link
Collaborator

@caleb-johnson caleb-johnson commented Jun 21, 2023

There should be a central place where users can find out whether or not a gate is supported without using a try block and querying qpdbasis_from_gate. I've addressed this here with a simple function that returns a hard-coded set. I had also considered a function which takes a gate as input and returns a bool, but I just think this implementation is better for both the dev and user.

@caleb-johnson caleb-johnson added cutting QPD-based circuit cutting code enhancement New feature or request labels Jun 21, 2023
@github-actions
Copy link

github-actions bot commented Jun 21, 2023

Pull Request Test Coverage Report for Build 5338168393

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 89.915%

Totals Coverage Status
Change from base Build 5327265827: 0.007%
Covered Lines: 2336
Relevant Lines: 2598

💛 - Coveralls

Copy link
Member

@garrison garrison left a comment

Choose a reason for hiding this comment

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

Looks good! 🙂

@caleb-johnson caleb-johnson merged commit 3a5c5c0 into main Jun 21, 2023
@caleb-johnson caleb-johnson deleted the is-supported branch June 21, 2023 20:21
caleb-johnson added a commit that referenced this pull request Jun 21, 2023
* Add a supported_gates function

* use sets instead of tuples

* Fix docstring

* Add release note

* Fix test

* Update circuit_knitting/cutting/qpd/qpd.py

Co-authored-by: Jim Garrison <garrison@ibm.com>

* Add new function to package and sphinx docs

---------

Co-authored-by: Jim Garrison <garrison@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cutting QPD-based circuit cutting code enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants