-
Notifications
You must be signed in to change notification settings - Fork 3k
Remove Provider ABC (deprecated in 1.1) #13435
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6fce51b
Remove provider class, deprecated in 1.1
1ucian0 5099f6e
Merge branch 'main' of github.com:Qiskit/qiskit-terra into remove/121…
1ucian0 e8d6ba9
remove deprecated Provider ABC https://github.com/Qiskit/qiskit/pull/…
1ucian0 fc91132
reno
1ucian0 67498d5
Merge branch 'main' of github.com:Qiskit/qiskit-terra into remove/121…
1ucian0 59ca691
implement get_backend locally
1ucian0 b6aebdc
test/python/providers/basic_provider/test_basic_provider_backends.py
1ucian0 7a18eea
fix docs
1ucian0 d651919
Merge branch 'main' into remove/12145/1
1ucian0 f3d9160
Merge branch 'main' into remove/12145/1
1ucian0 11c7c38
Merge branch 'main' into remove/12145/1
1ucian0 7fabceb
Merge branch 'main' into remove/12145/1
1ucian0 87c7c52
Merge branch 'main' into remove/12145/1
1ucian0 8bc7e1a
Merge branch 'main' into remove/12145/1
1ucian0 226bbec
lint
1ucian0 828a9ef
Merge branch 'main' into remove/12145/1
1ucian0 18d3eb6
Merge branch 'main' into remove/12145/1
mtreinish 3a8a5ca
Apply suggestions from code review
mtreinish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file contains hidden or 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 file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
releasenotes/notes/remove_provider_abc-87b611c223311a40.yaml
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --- | ||
| upgrade_providers: | ||
| - | | ||
| The abstract base classes ``Provider`` and ``ProviderV1`` have been deprecated since Qiskit 1.1 and they are now removed. | ||
| The abstraction provided by these interface definitions were not providing a huge value, solely just the attributes | ||
| ``name``, ``backends``, and a ``get_backend()``. A _provider_, as a concept, will continue existing as a collection | ||
|
mtreinish marked this conversation as resolved.
Outdated
|
||
| of backends. If you're implementing a provider currently you can adjust your | ||
| code by simply removing ``ProviderV1`` as the parent class of your | ||
| implementation. As part of this you probably would want to add an | ||
| implementation of ``get_backend`` for backwards compatibility. For example:: | ||
| def get_backend(self, name=None, **kwargs): | ||
| backend = self.backends(name, **kwargs) | ||
| if len(backends) > 1: | ||
| raise QiskitBackendNotFoundError("More than one backend matches the criteria") | ||
| if not backends: | ||
| raise QiskitBackendNotFoundError("No backend matches the criteria") | ||
| return backends[0] | ||
This file contains hidden or 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 file contains hidden or 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 file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.