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

Extended the from_backend method of InstructionDurations to support both BackendV1 and BackendV2 (backport #12941) #13009

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Aug 21, 2024

Summary

This PR fixes #12760

I have extended the from_backend method of InstructionDurations so that it supports both BackendV1 and BackendV2 (also GenericBackendV2). To get the instruction durations from the BackendV2, I have used the attribute target. Also, in GenericBackendV2, the (duration, error) for delay and reset is set to (None, None) and this None value raises an error in the update() method of InstructionDurations. So, I am skipping the instructions which have None as the duration (let me know if this is not what we want).

@1ucian0, please review this and let me know if this is acceptable. If you want I can also add tests and/or new release notes for the changes I have made.

Thanks

Details and comments


This is an automatic backport of pull request #12941 done by [Mergify](https://mergify.com).

…rt both `BackendV1` and `BackendV2` (#12941)

* Extended the `from_backend` method of `InstructionDurations` to support `GenericBackendV2`

* Simplified the `from_backend` method to allow using `BackendV2`. Added a test and a releasenote.

* Made changes to the releasenote.

(cherry picked from commit 6107799)
@mergify mergify bot requested a review from a team as a code owner August 21, 2024 10:10
@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 following people are relevant to this code:

  • @Qiskit/terra-core

@github-actions github-actions bot added Changelog: Bugfix Include in the "Fixed" section of the changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo labels Aug 21, 2024
@coveralls
Copy link

Pull Request Test Coverage Report for Build 10487878456

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 19 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 89.806%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 94.02%
crates/qasm2/src/lex.rs 6 91.73%
crates/qasm2/src/parse.rs 12 96.23%
Totals Coverage Status
Change from base Build 10475958824: -0.02%
Covered Lines: 66802
Relevant Lines: 74385

💛 - Coveralls

@ElePT ElePT enabled auto-merge August 21, 2024 12:07
@ElePT ElePT added this pull request to the merge queue Aug 21, 2024
Merged via the queue into stable/1.2 with commit 3413861 Aug 21, 2024
18 checks passed
@mergify mergify bot deleted the mergify/bp/stable/1.2/pr-12941 branch August 21, 2024 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Bugfix Include in the "Fixed" section of the changelog Community PR PRs from contributors that are not 'members' of the Qiskit repo
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants