-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Remove legacy providers interface #7886
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit removes the legacy providers interface from terra. This includes the BaseBackend, BaseJob, BaseProvider abstract classes and everything that inherits from them in the tree. These classes were deprecated as part of qiskit-terra 0.18.0 and have been supersceded by the versioned provider interface and all providers should have migrated by now to these new supported interface. This also means we no longer support the qobj execution path and QuantumCircuit and Schedule objects are used directly everywhere for running. In the future we can look at deprecating and removing the assemble() function and qobj class in the future as nothing in tree is using them directly. But before we can deprecate these the IBM provider and aer will need to have native implementations.
mtreinish
added
Changelog: Deprecation
Include in "Deprecated" section of changelog
Changelog: Removal
Include in the Removed section of the changelog
labels
Apr 4, 2022
mtreinish
requested review from
a team,
nonhermitian,
nkanazawa1989,
eggerdj,
DanPuzzuoli,
jyu00,
manoelmarques,
woodsp-ibm and
ikkoham
as code owners
April 4, 2022 20:26
Pull Request Test Coverage Report for Build 2192587403
💛 - Coveralls |
jakelishman
reviewed
Apr 4, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one minor comment aside, this all looks like a very straightforwards removal (hopefully!), and it'll certainly be good to see the back of all this legacy code.
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Apr 4, 2022
This commit updates the documentation of the execute() function to clarify its purpose and intent. The execute() function is provided as a higher level abstraction and convenience function for use cases where you just want to execute a circuit and not worry about how it gets compiled for a particular backend. The set of options the function is minimal by design because it should just be about running circuits with no options needed and if you need to exert more control over the compilation you should use transpile() and backend.run() together instead. As part of this a large number of legacy kwargs defined on the function are deprecated as they are mostly holdovers from before the purpose of the function was clear and really are just needless duplication of transpile(), schedule(), and assemble() (even though this isn't used anymore after Qiskit#7886). Closes Qiskit#7640
Now that BaseBackend is no longer in qiskit we don't need to special handle the case where backend.version is not the interface version (since it was a method in BaseBackend). This commit drops the handling for this and uses the interface for the versioned interface as it was originally intended.
jakelishman
previously approved these changes
Apr 4, 2022
The tests were failing because one of the default values for getting the backend version attribute was None instead of 0 causing a type error when an integer was expected. This was not caught previously because the BaseBackend handling checked for non integer versions and converted those to 0. However, now without BaseBackend we need to be more explicit and use an integer for the backend interface version.
mtreinish
added a commit
to mtreinish/qiskit-aer
that referenced
this pull request
Apr 5, 2022
The BaseBackend class in qiskit-terra (along with the rest of the legacy provider interface) is deprecated and being removed soon in Qiskit/qiskit#7886. To avoid potential compatibility issues or deprecation warnings we shouldn't be using this class anymore. This commit removes the last 2 uses of these legacy classes to avoid issues moving forward.
hhorii
added a commit
to Qiskit/qiskit-aer
that referenced
this pull request
Apr 6, 2022
The BaseBackend class in qiskit-terra (along with the rest of the legacy provider interface) is deprecated and being removed soon in Qiskit/qiskit#7886. To avoid potential compatibility issues or deprecation warnings we shouldn't be using this class anymore. This commit removes the last 2 uses of these legacy classes to avoid issues moving forward. Co-authored-by: Hiroshi Horii <[email protected]>
mtreinish
added a commit
to hhorii/qiskit-aer
that referenced
this pull request
Apr 6, 2022
The BaseBackend class in qiskit-terra (along with the rest of the legacy provider interface) is deprecated and being removed soon in Qiskit/qiskit#7886. To avoid potential compatibility issues or deprecation warnings we shouldn't be using this class anymore. This commit removes the last 2 uses of these legacy classes to avoid issues moving forward. Co-authored-by: Hiroshi Horii <[email protected]> (cherry picked from commit 07a8532)
5 tasks
mtreinish
added a commit
to mtreinish/qiskit-core
that referenced
this pull request
Apr 8, 2022
This commit updates the FakeBackend and FakeBackendV2 classes (FakeLegacyBackend is being removed in Qiskit#7886) to only build a noise model from the stored properties one. This is done by initializing the internal simulator object only once at storing it as an instance attribute. The noise model is then constructed once at object initialization and used to update the backend at the same time. Fixes Qiskit#7500 Fixes Qiskit#7911
jakelishman
previously approved these changes
Apr 14, 2022
mergify bot
added a commit
that referenced
this pull request
Apr 19, 2022
* Initialize simulator at FakeBackend inititialization This commit updates the FakeBackend and FakeBackendV2 classes (FakeLegacyBackend is being removed in #7886) to only build a noise model from the stored properties one. This is done by initializing the internal simulator object only once at storing it as an instance attribute. The noise model is then constructed once at object initialization and used to update the backend at the same time. Fixes #7500 Fixes #7911 * Lazy load simulator backend objects and properties This commit fixes another regression introduced in the previous commit around the import and __init__ performance of fake backends. By parsing the properties payload and creating a noise model we significantly slowed down the initialization of fake backend objects. This commit fixes this by ensuring we are lazy loading the noise model and simulator object creation as well as not parsing the properties (or defaults) payloads until we actually need them. * Use qubit properties in target for backendv2 * Filter all noise model warnings Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot
pushed a commit
that referenced
this pull request
Apr 19, 2022
* Initialize simulator at FakeBackend inititialization This commit updates the FakeBackend and FakeBackendV2 classes (FakeLegacyBackend is being removed in #7886) to only build a noise model from the stored properties one. This is done by initializing the internal simulator object only once at storing it as an instance attribute. The noise model is then constructed once at object initialization and used to update the backend at the same time. Fixes #7500 Fixes #7911 * Lazy load simulator backend objects and properties This commit fixes another regression introduced in the previous commit around the import and __init__ performance of fake backends. By parsing the properties payload and creating a noise model we significantly slowed down the initialization of fake backend objects. This commit fixes this by ensuring we are lazy loading the noise model and simulator object creation as well as not parsing the properties (or defaults) payloads until we actually need them. * Use qubit properties in target for backendv2 * Filter all noise model warnings Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 57f16ab)
mergify bot
added a commit
that referenced
this pull request
Apr 19, 2022
* Initialize simulator at FakeBackend inititialization This commit updates the FakeBackend and FakeBackendV2 classes (FakeLegacyBackend is being removed in #7886) to only build a noise model from the stored properties one. This is done by initializing the internal simulator object only once at storing it as an instance attribute. The noise model is then constructed once at object initialization and used to update the backend at the same time. Fixes #7500 Fixes #7911 * Lazy load simulator backend objects and properties This commit fixes another regression introduced in the previous commit around the import and __init__ performance of fake backends. By parsing the properties payload and creating a noise model we significantly slowed down the initialization of fake backend objects. This commit fixes this by ensuring we are lazy loading the noise model and simulator object creation as well as not parsing the properties (or defaults) payloads until we actually need them. * Use qubit properties in target for backendv2 * Filter all noise model warnings Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> (cherry picked from commit 57f16ab) Co-authored-by: Matthew Treinish <[email protected]>
@mtreinish: looks like this had an unfortunate CI timeout, and now there's a merge conflict. |
jakelishman
approved these changes
Apr 19, 2022
ElePT
pushed a commit
to ElePT/qiskit
that referenced
this pull request
Jun 27, 2023
* Remove legacy providers interface This commit removes the legacy providers interface from terra. This includes the BaseBackend, BaseJob, BaseProvider abstract classes and everything that inherits from them in the tree. These classes were deprecated as part of qiskit-terra 0.18.0 and have been supersceded by the versioned provider interface and all providers should have migrated by now to these new supported interface. This also means we no longer support the qobj execution path and QuantumCircuit and Schedule objects are used directly everywhere for running. In the future we can look at deprecating and removing the assemble() function and qobj class in the future as nothing in tree is using them directly. But before we can deprecate these the IBM provider and aer will need to have native implementations. * Drop handling for incorrect backend.version in BaseBackend Now that BaseBackend is no longer in qiskit we don't need to special handle the case where backend.version is not the interface version (since it was a method in BaseBackend). This commit drops the handling for this and uses the interface for the versioned interface as it was originally intended. * Fix lint * Fix typo causing test failures The tests were failing because one of the default values for getting the backend version attribute was None instead of 0 causing a type error when an integer was expected. This was not caught previously because the BaseBackend handling checked for non integer versions and converted those to 0. However, now without BaseBackend we need to be more explicit and use an integer for the backend interface version. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-algorithms-test
that referenced
this pull request
Jul 17, 2023
* Remove legacy providers interface This commit removes the legacy providers interface from terra. This includes the BaseBackend, BaseJob, BaseProvider abstract classes and everything that inherits from them in the tree. These classes were deprecated as part of qiskit-terra 0.18.0 and have been supersceded by the versioned provider interface and all providers should have migrated by now to these new supported interface. This also means we no longer support the qobj execution path and QuantumCircuit and Schedule objects are used directly everywhere for running. In the future we can look at deprecating and removing the assemble() function and qobj class in the future as nothing in tree is using them directly. But before we can deprecate these the IBM provider and aer will need to have native implementations. * Drop handling for incorrect backend.version in BaseBackend Now that BaseBackend is no longer in qiskit we don't need to special handle the case where backend.version is not the interface version (since it was a method in BaseBackend). This commit drops the handling for this and uses the interface for the versioned interface as it was originally intended. * Fix lint * Fix typo causing test failures The tests were failing because one of the default values for getting the backend version attribute was None instead of 0 causing a type error when an integer was expected. This was not caught previously because the BaseBackend handling checked for non integer versions and converted those to 0. However, now without BaseBackend we need to be more explicit and use an integer for the backend interface version. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-algorithms
that referenced
this pull request
Jul 27, 2023
* Remove legacy providers interface This commit removes the legacy providers interface from terra. This includes the BaseBackend, BaseJob, BaseProvider abstract classes and everything that inherits from them in the tree. These classes were deprecated as part of qiskit-terra 0.18.0 and have been supersceded by the versioned provider interface and all providers should have migrated by now to these new supported interface. This also means we no longer support the qobj execution path and QuantumCircuit and Schedule objects are used directly everywhere for running. In the future we can look at deprecating and removing the assemble() function and qobj class in the future as nothing in tree is using them directly. But before we can deprecate these the IBM provider and aer will need to have native implementations. * Drop handling for incorrect backend.version in BaseBackend Now that BaseBackend is no longer in qiskit we don't need to special handle the case where backend.version is not the interface version (since it was a method in BaseBackend). This commit drops the handling for this and uses the interface for the versioned interface as it was originally intended. * Fix lint * Fix typo causing test failures The tests were failing because one of the default values for getting the backend version attribute was None instead of 0 causing a type error when an integer was expected. This was not caught previously because the BaseBackend handling checked for non integer versions and converted those to 0. However, now without BaseBackend we need to be more explicit and use an integer for the backend interface version. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-ibm-provider
that referenced
this pull request
Oct 4, 2023
* Remove legacy providers interface This commit removes the legacy providers interface from terra. This includes the BaseBackend, BaseJob, BaseProvider abstract classes and everything that inherits from them in the tree. These classes were deprecated as part of qiskit-terra 0.18.0 and have been supersceded by the versioned provider interface and all providers should have migrated by now to these new supported interface. This also means we no longer support the qobj execution path and QuantumCircuit and Schedule objects are used directly everywhere for running. In the future we can look at deprecating and removing the assemble() function and qobj class in the future as nothing in tree is using them directly. But before we can deprecate these the IBM provider and aer will need to have native implementations. * Drop handling for incorrect backend.version in BaseBackend Now that BaseBackend is no longer in qiskit we don't need to special handle the case where backend.version is not the interface version (since it was a method in BaseBackend). This commit drops the handling for this and uses the interface for the versioned interface as it was originally intended. * Fix lint * Fix typo causing test failures The tests were failing because one of the default values for getting the backend version attribute was None instead of 0 causing a type error when an integer was expected. This was not caught previously because the BaseBackend handling checked for non integer versions and converted those to 0. However, now without BaseBackend we need to be more explicit and use an integer for the backend interface version. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-ibm-provider
that referenced
this pull request
Oct 9, 2023
* Remove legacy providers interface This commit removes the legacy providers interface from terra. This includes the BaseBackend, BaseJob, BaseProvider abstract classes and everything that inherits from them in the tree. These classes were deprecated as part of qiskit-terra 0.18.0 and have been supersceded by the versioned provider interface and all providers should have migrated by now to these new supported interface. This also means we no longer support the qobj execution path and QuantumCircuit and Schedule objects are used directly everywhere for running. In the future we can look at deprecating and removing the assemble() function and qobj class in the future as nothing in tree is using them directly. But before we can deprecate these the IBM provider and aer will need to have native implementations. * Drop handling for incorrect backend.version in BaseBackend Now that BaseBackend is no longer in qiskit we don't need to special handle the case where backend.version is not the interface version (since it was a method in BaseBackend). This commit drops the handling for this and uses the interface for the versioned interface as it was originally intended. * Fix lint * Fix typo causing test failures The tests were failing because one of the default values for getting the backend version attribute was None instead of 0 causing a type error when an integer was expected. This was not caught previously because the BaseBackend handling checked for non integer versions and converted those to 0. However, now without BaseBackend we need to be more explicit and use an integer for the backend interface version. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit-ibm-runtime
that referenced
this pull request
Oct 10, 2023
* Remove legacy providers interface This commit removes the legacy providers interface from terra. This includes the BaseBackend, BaseJob, BaseProvider abstract classes and everything that inherits from them in the tree. These classes were deprecated as part of qiskit-terra 0.18.0 and have been supersceded by the versioned provider interface and all providers should have migrated by now to these new supported interface. This also means we no longer support the qobj execution path and QuantumCircuit and Schedule objects are used directly everywhere for running. In the future we can look at deprecating and removing the assemble() function and qobj class in the future as nothing in tree is using them directly. But before we can deprecate these the IBM provider and aer will need to have native implementations. * Drop handling for incorrect backend.version in BaseBackend Now that BaseBackend is no longer in qiskit we don't need to special handle the case where backend.version is not the interface version (since it was a method in BaseBackend). This commit drops the handling for this and uses the interface for the versioned interface as it was originally intended. * Fix lint * Fix typo causing test failures The tests were failing because one of the default values for getting the backend version attribute was None instead of 0 causing a type error when an integer was expected. This was not caught previously because the BaseBackend handling checked for non integer versions and converted those to 0. However, now without BaseBackend we need to be more explicit and use an integer for the backend interface version. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT
pushed a commit
to ElePT/qiskit
that referenced
this pull request
Oct 12, 2023
* Remove legacy providers interface This commit removes the legacy providers interface from terra. This includes the BaseBackend, BaseJob, BaseProvider abstract classes and everything that inherits from them in the tree. These classes were deprecated as part of qiskit-terra 0.18.0 and have been supersceded by the versioned provider interface and all providers should have migrated by now to these new supported interface. This also means we no longer support the qobj execution path and QuantumCircuit and Schedule objects are used directly everywhere for running. In the future we can look at deprecating and removing the assemble() function and qobj class in the future as nothing in tree is using them directly. But before we can deprecate these the IBM provider and aer will need to have native implementations. * Drop handling for incorrect backend.version in BaseBackend Now that BaseBackend is no longer in qiskit we don't need to special handle the case where backend.version is not the interface version (since it was a method in BaseBackend). This commit drops the handling for this and uses the interface for the versioned interface as it was originally intended. * Fix lint * Fix typo causing test failures The tests were failing because one of the default values for getting the backend version attribute was None instead of 0 causing a type error when an integer was expected. This was not caught previously because the BaseBackend handling checked for non integer versions and converted those to 0. However, now without BaseBackend we need to be more explicit and use an integer for the backend interface version. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Changelog: Deprecation
Include in "Deprecated" section of changelog
Changelog: Removal
Include in the Removed section of the changelog
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This commit removes the legacy providers interface from terra. This
includes the BaseBackend, BaseJob, BaseProvider abstract classes and
everything that inherits from them in the tree. These classes were
deprecated as part of qiskit-terra 0.18.0 and have been supersceded by
the versioned provider interface and all providers should have migrated
by now to these new supported interface. This also means we no longer
support the qobj execution path and QuantumCircuit and Schedule objects
are used directly everywhere for running. In the future we can look at
deprecating and removing the assemble() function and qobj class in the
future as nothing in tree is using them directly. But before we can
deprecate these the IBM provider and aer will need to have native
implementations.
Details and comments