From db3f98f803578283e0a2cde089e9d56f5ce205d9 Mon Sep 17 00:00:00 2001 From: Will Shanks Date: Tue, 23 Jan 2024 14:34:54 -0500 Subject: [PATCH] Switch tests and documentation to use qiskit-ibm-runtime fake backends The IBM-specific fake backends in Qiskit are being removed in Qiskit 1.0 in https://github.com/Qiskit/qiskit/pull/11376. The same fake backends have been moved to qiskit-ibm-runtime in https://github.com/Qiskit/qiskit-ibm-runtime/pull/1140 and follow up PRs. Here the `qiskit` imports are replaced with `qiskit-ibm-runtime` imports in order to provide a smooth transition between Qiskit 0.45 and Qiskit 1.0. In the future, it may be preferable to use generic fake backends maintained in the repo and not depend on `qiskit-ibm-runtime` for them. Additionally, this commit reorders the requirements-dev.txt file so it is easier to read and adds qiskit-ibm-runtime as a development dependency. --- .../characterization/stark_experiment.rst | 8 +++-- docs/manuals/characterization/t1.rst | 7 ++-- docs/manuals/characterization/t2ramsey.rst | 7 ++-- docs/manuals/characterization/tphi.rst | 7 ++-- .../measurement/readout_mitigation.rst | 7 ++-- .../measurement/restless_measurements.rst | 7 +++- docs/manuals/verification/quantum_volume.rst | 11 +++--- .../verification/randomized_benchmarking.rst | 7 +++- .../manuals/verification/state_tomography.rst | 7 ++-- docs/tutorials/getting_started.rst | 11 +++--- docs/tutorials/visualization.rst | 7 ++-- requirements-dev.txt | 35 ++++++++++++------- test/calibration/test_calibrations.py | 2 +- test/calibration/test_update_library.py | 2 +- .../test_db_experiment_data.py | 2 +- test/framework/test_backend_timing.py | 2 +- test/framework/test_framework.py | 3 +- test/library/calibration/test_drag.py | 2 +- .../calibration/test_fine_amplitude.py | 2 +- test/library/calibration/test_fine_drag.py | 2 +- .../calibration/test_fine_frequency.py | 2 +- test/library/calibration/test_ramsey_xy.py | 2 +- .../test_cross_resonance_hamiltonian.py | 2 +- .../characterization/test_half_angle.py | 2 +- .../test_qubit_spectroscopy.py | 2 +- .../characterization/test_readout_error.py | 4 +-- .../characterization/test_stark_p1_spect.py | 2 +- .../characterization/test_stark_ramsey_xy.py | 2 +- test/library/characterization/test_t1.py | 2 +- test/library/characterization/test_t2hahn.py | 2 +- .../library/characterization/test_t2ramsey.py | 2 +- .../characterization/test_zz_ramsey.py | 2 +- .../test_interleaved_rb.py | 2 +- .../test_standard_rb.py | 4 +-- 34 files changed, 101 insertions(+), 69 deletions(-) diff --git a/docs/manuals/characterization/stark_experiment.rst b/docs/manuals/characterization/stark_experiment.rst index 691171cd67..2baa2747dd 100644 --- a/docs/manuals/characterization/stark_experiment.rst +++ b/docs/manuals/characterization/stark_experiment.rst @@ -112,9 +112,13 @@ drive port of the qubit. In a typical IBM device using the cross-resonance drive architecture, such channel can be identified with your backend as follows: +.. note:: + This tutorial requires the :mod:`qiskit_ibm_runtime` package to model a + backend. You can install it with ``python -m pip install qiskit-ibm-runtime``. + .. jupyter-execute:: - from qiskit.providers.fake_provider import FakeHanoiV2 + from qiskit_ibm_runtime.fake_provider import FakeHanoiV2 backend = FakeHanoiV2() qubit = 0 @@ -143,7 +147,7 @@ by a variant of the Hahn-echo pulse sequence [5]_. from qiskit_experiments.library import StarkRamseyXY from qiskit import schedule, pulse - from qiskit.providers.fake_provider import FakeHanoi + from qiskit_ibm_runtime.fake_provider import FakeHanoi from qiskit.visualization.pulse_v2 import IQXSimple backend = FakeHanoi() diff --git a/docs/manuals/characterization/t1.rst b/docs/manuals/characterization/t1.rst index 8a926e9254..d54f4ee99b 100644 --- a/docs/manuals/characterization/t1.rst +++ b/docs/manuals/characterization/t1.rst @@ -30,8 +30,9 @@ The following code demonstrates a basic run of a :math:`T_1` experiment for qubit 0. .. note:: - This manual requires the :mod:`qiskit_aer` package to run simulations. - You can install it with ``python -m pip install qiskit-aer``. + This tutorial requires the :mod:`qiskit_aer` and :mod:`qiskit_ibm_runtime` + packages to run simulations. You can install them with ``python -m pip + install qiskit-aer qiskit-ibm-runtime``. .. jupyter-execute:: @@ -42,9 +43,9 @@ for qubit 0. from qiskit_experiments.library.characterization.analysis.t1_analysis import T1KerneledAnalysis # A T1 simulator - from qiskit.providers.fake_provider import FakePerth from qiskit_aer import AerSimulator from qiskit_aer.noise import NoiseModel + from qiskit_ibm_runtime.fake_provider import FakePerth # A kerneled data simulator from qiskit_experiments.test.mock_iq_backend import MockIQBackend diff --git a/docs/manuals/characterization/t2ramsey.rst b/docs/manuals/characterization/t2ramsey.rst index 6e404d9be4..76b80f2828 100644 --- a/docs/manuals/characterization/t2ramsey.rst +++ b/docs/manuals/characterization/t2ramsey.rst @@ -58,13 +58,14 @@ We run the experiment on a simulated backend using Qiskit Aer with a pure T1/T2 relaxation noise model. .. note:: - This manual requires the :mod:`qiskit_aer` package to run simulations. - You can install it with ``python -m pip install qiskit-aer``. + This tutorial requires the :mod:`qiskit_aer` and :mod:`qiskit_ibm_runtime` + packages to run simulations. You can install them with ``python -m pip + install qiskit-aer qiskit-ibm-runtime``. .. jupyter-execute:: # A T1 simulator - from qiskit.providers.fake_provider import FakePerth + from qiskit_ibm_runtime.fake_provider import FakePerth from qiskit_aer import AerSimulator from qiskit_aer.noise import NoiseModel diff --git a/docs/manuals/characterization/tphi.rst b/docs/manuals/characterization/tphi.rst index 3e0f25503e..7c4e7c02fe 100644 --- a/docs/manuals/characterization/tphi.rst +++ b/docs/manuals/characterization/tphi.rst @@ -21,8 +21,9 @@ From the :math:`T_1` and :math:`T_2` estimates, we compute the results for :math:`T_\varphi.` .. note:: - This manual requires the :mod:`qiskit_aer` package to run simulations. - You can install it with ``python -m pip install qiskit-aer``. + This tutorial requires the :mod:`qiskit_aer` and :mod:`qiskit_ibm_runtime` + packages to run simulations. You can install them with ``python -m pip + install qiskit-aer qiskit-ibm-runtime``. .. jupyter-execute:: @@ -31,9 +32,9 @@ From the :math:`T_1` and :math:`T_2` estimates, we compute the results for from qiskit_experiments.library.characterization import Tphi # An Aer simulator - from qiskit.providers.fake_provider import FakePerth from qiskit_aer import AerSimulator from qiskit_aer.noise import NoiseModel + from qiskit_ibm_runtime.fake_provider import FakePerth # Create a pure relaxation noise model for AerSimulator noise_model = NoiseModel.from_backend( diff --git a/docs/manuals/measurement/readout_mitigation.rst b/docs/manuals/measurement/readout_mitigation.rst index 0fed52b920..336e68c2e9 100644 --- a/docs/manuals/measurement/readout_mitigation.rst +++ b/docs/manuals/measurement/readout_mitigation.rst @@ -31,8 +31,9 @@ This notebook demonstrates the usage of both the local and correlated experiments to generate the corresponding mitigators. .. note:: - This manual requires the :mod:`qiskit_aer` package to run simulations. - You can install it with ``python -m pip install qiskit-aer``. + This tutorial requires the :mod:`qiskit_aer` and :mod:`qiskit_ibm_runtime` + packages to run simulations. You can install them with ``python -m pip + install qiskit-aer qiskit-ibm-runtime``. .. jupyter-execute:: @@ -43,7 +44,7 @@ experiments to generate the corresponding mitigators. from qiskit_experiments.library import LocalReadoutError, CorrelatedReadoutError from qiskit_aer import AerSimulator - from qiskit.providers.fake_provider import FakePerth + from qiskit_ibm_runtime.fake_provider import FakePerth from qiskit.result.mitigation.utils import ( expval_with_stddev, diff --git a/docs/manuals/measurement/restless_measurements.rst b/docs/manuals/measurement/restless_measurements.rst index c62fe75d27..df3ea69cdb 100644 --- a/docs/manuals/measurement/restless_measurements.rst +++ b/docs/manuals/measurement/restless_measurements.rst @@ -58,15 +58,20 @@ a fake backend and a rough DRAG experiment. Note however, that you will not observe any meaningful outcomes with fake backends since the circuit simulator they use always starts with the qubits in the ground state. +.. note:: + This tutorial requires the :mod:`qiskit_ibm_runtime` package to model a + backend. You can install it with ``python -m pip install qiskit-ibm-runtime``. + .. jupyter-execute:: + from qiskit_ibm_runtime.fake_provider import FakePerth + from qiskit_experiments.library import RoughDragCal from qiskit_experiments.calibration_management import ( Calibrations, FixedFrequencyTransmon, ) from qiskit_experiments.data_processing.data_processor import DataProcessor - from qiskit.providers.fake_provider import FakePerth # replace this lines with an IBM Quantum backend to run the experiment. backend = FakePerth() diff --git a/docs/manuals/verification/quantum_volume.rst b/docs/manuals/verification/quantum_volume.rst index 2b01b515fa..080c75b08a 100644 --- a/docs/manuals/verification/quantum_volume.rst +++ b/docs/manuals/verification/quantum_volume.rst @@ -25,18 +25,19 @@ probability` > 2/3 with confidence level > 0.977 (corresponding to z_value = 2), and at least 100 trials have been ran. .. note:: - This manual requires the :mod:`qiskit_aer` package to run simulations. - You can install it with ``python -m pip install qiskit-aer``. + This tutorial requires the :mod:`qiskit_aer` and :mod:`qiskit_ibm_runtime` + packages to run simulations. You can install them with ``python -m pip + install qiskit-aer qiskit-ibm-runtime``. .. jupyter-execute:: from qiskit_experiments.framework import BatchExperiment from qiskit_experiments.library import QuantumVolume - from qiskit import Aer - from qiskit_aer import AerSimulator # For simulation - from qiskit.providers.fake_provider import FakeSydneyV2 + from qiskit import Aer + from qiskit_aer import AerSimulator + from qiskit_ibm_runtime.fake_provider import FakeSydneyV2 backend = AerSimulator.from_backend(FakeSydneyV2()) diff --git a/docs/manuals/verification/randomized_benchmarking.rst b/docs/manuals/verification/randomized_benchmarking.rst index 111e3f5ddc..e8c1ffe9bb 100644 --- a/docs/manuals/verification/randomized_benchmarking.rst +++ b/docs/manuals/verification/randomized_benchmarking.rst @@ -11,6 +11,11 @@ error estimates for the quantum device, by calculating the Error Per Clifford. S `__ for an explanation on the RB method, which is based on Refs. [1]_ [2]_. +.. note:: + This tutorial requires the :mod:`qiskit_aer` and :mod:`qiskit_ibm_runtime` + packages to run simulations. You can install them with ``python -m pip + install qiskit-aer qiskit-ibm-runtime``. + .. jupyter-execute:: import numpy as np @@ -20,7 +25,7 @@ explanation on the RB method, which is based on Refs. [1]_ [2]_. # For simulation from qiskit_aer import AerSimulator - from qiskit.providers.fake_provider import FakePerth + from qiskit_ibm_runtime.fake_provider import FakePerth backend = AerSimulator.from_backend(FakePerth()) diff --git a/docs/manuals/verification/state_tomography.rst b/docs/manuals/verification/state_tomography.rst index f207365756..7db399c400 100644 --- a/docs/manuals/verification/state_tomography.rst +++ b/docs/manuals/verification/state_tomography.rst @@ -8,15 +8,16 @@ of a quantum state by preparing the state many times and measuring them in a tom complete basis of measurement operators. .. note:: - This tutorial requires the :mod:`qiskit_aer` package for simulations. - You can install it with ``python -m pip install qiskit-aer``. + This tutorial requires the :mod:`qiskit_aer` and :mod:`qiskit_ibm_runtime` + packages to run simulations. You can install them with ``python -m pip + install qiskit-aer qiskit-ibm-runtime``. We first initialize a simulator to run the experiments on. .. jupyter-execute:: from qiskit_aer import AerSimulator - from qiskit.providers.fake_provider import FakePerth + from qiskit_ibm_runtime.fake_provider import FakePerth backend = AerSimulator.from_backend(FakePerth()) diff --git a/docs/tutorials/getting_started.rst b/docs/tutorials/getting_started.rst index d702f0d72b..51fa8d9719 100644 --- a/docs/tutorials/getting_started.rst +++ b/docs/tutorials/getting_started.rst @@ -54,16 +54,17 @@ the experiment from the Qiskit Experiments library: from qiskit_experiments.library import T1 Experiments must be run on a backend. We're going to use a simulator, -:class:`~qiskit.providers.fake_provider.FakePerth`, for this example, but you can use any +:class:`~qiskit_ibm_runtime.fake_provider.FakePerth`, for this example, but you can use any backend, real or simulated, that you can access through Qiskit. .. note:: - This tutorial requires the :mod:`qiskit_aer` package to run simulations. - You can install it with ``python -m pip install qiskit-aer``. + This tutorial requires the :mod:`qiskit_aer` and :mod:`qiskit_ibm_runtime` + packages to run simulations. You can install them with ``python -m pip + install qiskit-aer qiskit-ibm-runtime``. .. jupyter-execute:: - from qiskit.providers.fake_provider import FakePerth + from qiskit_ibm_runtime.fake_provider import FakePerth from qiskit_aer import AerSimulator backend = AerSimulator.from_backend(FakePerth()) @@ -419,4 +420,4 @@ Use the `broadcast` parameter to set analysis options to each of the child exper If the child experiment inherits from :class:`.CompositeExperiment` (such as :class:`.ParallelExperiment` and :class:`.BatchExperiment` classes), this process will continue to work recursively. -In this instance, the analysis will not generate a figure for the child experiment after the analysis. \ No newline at end of file +In this instance, the analysis will not generate a figure for the child experiment after the analysis. diff --git a/docs/tutorials/visualization.rst b/docs/tutorials/visualization.rst index 1c8b5ef05d..06bc880942 100644 --- a/docs/tutorials/visualization.rst +++ b/docs/tutorials/visualization.rst @@ -34,8 +34,9 @@ Generating and customizing a figure using a plotter First, we display the default figure from a :class:`.Rabi` experiment as a starting point: .. note:: - This tutorial requires the :mod:`qiskit_dynamics` package to run simulations. - You can install it with ``python -m pip install qiskit-dynamics``. + This tutorial requires the :mod:`qiskit_dynamics`, :mod:`qiskit_aer`, and + :mod:`qiskit_ibm_runtime` packages to run simulations. You can install them + with ``python -m pip install qiskit-dynamics qiskit-aer qiskit-ibm-runtime``. .. jupyter-execute:: @@ -191,8 +192,8 @@ until now in this tutorial: .. jupyter-execute:: from qiskit_experiments.library import T1 - from qiskit.providers.fake_provider import FakePerth from qiskit_aer import AerSimulator + from qiskit_ibm_runtime.fake_provider import FakePerth backend = AerSimulator.from_backend(FakePerth()) diff --git a/requirements-dev.txt b/requirements-dev.txt index df9b3f3a08..ec26f84fe8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,25 +1,34 @@ +# Linters black~=22.0 +pylint~=3.0.2 +astroid~=3.0.1 # Must be kept aligned to what pylint wants + +# Test runner tools +coverage>=5.5 +ddt>=1.6.0 fixtures stestr testtools -pylint~=3.0.2 -astroid~=3.0.1 # Must be kept aligned to what pylint wants + +# Extra dependencies for tests/documentation code +multimethod +qiskit-ibm-runtime>=0.18 + +# Documentation tools +arxiv jinja2==3.0.3 -sphinx>=6.2.1,<=7 jupyter-sphinx>=0.4.0 -qiskit-sphinx-theme~=1.14.0rc1 -sphinx-design~=0.4.1 -pygments>=2.4 -reno>=4.0.0 nbsphinx -arxiv -ddt>=1.6.0 +pygments>=2.4 pylatexenc -multimethod +qiskit-sphinx-theme~=1.14.0rc1 +reno>=4.0.0 +sphinx>=6.2.1,<=7 sphinx-copybutton -coverage>=5.5 +sphinx-design~=0.4.1 +sphinx-remove-toctrees + # Pin versions below because of build errors ipykernel<=6.21.3 -jupyter-client<=8.0.3 ipython<8.13.0 ; python_version<"3.9" # for python 3.8 compatibility -sphinx-remove-toctrees +jupyter-client<=8.0.3 diff --git a/test/calibration/test_calibrations.py b/test/calibration/test_calibrations.py index 9cbdab4c46..101aaee270 100644 --- a/test/calibration/test_calibrations.py +++ b/test/calibration/test_calibrations.py @@ -37,7 +37,7 @@ from qiskit.circuit.library import CXGate, XGate from qiskit.pulse.transforms import inline_subroutines, block_to_schedule from qiskit.providers import BackendV2, Options -from qiskit.providers.fake_provider import FakeArmonkV2, FakeBelemV2 +from qiskit_ibm_runtime.fake_provider import FakeArmonkV2, FakeBelemV2 from qiskit.transpiler import Target from qiskit_experiments.framework import BackendData diff --git a/test/calibration/test_update_library.py b/test/calibration/test_update_library.py index 0cc8186dfc..027b21b511 100644 --- a/test/calibration/test_update_library.py +++ b/test/calibration/test_update_library.py @@ -14,8 +14,8 @@ from test.base import QiskitExperimentsTestCase import numpy as np -from qiskit.providers.fake_provider import FakeAthensV2 from qiskit.qobj.utils import MeasLevel +from qiskit_ibm_runtime.fake_provider import FakeAthensV2 from qiskit_experiments.framework import BackendData from qiskit_experiments.library import QubitSpectroscopy diff --git a/test/database_service/test_db_experiment_data.py b/test/database_service/test_db_experiment_data.py index 003d21af0f..f2eb765668 100644 --- a/test/database_service/test_db_experiment_data.py +++ b/test/database_service/test_db_experiment_data.py @@ -29,7 +29,7 @@ import matplotlib.pyplot as plt import numpy as np -from qiskit.providers.fake_provider import FakeMelbourneV2 +from qiskit_ibm_runtime.fake_provider import FakeMelbourneV2 from qiskit.result import Result from qiskit.providers import JobV1 as Job from qiskit.providers import JobStatus diff --git a/test/framework/test_backend_timing.py b/test/framework/test_backend_timing.py index c270795069..a7951b2c21 100644 --- a/test/framework/test_backend_timing.py +++ b/test/framework/test_backend_timing.py @@ -16,7 +16,7 @@ from ddt import data, ddt, unpack from qiskit import QiskitError -from qiskit.providers.fake_provider import FakeNairobiV2 +from qiskit_ibm_runtime.fake_provider import FakeNairobiV2 from qiskit_experiments.framework import BackendTiming diff --git a/test/framework/test_framework.py b/test/framework/test_framework.py index 105a5ffdf5..0d52da1d84 100644 --- a/test/framework/test_framework.py +++ b/test/framework/test_framework.py @@ -19,9 +19,10 @@ import ddt from qiskit import QuantumCircuit -from qiskit.providers.fake_provider import FakeVigoV2, FakeJob +from qiskit.providers.fake_provider import FakeJob from qiskit.providers.jobstatus import JobStatus from qiskit.exceptions import QiskitError +from qiskit_ibm_runtime.fake_provider import FakeVigoV2 from qiskit_experiments.exceptions import AnalysisError from qiskit_experiments.framework import ( diff --git a/test/library/calibration/test_drag.py b/test/library/calibration/test_drag.py index b66e735f3b..d870b83d3a 100644 --- a/test/library/calibration/test_drag.py +++ b/test/library/calibration/test_drag.py @@ -20,9 +20,9 @@ from qiskit import pulse from qiskit.circuit import Parameter from qiskit.exceptions import QiskitError -from qiskit.providers.fake_provider import FakeWashingtonV2 from qiskit.pulse import DriveChannel, Drag from qiskit.qobj.utils import MeasLevel +from qiskit_ibm_runtime.fake_provider import FakeWashingtonV2 from qiskit_experiments.library import RoughDrag, RoughDragCal from qiskit_experiments.library.characterization.analysis import DragCalAnalysis diff --git a/test/library/calibration/test_fine_amplitude.py b/test/library/calibration/test_fine_amplitude.py index 659e0f758a..7608f434b5 100644 --- a/test/library/calibration/test_fine_amplitude.py +++ b/test/library/calibration/test_fine_amplitude.py @@ -18,8 +18,8 @@ from qiskit import pulse from qiskit.circuit import Gate from qiskit.circuit.library import XGate, SXGate -from qiskit.providers.fake_provider import FakeArmonkV2 from qiskit.pulse import DriveChannel, Drag +from qiskit_ibm_runtime.fake_provider import FakeArmonkV2 from qiskit_experiments.library import ( FineXAmplitude, diff --git a/test/library/calibration/test_fine_drag.py b/test/library/calibration/test_fine_drag.py index 818152c07d..f592008c17 100644 --- a/test/library/calibration/test_fine_drag.py +++ b/test/library/calibration/test_fine_drag.py @@ -17,7 +17,7 @@ from qiskit import pulse from qiskit.circuit import Gate -from qiskit.providers.fake_provider import FakeArmonkV2 +from qiskit_ibm_runtime.fake_provider import FakeArmonkV2 from qiskit_experiments.library import FineDrag, FineXDrag, FineDragCal from qiskit_experiments.test.mock_iq_backend import MockIQBackend diff --git a/test/library/calibration/test_fine_frequency.py b/test/library/calibration/test_fine_frequency.py index 87aa30a175..e6d6f78d1d 100644 --- a/test/library/calibration/test_fine_frequency.py +++ b/test/library/calibration/test_fine_frequency.py @@ -17,7 +17,7 @@ from ddt import ddt, data from qiskit import pulse -from qiskit.providers.fake_provider import FakeArmonkV2 +from qiskit_ibm_runtime.fake_provider import FakeArmonkV2 from qiskit_experiments.library import ( FineFrequency, diff --git a/test/library/calibration/test_ramsey_xy.py b/test/library/calibration/test_ramsey_xy.py index 76bd953211..43ba1dbf67 100644 --- a/test/library/calibration/test_ramsey_xy.py +++ b/test/library/calibration/test_ramsey_xy.py @@ -16,8 +16,8 @@ from test.base import QiskitExperimentsTestCase from ddt import ddt, data, named_data -from qiskit.providers.fake_provider import FakeArmonkV2 from qiskit_aer import AerSimulator +from qiskit_ibm_runtime.fake_provider import FakeArmonkV2 from qiskit_experiments.calibration_management.calibrations import Calibrations from qiskit_experiments.calibration_management.basis_gate_library import FixedFrequencyTransmon diff --git a/test/library/characterization/test_cross_resonance_hamiltonian.py b/test/library/characterization/test_cross_resonance_hamiltonian.py index 540c0e0dc4..db457d9c01 100644 --- a/test/library/characterization/test_cross_resonance_hamiltonian.py +++ b/test/library/characterization/test_cross_resonance_hamiltonian.py @@ -20,7 +20,7 @@ import numpy as np from ddt import ddt, data, unpack from qiskit import QuantumCircuit, pulse, qpy, quantum_info as qi -from qiskit.providers.fake_provider import FakeBogotaV2 +from qiskit_ibm_runtime.fake_provider import FakeBogotaV2 # TODO: remove old path after we stop supporting the relevant version of Qiskit try: diff --git a/test/library/characterization/test_half_angle.py b/test/library/characterization/test_half_angle.py index e90c6b6d96..d131fcae99 100644 --- a/test/library/characterization/test_half_angle.py +++ b/test/library/characterization/test_half_angle.py @@ -16,8 +16,8 @@ import copy from qiskit import pulse, transpile -from qiskit.providers.fake_provider import FakeAthens from qiskit.pulse import InstructionScheduleMap +from qiskit_ibm_runtime.fake_provider import FakeAthens from qiskit_experiments.test.mock_iq_backend import MockIQBackend from qiskit_experiments.test.mock_iq_helpers import MockIQHalfAngleHelper as HalfAngleHelper diff --git a/test/library/characterization/test_qubit_spectroscopy.py b/test/library/characterization/test_qubit_spectroscopy.py index 12ae08a4a5..8dc52bfeb9 100644 --- a/test/library/characterization/test_qubit_spectroscopy.py +++ b/test/library/characterization/test_qubit_spectroscopy.py @@ -16,7 +16,7 @@ from qiskit.qobj.utils import MeasLevel from qiskit.circuit.library import XGate -from qiskit.providers.fake_provider import FakeWashingtonV2 +from qiskit_ibm_runtime.fake_provider import FakeWashingtonV2 from qiskit_experiments.framework import ParallelExperiment from qiskit_experiments.framework import BackendData diff --git a/test/library/characterization/test_readout_error.py b/test/library/characterization/test_readout_error.py index ef4107d413..0e32e75d0e 100644 --- a/test/library/characterization/test_readout_error.py +++ b/test/library/characterization/test_readout_error.py @@ -19,9 +19,9 @@ from test.base import QiskitExperimentsTestCase import numpy as np from qiskit.quantum_info.operators.predicates import matrix_equal -from qiskit.providers.fake_provider import FakeParisV2 -from qiskit_ibm_experiment import IBMExperimentService from qiskit_aer import AerSimulator +from qiskit_ibm_experiment import IBMExperimentService +from qiskit_ibm_runtime.fake_provider import FakeParisV2 from qiskit_experiments.library.characterization import LocalReadoutError, CorrelatedReadoutError from qiskit_experiments.framework import ExperimentData from qiskit_experiments.framework import ParallelExperiment diff --git a/test/library/characterization/test_stark_p1_spect.py b/test/library/characterization/test_stark_p1_spect.py index e3a4f9e2cc..dacf65b549 100644 --- a/test/library/characterization/test_stark_p1_spect.py +++ b/test/library/characterization/test_stark_p1_spect.py @@ -18,7 +18,7 @@ from qiskit import pulse from qiskit.circuit import QuantumCircuit, Gate from qiskit.providers import QubitProperties -from qiskit.providers.fake_provider import FakeHanoiV2 +from qiskit_ibm_runtime.fake_provider import FakeHanoiV2 from qiskit_experiments.framework import ExperimentData, AnalysisResultData from qiskit_experiments.library import StarkP1Spectroscopy diff --git a/test/library/characterization/test_stark_ramsey_xy.py b/test/library/characterization/test_stark_ramsey_xy.py index 795fde5297..895f983301 100644 --- a/test/library/characterization/test_stark_ramsey_xy.py +++ b/test/library/characterization/test_stark_ramsey_xy.py @@ -18,7 +18,7 @@ from ddt import ddt, unpack, named_data from qiskit import pulse -from qiskit.providers.fake_provider import FakeHanoiV2 +from qiskit_ibm_runtime.fake_provider import FakeHanoiV2 from qiskit_experiments.library import StarkRamseyXY, StarkRamseyXYAmpScan from qiskit_experiments.library.characterization.analysis import StarkRamseyXYAmpScanAnalysis diff --git a/test/library/characterization/test_t1.py b/test/library/characterization/test_t1.py index 6c49a9130d..475e1d82e9 100644 --- a/test/library/characterization/test_t1.py +++ b/test/library/characterization/test_t1.py @@ -16,7 +16,7 @@ from test.base import QiskitExperimentsTestCase import numpy as np from qiskit.qobj.utils import MeasLevel -from qiskit.providers.fake_provider import FakeAthensV2 +from qiskit_ibm_runtime.fake_provider import FakeAthensV2 from qiskit_experiments.test.noisy_delay_aer_simulator import NoisyDelayAerBackend from qiskit_experiments.framework import ExperimentData, ParallelExperiment from qiskit_experiments.library import T1 diff --git a/test/library/characterization/test_t2hahn.py b/test/library/characterization/test_t2hahn.py index 8e3d124e48..6c068a0e75 100644 --- a/test/library/characterization/test_t2hahn.py +++ b/test/library/characterization/test_t2hahn.py @@ -18,8 +18,8 @@ import numpy as np from ddt import ddt, data, named_data, unpack -from qiskit.providers.fake_provider import FakeVigoV2 from qiskit_aer import AerSimulator +from qiskit_ibm_runtime.fake_provider import FakeVigoV2 from qiskit_experiments.framework import ParallelExperiment from qiskit_experiments.library.characterization.t2hahn import T2Hahn diff --git a/test/library/characterization/test_t2ramsey.py b/test/library/characterization/test_t2ramsey.py index 599c9a547a..ca6a961981 100644 --- a/test/library/characterization/test_t2ramsey.py +++ b/test/library/characterization/test_t2ramsey.py @@ -18,8 +18,8 @@ import numpy as np from ddt import ddt, named_data -from qiskit.providers.fake_provider import FakeVigoV2 from qiskit_aer import AerSimulator +from qiskit_ibm_runtime.fake_provider import FakeVigoV2 from qiskit_experiments.framework import ParallelExperiment from qiskit_experiments.library import T2Ramsey diff --git a/test/library/characterization/test_zz_ramsey.py b/test/library/characterization/test_zz_ramsey.py index b2d45675c8..10b12950a0 100644 --- a/test/library/characterization/test_zz_ramsey.py +++ b/test/library/characterization/test_zz_ramsey.py @@ -21,8 +21,8 @@ from ddt import ddt, idata, named_data, unpack from qiskit import QuantumCircuit -from qiskit.providers.fake_provider import FakeVigoV2 from qiskit_aer import AerSimulator +from qiskit_ibm_runtime.fake_provider import FakeVigoV2 from qiskit_experiments.library import ZZRamsey from qiskit_experiments.test.mock_iq_backend import MockIQBackend diff --git a/test/library/randomized_benchmarking/test_interleaved_rb.py b/test/library/randomized_benchmarking/test_interleaved_rb.py index 1f7b567a23..f01fd6a764 100644 --- a/test/library/randomized_benchmarking/test_interleaved_rb.py +++ b/test/library/randomized_benchmarking/test_interleaved_rb.py @@ -20,10 +20,10 @@ from qiskit.circuit import Delay, QuantumCircuit, Parameter, Gate from qiskit.circuit.library import SXGate, CXGate, TGate, CZGate from qiskit.exceptions import QiskitError -from qiskit.providers.fake_provider import FakeManila, FakeManilaV2, FakeWashington from qiskit.transpiler import InstructionProperties from qiskit_aer import AerSimulator from qiskit_aer.noise import NoiseModel, depolarizing_error +from qiskit_ibm_runtime.fake_provider import FakeManila, FakeManilaV2, FakeWashington from qiskit_experiments.library import randomized_benchmarking as rb diff --git a/test/library/randomized_benchmarking/test_standard_rb.py b/test/library/randomized_benchmarking/test_standard_rb.py index fde71cc5e3..2ccd5a47df 100644 --- a/test/library/randomized_benchmarking/test_standard_rb.py +++ b/test/library/randomized_benchmarking/test_standard_rb.py @@ -19,10 +19,10 @@ from qiskit.circuit.library import SXGate from qiskit.exceptions import QiskitError -from qiskit.providers.fake_provider import FakeManilaV2 from qiskit.pulse import Schedule, InstructionScheduleMap from qiskit_aer import AerSimulator from qiskit_aer.noise import NoiseModel, depolarizing_error +from qiskit_ibm_runtime.fake_provider import FakeManilaV2 from qiskit_experiments.framework.composite import ParallelExperiment from qiskit_experiments.library import randomized_benchmarking as rb @@ -372,7 +372,7 @@ def test_poor_experiment_result(self): This is a special case that fit outcome is very sensitive to initial guess. Perhaps generated initial guess is close to a local minima. """ - from qiskit.providers.fake_provider import FakeVigoV2 + from qiskit_ibm_runtime.fake_provider import FakeVigoV2 backend = FakeVigoV2() backend.set_options(seed_simulator=123)