-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate fake provider class and device-specific fake backends. Leav…
…e fake backend base classes and special fake backends for testing purposes.
- Loading branch information
Showing
23 changed files
with
280 additions
and
52 deletions.
There are no files selected for viewing
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 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 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 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 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 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 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 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 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 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
50 changes: 50 additions & 0 deletions
50
releasenotes/notes/deprecate-fake-backends-4dd275cf9a30d41f.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
deprecations: | ||
- | | ||
The core functionality of the :mod:`qiskit.providers.fake_provider` module has been migrated to | ||
the new ``qiskit_ibm_runtime.fake_provider`` module. For this reason, the following elements in | ||
the :mod:`qiskit.providers.fake_provider` have been deprecated as of Qiskit 0.46 and will be | ||
removed in Qiskit 1.0: | ||
* :class:`qiskit.providers.fake_provider.FakeProvider` | ||
* :class:`qiskit.providers.fake_provider.FakeProviderForBackendV2` | ||
* :class:`qiskit.providers.fake_provider.FakeProviderFactory` | ||
* any fake backend contained in :class:`qiskit.providers.fake_provider.backends` | ||
(accesible through the provider) | ||
* :class:`qiskit.providers.fake_provider.FakeQasmSimulator` | ||
* :class:`qiskit.providers.fake_provider.FakeJob` | ||
* :class:`qiskit.providers.fake_provider.FakeQobj` | ||
Migration example to the new fake provider:: | ||
# Legacy path | ||
from qiskit.providers.fake_provider import FakeProvider, FakeSherbrooke | ||
backend1 = FakeProvider().get_backend("fake_ourense") | ||
backend2 = FakeSherbrooke() | ||
# New path | ||
# run "pip install qiskit-ibm-runtime" | ||
from qiskit_ibm_runtime.fake_provider import FakeProvider, FakeSherbrooke | ||
backend1 = FakeProvider().get_backend("fake_ourense") | ||
backend2 = FakeSherbrooke() | ||
Additionally, the following fake backends designed for special testing purposes have been superseded | ||
by the new :class:`.GenericBackendV2` class, and are also deprecated as of Qiskit 0.46: | ||
* :class:`qiskit.providers.fake_provider.fake_backend_v2.FakeBackendV2` | ||
* :class:`qiskit.providers.fake_provider.fake_backend_v2.FakeBackendV2LegacyQubitProps` | ||
* :class:`qiskit.providers.fake_provider.fake_backend_v2.FakeBackend5QV2` | ||
* :class:`qiskit.providers.fake_provider.fake_backend_v2.FakeBackendSimple` | ||
Migration example to the new :class:`.GenericBackendV2` class:: | ||
# Legacy path | ||
from qiskit.providers.fake_provider import FakeBackend5QV2 | ||
backend = FakeBackend5QV2() | ||
# New path | ||
from qiskit.providers.fake_provider import GenericBackendV2 | ||
backend = GenericBackendV2(num_qubits=5) | ||
# note that this class will generate 5q backend with generic | ||
# properties that serves the same purpose as FakeBackend5QV2 | ||
# but will generate different results |
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 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
Oops, something went wrong.