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

Support Controlled gates properly on PyQVM #1338

Open
wants to merge 3 commits into
base: rc
Choose a base branch
from

Conversation

dwillmer
Copy link

@dwillmer dwillmer commented May 22, 2021

Description

Fixes #1259

Controlled gates weren't getting treated properly in the QUANTUM_GATES / matrix globals. The name needs to be modified to pick up the right matrix. As a result I've added a new modified_name property which corrects the name for controlled gates, and a unit-test showing that the example in 1259 now passes.

Checklist

  • The above description motivates these changes.
  • There is a unit test that covers these changes.
  • All new and existing tests pass locally and on Travis CI.
  • Parameters and return values have type hints with PEP 484 syntax.
  • Functions and classes have useful Sphinx-style docstrings.
  • All code follows Black style and obeys flake8 conventions.
  • (New Feature) The docs have been updated accordingly.
  • (Bugfix) The associated issue is referenced above using auto-close keywords.
  • The changelog is updated, including author and PR number (@username, gh-xxx).

@dwillmer dwillmer requested a review from a team as a code owner May 22, 2021 16:02
@dwillmer dwillmer marked this pull request as draft May 22, 2021 16:03
@dwillmer dwillmer changed the title Controlled gates QVM Support Controlled gates properly on PyQVM May 22, 2021
@ameyer-rigetti
Copy link
Contributor

ameyer-rigetti commented Jun 1, 2021

@dwillmer Thanks for the contribution!

You might consider cherry-picking this to the rc branch so that this can come with pyquil v3, then updating this PR to go into rc. After the v3 release, we'll do all work on the rc branch and publish release candidates after each merged PR.

@dwillmer dwillmer marked this pull request as ready for review June 1, 2021 22:07
@dwillmer dwillmer changed the base branch from master to rc June 1, 2021 22:08
@dwillmer
Copy link
Author

dwillmer commented Jun 1, 2021

Howdy, thanks @ameyer-rigetti - have re-pointed to rc as you suggested, no conflicts with base so have left it as-is (there's only 3 existing lines changing, the rest are all new, so not surprising.)

@ameyer-rigetti
Copy link
Contributor

Howdy, thanks @ameyer-rigetti - have re-pointed to rc as you suggested, no conflicts with base so have left it as-is (there's only 3 existing lines changing, the rest are all new, so not surprising.)

Great @dwillmer, thanks! Once the remaining checkboxes are ticked, we can review/merge.

@ameyer-rigetti
Copy link
Contributor

Hi @dwillmer, just following up on this. Are you still interested in seeing this through?

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.

Controlled H crashes on a PyQVM
2 participants