Skip to content
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

Switch tests and documentation to use qiskit-ibm-runtime fake backends #1369

Merged
merged 4 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/manuals/characterization/stark_experiment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
7 changes: 4 additions & 3 deletions docs/manuals/characterization/t1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions docs/manuals/characterization/t2ramsey.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions docs/manuals/characterization/tphi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand All @@ -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(
Expand Down
7 changes: 4 additions & 3 deletions docs/manuals/measurement/readout_mitigation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand All @@ -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,
Expand Down
Loading
Loading