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

Update gate dictionary in two_local.py #12009

Merged

Conversation

amaloney
Copy link
Contributor

  • I have added the tests to cover my changes.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

Summary

This commit removes the hard coded gate dictionary with the one generated by the method get_standard_gate_name_mapping.

Details and comments

Resolves #12002

@amaloney amaloney requested a review from a team as a code owner March 13, 2024 23:25
@qiskit-bot qiskit-bot added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Mar 13, 2024
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Cryoris
  • @Qiskit/terra-core
  • @ajavadia

@coveralls
Copy link

coveralls commented Mar 25, 2024

Pull Request Test Coverage Report for Build 8727412052

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.002%) to 89.287%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.03%
crates/qasm2/src/lex.rs 4 92.37%
Totals Coverage Status
Change from base Build 8709275991: 0.002%
Covered Lines: 60369
Relevant Lines: 67612

💛 - Coveralls

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

This looks great, thanks! Please could you add a bugfix or features_circuit note (whichever you think is more appropriate) just to comment that all of the standard-library gates are now supported as valid string gates?

@amaloney
Copy link
Contributor Author

amaloney commented Apr 4, 2024

rebased against main as well as added a release note

This commit removes the hard coded gate dictionary with the one
generated by the method `get_standard_gate_name_mapping`.

Resolves Qiskit#1202
@amaloney amaloney force-pushed the issue12002/add-gate-dictionary-two_local branch from 0159043 to ffd5d23 Compare April 17, 2024 18:56
jakelishman
jakelishman previously approved these changes Apr 17, 2024
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Thanks for this! Sorry I dropped the re-review for quite a while there.

@jakelishman jakelishman added Changelog: New Feature Include in the "Added" section of the changelog mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library labels Apr 17, 2024
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Just to explain - I pushed up a tweak to the release note since I think this is either a feature or a bugfix but not both (I went "feature", since that seemed to be the way you'd gone preferentially as well) and to add a couple of additional Sphinx cross-references to it. Don't worry at all about that - we very frequently tweak release notes at the point of publishing a release anyway, just to make the "voice" a bit more consistent.

I also threw in a test case for the request in the issue you solved - it was my mistake I didn't think about that before, and I didn't want to send you off on another round when I already was super slow coming back to the review.

Thanks very much for the contribution!

@jakelishman jakelishman added this to the 1.1.0 milestone Apr 17, 2024
@jakelishman jakelishman added this pull request to the merge queue Apr 17, 2024
Merged via the queue into Qiskit:main with commit 3d676d2 Apr 17, 2024
12 checks passed
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 Community PR PRs from contributors that are not 'members' of the Qiskit repo mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add SXGate to supported gates in TwoLocal circuits
5 participants