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 duration and unit kwargs to __init__ for all standard gates #11013

Merged
merged 6 commits into from
Oct 19, 2023
Merged

Add duration and unit kwargs to __init__ for all standard gates #11013

merged 6 commits into from
Oct 19, 2023

Conversation

hunterkemeny
Copy link
Contributor

Summary

Add duration and unit kwarg in init for all classes in standard_gates

Details and comments

@hunterkemeny hunterkemeny requested a review from a team as a code owner October 12, 2023 23:29
@qiskit-bot
Copy link
Collaborator

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

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

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6502025495

  • 26 of 26 (100.0%) changed or added relevant lines in 16 files are covered.
  • 22 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 87.024%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 4 90.66%
crates/qasm2/src/parse.rs 18 96.2%
Totals Coverage Status
Change from base Build 6498068701: -0.02%
Covered Lines: 74364
Relevant Lines: 85452

💛 - Coveralls

@mtreinish mtreinish added the Changelog: None Do not include in changelog label Oct 13, 2023
@mtreinish mtreinish added this to the 0.45.0 milestone Oct 13, 2023
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! Could we do the same for the two standard instructions Measure and Reset as well? (It doesn't make sense for Barrier, since that's a directive that's ignored by hardware.)

qiskit/circuit/library/standard_gates/global_phase.py Outdated Show resolved Hide resolved
This corrects a couple of places that had `unit=None` instead of
`unit="dt", and makes sure that all gates in a given file have the right
signature.
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 doing this, Hunter - I've fixed up the merge conflicts and just tweaked a couple of gates where there were typos (like passing unit="dt" on to super().__init__ rather than unit=unit).

@jakelishman jakelishman enabled auto-merge October 19, 2023 14:45
@jakelishman jakelishman added this pull request to the merge queue Oct 19, 2023
Merged via the queue into Qiskit:main with commit 9f3a7cf Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants