Skip to content

Allow v2 provider backends#1106

Merged
chriseclectic merged 1 commit into
Qiskit:masterfrom
jyu00:v2-provider
Jan 20, 2021
Merged

Allow v2 provider backends#1106
chriseclectic merged 1 commit into
Qiskit:masterfrom
jyu00:v2-provider

Conversation

@jyu00
Copy link
Copy Markdown
Contributor

@jyu00 jyu00 commented Jan 20, 2021

Summary

Qiskit/qiskit#5086 introduced v2 provider with new classes Backend, Job, and Provider. ibmq-provider is switching to v2 provider interface, and this PR ensures that Backend will be accepted in addition to BaseBackend.

Details and comments

Copy link
Copy Markdown
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

LGTM, it'd be good to have a test here, but the easy way to go about that using a fake backend won't work yet because the fake backends are still legacy backends. We can circle back here after we have some local new interface backends that will work.

@chriseclectic chriseclectic merged commit 450ae96 into Qiskit:master Jan 20, 2021
@mtreinish mtreinish added the stable-backport-potential The issue or PR might be minimal and/or import enough to backport to stable label Mar 3, 2021
mtreinish pushed a commit to mtreinish/qiskit-aer that referenced this pull request Mar 3, 2021
Modified to handle backwards compatibility with older versions of qiskit
terra prior to the Backend abstract class existing.

(cherry picked from commit 450ae96)
mtreinish added a commit to mtreinish/qiskit-aer that referenced this pull request Mar 4, 2021
During code review it was suggested to change the try except logic
around importing Backend from terra that was added in the backport for
PR Qiskit#1106 for backwards compatibility with the minimum supported terra
version to a simpler version using tuples. This commit makes that change
to avoid a needlessly long if statement around isinstance checking
backend objects.

Co-authored-by: Christopher J. Wood <cjwood@us.ibm.com>
mtreinish added a commit to mtreinish/qiskit-aer that referenced this pull request Mar 4, 2021
During code review it was suggested to change the try except logic
around importing Backend from terra that was added in the backport for
PR Qiskit#1106 for backwards compatibility with the minimum supported terra
version to a simpler version using tuples. This commit makes that change
to avoid a needlessly long if statement around isinstance checking
backend objects.

Co-authored-by: Christopher J. Wood <cjwood@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-backport-potential The issue or PR might be minimal and/or import enough to backport to stable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants