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

Reduce use of legacy CircuitInstruction formats #10416

Merged

Conversation

jakelishman
Copy link
Member

Summary

This removes (as best as our test suite touches) all uses of the implicit legacy tuple form of CircuitInstruction that have crept in since ea02667 (gh-8093). The changes are largely just mechanical over to the new form.

Details and comments

This PR doesn't propose the deprecation of the legacy interface yet. At the very least, that should come early in the cycle for a Terra version, and we know there to be uses in downstream Qiskit projects (Aer and Experiments each have a couple of fairly minor instances) that we can mitigate first.

This removes (as best as our test suite touches) all uses of the
implicit legacy tuple form of `CircuitInstruction` that have crept in
since ea02667 (Qiskitgh-8093).  The changes are largely just mechanical over
to the new form.
@jakelishman jakelishman added type: qa Issues and PRs that relate to testing and code quality Changelog: None Do not include in changelog labels Jul 12, 2023
@qiskit-bot
Copy link
Collaborator

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

  • @ElePT
  • @Qiskit/terra-core
  • @ikkoham
  • @mtreinish
  • @nkanazawa1989
  • @woodsp-ibm

@coveralls
Copy link

Pull Request Test Coverage Report for Build 5532984588

  • 47 of 47 (100.0%) changed or added relevant lines in 6 files are covered.
  • 5 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.007%) to 85.997%

Files with Coverage Reduction New Missed Lines %
qiskit/circuit/quantumcircuitdata.py 2 86.36%
crates/qasm2/src/lex.rs 3 91.14%
Totals Coverage Status
Change from base Build 5528323034: 0.007%
Covered Lines: 71702
Relevant Lines: 83377

💛 - Coveralls

Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

LGTM, as you mentioned above it would be good to get the deprecation out in the next release cycle so we can completely remove this overhead. 🙂

@jakelishman jakelishman added this pull request to the merge queue Jul 12, 2023
@jakelishman jakelishman added this to the 0.25.0 milestone Jul 12, 2023
Merged via the queue into Qiskit:main with commit e2674ce Jul 12, 2023
@jakelishman jakelishman deleted the reduce-legacy-circuitinstruction branch July 12, 2023 17:30
jakelishman added a commit to jakelishman/qiskit-terra that referenced this pull request Jul 13, 2023
Commit e2674ce (Qiskitgh-10416) reduced usage of the legacy format for
`CircuitInstruction` within Terra, but one of the changes meant that a
previously valid input to a public API function became invalid.  This
caused Qiskit Experiments' CI to fail, and wasn't a valid change to
Terra.
github-merge-queue bot pushed a commit that referenced this pull request Jul 13, 2023
Commit e2674ce (gh-10416) reduced usage of the legacy format for
`CircuitInstruction` within Terra, but one of the changes meant that a
previously valid input to a public API function became invalid.  This
caused Qiskit Experiments' CI to fail, and wasn't a valid change to
Terra.
ElePT pushed a commit to ElePT/qiskit-algorithms-test that referenced this pull request Jul 17, 2023
This removes (as best as our test suite touches) all uses of the
implicit legacy tuple form of `CircuitInstruction` that have crept in
since ea02667 (gh-8093).  The changes are largely just mechanical over
to the new form.
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 type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants