Skip to content

Commit

Permalink
Merge branch 'qiskit-community:main' into issue-qiskit-community#1238
Browse files Browse the repository at this point in the history
  • Loading branch information
Naohnakazawa authored Oct 26, 2024
2 parents 559579f + 182a6ae commit 567a326
Show file tree
Hide file tree
Showing 38 changed files with 653 additions and 105 deletions.
16 changes: 16 additions & 0 deletions docs/manuals/characterization/stark_experiment.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
AC Stark Effect
===============

.. caution::

The experiments described in this manual are deprecated as of Qiskit
Experiments 0.8 and will be removed in a future release. They rely on Qiskit
Pulse, which is `deprecated in Qiskit SDK
<https://github.com/Qiskit/qiskit/issues/13063>`_, with planned removal in
Qiskit 2.0.

When a qubit is driven with an off-resonant tone,
the qubit frequency :math:`f_0` is slightly shifted through what is known as the (AC) Stark effect.
This technique is sometimes used to characterize qubit properties in the vicinity of
Expand Down Expand Up @@ -145,6 +153,14 @@ by a variant of the Hahn-echo pulse sequence [5]_.

%matplotlib inline

import warnings

warnings.filterwarnings(
"ignore",
message=".*Due to the deprecation of Qiskit Pulse.*",
category=DeprecationWarning,
)

from qiskit_experiments.library import StarkRamseyXY
from qiskit import schedule, pulse
from qiskit_ibm_runtime.fake_provider import FakeHanoiV2
Expand Down
13 changes: 13 additions & 0 deletions docs/manuals/measurement/restless_measurements.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Restless Measurements
=====================

.. caution::

Support for restless measurements is deprecated as of Qiskit Experiments 0.8
and will be removed in a future version.

When running circuits, the qubits are typically reset to the ground state after
each measurement to ensure that the next circuit has a well-defined initial state.
This can be done passively by waiting several :math:`T_1`-times so that qubits in
Expand Down Expand Up @@ -65,6 +70,14 @@ they use always starts with the qubits in the ground state.
.. jupyter-execute::
:hide-code:

import warnings

warnings.filterwarnings(
"ignore",
message=".*Support for restless.*",
category=DeprecationWarning,
)

# Temporary workaround for missing support in Qiskit and qiskit-ibm-runtime
from qiskit_experiments.test.patching import patch_sampler_test_support
patch_sampler_test_support()
Expand Down
152 changes: 152 additions & 0 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,158 @@ Release Notes
.. release-notes::
:earliest-version: 0.7.0

.. _Release Notes_0.7.0:

0.7.0
=====

.. _Release Notes_0.7.0_Prelude:

Prelude
-------

.. releasenotes/notes/0.7/0_7_release-96efcec2c45dcf74.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
The Qiskit Experiments 0.7 release adds the Layer Fidelity experiment and makes some fixes and improvements.


.. _Release Notes_0.7.0_New Features:

New Features
------------

.. releasenotes/notes/0.7/layer-fidelity-1e09dea9e5b69515.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- Add a new experiment class :class:`.LayerFidelity` to measure
`layer fidelity and EPLG (error per layered gate) <https://arxiv.org/abs/2311.05933>`_,
which is a holistic benchmark to characterize the full quality of the devices at scale.

It has an experimental feature: its :meth:`circuits`
exceptionally returns circuits on physical qubits (not virtual qubits as usual).
Its analysis class :class:`.LayerFidelityAnalysis` returns :class:`.AnalysisResultData`
which contains several ``extra`` entries to help additional analyses: e.g.
``qubits`` to ease the query of sub-analysis results and
``reason`` to tell users why the ``quality`` of the analysis was ``"bad"``.

For example, the syntax for pulling out the individual fidelities looks like below.

.. code-block:: python
df = exp_data.analysis_results(dataframe=True)
df[(df.name=="ProcessFidelity") & (df.qubits==(59, 60))].value
See `an example notebook
<https://github.com/qiskit-community/qiskit-device-benchmarking/blob/main/notebooks/layer_fidelity.ipynb>`_
for more examples such as how to select a best possible qubit chain to measure and
how to plot EPLG as a function of (sub)chain length.

.. releasenotes/notes/0.7/residuals_plot-377aabb9193a5a98.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- Added an option to plot residuals for single-figure experiments, which is enable by setting ``plot_residuals`` to ``True``.

.. releasenotes/notes/0.7/residuals_plot-377aabb9193a5a98.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- Introduced ``sub_plot_heights_list`` and ``sub_plot_widths_list`` attributes in :class:`.PlotStyle` for customizable
subplot sizes where each list needs to sum up to 1. This feature currently works only for experiments with
no subplots.


.. _Release Notes_0.7.0_Known Issues:

Known Issues
------------

.. releasenotes/notes/0.7/0_6_deprecations-9a399c48c2d461f1.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- Fit parameters are not populated in composite curve analysis results and are
found only in the fit summary artifact. In a future release, they will be
removed from all analysis result objects and live in the artifacts only.


.. _Release Notes_0.7.0_Upgrade Notes:

Upgrade Notes
-------------

.. releasenotes/notes/0.7/0_7_release-96efcec2c45dcf74.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- Changes in behavior that users should be aware of when upgrading Qiskit Experiments
to this version are listed below in subsections by functional area.


.. _Release Notes_0.7.0_Package Upgrades:

Package Upgrades
^^^^^^^^^^^^^^^^

.. releasenotes/notes/0.7/0_6_deprecations-9a399c48c2d461f1.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- Several deprecated modules, methods, functions, and options have been removed and will no longer work:

* The visualization module of :mod:`.CurveAnalysis` has been replaced by the
standalone :mod:`.visualization` module. The ``LegacyCurveCompatDrawer`` has
been removed from :mod:`.visualization`.
* The ``curve_drawer`` option to :class:`.CompositeCurveAnalysis` has been
replaced by the plotter in the visualization module.
* The ``SeriesDef`` dataclass has been removed and replaced by the ``LMFIT`` module.
* The ``CurveData`` dataclass has been removed and replaced by :class:`.ScatterTable`'s DataFrame representation.
* ``random_cliffords()`` and ``random_clifford_circuits()`` have been
removed from :class:`.CliffordUtils` and replaced by :meth:`.StandardRB.__sample_sequence`.
* ``beta`` has been renamed to ``outcome_prior`` in the tomography utility
function ``binomial_weights()``.
* The ``return_data_points`` option has been removed from curve analysis.
Data points are now automatically provided in :class:`.ExperimentData` objects via the ``curve_data``
artifact.
* The default value of ``flatten_results`` in composite experiments has changed to ``True``.


.. _Release Notes_0.7.0_Deprecation Notes:

Deprecation Notes
-----------------

.. releasenotes/notes/0.7/0_6_deprecations-9a399c48c2d461f1.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- Accessing experiment data artifacts by numerical index has been
deprecated. Use the name or ID of the artifact instead.


.. _Release Notes_0.7.0_Bug Fixes:

Bug Fixes
---------

.. releasenotes/notes/0.7/fix-ecr-epg-59c8db98494966b0.yaml @ b'7a0924c24549ab4f38819a86c0ac49214d819ba2'
- Fixed a bug in EPG (error per gate) computation in :class:`~.RBAnalysis`
where it fails with a ``TypeError`` for backends with ECR gate
as a 2-qubit basis gate (e.g. IBM Eagle processors).
See
`#1419
<https://github.com/Qiskit-Community/qiskit-experiments/pull/1419>`_.
for the details of the bug.

.. releasenotes/notes/0.7/fix-epg-gatecount-60777f7a3f3566bc.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- The gate counting for EPG in the RB analysis code was not including the
inverse, so that the total number of operations per Clifford was incorrect,
leading to incorrect reporting of EPG from EPC. Fixed by adding +1 for the
inverse gate.


.. _Release Notes_0.7.0_Other Notes:

Other Notes
-----------

.. releasenotes/notes/0.7/add-examples-to-characterization-experiments-e77d4d26c6b49694.yaml @ b'517532eb307897896d549f7e3de69485801d67a8'
- Added minimal working code examples to many experiment API pages,
especially characterization experiments. The minimal working code example
is a code snippet which users can copy and paste to run the experiment.
Users are required to specify a backend to use the code example. By default,
the backend used in the examples is a simulator such as ``FakeManilaV2``.

.. _Release Notes_0.6.1:

0.6.1
Expand Down
19 changes: 19 additions & 0 deletions docs/tutorials/calibrations.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Calibrations: Schedules and gate parameters from experiments
============================================================

.. caution::

Support for calibrating pulses is deprecated as of Qiskit Experiments 0.8
and will be removed in a future version. There is no alternative support
path because Qiskit Pulse is `deprecated in Qiskit SDK
<https://github.com/Qiskit/qiskit/issues/13063>`_ with planned removal in
Qiskit 2.0.

To produce high fidelity quantum operations, we want to be able to run good gates. The
calibration module in Qiskit Experiments allows users to run experiments to find the
pulse shapes and parameter values that maximize the fidelity of the resulting quantum
Expand Down Expand Up @@ -33,6 +41,17 @@ This automatic updating can also be disabled using the ``auto_update`` flag.
This tutorial requires the :mod:`qiskit_dynamics` package to run simulations.
You can install it with ``python -m pip install qiskit-dynamics``.

.. jupyter-execute::
:hide-code:

import warnings

warnings.filterwarnings(
"ignore",
message=".*Due to the deprecation of Qiskit Pulse.*",
category=DeprecationWarning,
)

.. jupyter-execute::

import pandas as pd
Expand Down
11 changes: 11 additions & 0 deletions docs/tutorials/data_processor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,17 @@ The code below sets up the Rabi experiment.
This tutorial requires the :mod:`qiskit_dynamics` package to run simulations.
You can install it with ``python -m pip install qiskit-dynamics``.

.. jupyter-execute::
:hide-code:

import warnings

warnings.filterwarnings(
"ignore",
message=".*Due to the deprecation of Qiskit Pulse.*",
category=DeprecationWarning,
)

.. jupyter-execute::

import numpy as np
Expand Down
11 changes: 11 additions & 0 deletions docs/tutorials/visualization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ First, we display the default figure from a :class:`.Rabi` experiment as a start
:external+qiskit_ibm_runtime:doc:`qiskit-ibm-runtime <index>` packages to run simulations. You can install them
with ``python -m pip install qiskit-dynamics qiskit-aer qiskit-ibm-runtime``.

.. jupyter-execute::
:hide-code:

import warnings

warnings.filterwarnings(
"ignore",
message=".*Due to the deprecation of Qiskit Pulse.*",
category=DeprecationWarning,
)

.. jupyter-execute::

import numpy as np
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from qiskit.circuit import Parameter
from qiskit import pulse
from qiskit.pulse import ScheduleBlock
from qiskit.utils.deprecation import deprecate_func

from qiskit_experiments.calibration_management.calibration_key_types import DefaultCalValue
from qiskit_experiments.exceptions import CalibrationError
Expand All @@ -39,6 +40,14 @@ class BasisGateLibrary(ABC, Mapping):
# Parameters that do not belong to a schedule, a set of names
__parameters_without_schedule__ = set()

@deprecate_func(
since="0.8",
package_name="qiskit-experiments",
additional_msg=(
"Due to the deprecation of Qiskit Pulse, support for pulse "
"gate calibrations has been deprecated."
),
)
def __init__(
self,
basis_gates: Optional[List[str]] = None,
Expand Down
8 changes: 8 additions & 0 deletions qiskit_experiments/calibration_management/calibrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ class Calibrations:
ScheduleBlock are supported.
"""

@deprecate_func(
since="0.8",
package_name="qiskit-experiments",
additional_msg=(
"Due to the deprecation of Qiskit Pulse, support for pulse "
"gate calibrations has been deprecated."
),
)
def __init__(
self,
coupling_map: Optional[List[List[int]]] = None,
Expand Down
10 changes: 10 additions & 0 deletions qiskit_experiments/curve_analysis/standard_analysis/resonance.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import lmfit
import numpy as np

from qiskit.utils.deprecation import deprecate_func

import qiskit_experiments.curve_analysis as curve
from qiskit_experiments.framework import Options

Expand Down Expand Up @@ -59,6 +61,14 @@ class ResonanceAnalysis(curve.CurveAnalysis):
"""

@deprecate_func(
since="0.8",
package_name="qiskit-experiments",
additional_msg=(
"Due to the deprecation of Qiskit Pulse, experiments and related classses "
"involving pulse gate calibrations like this one have been deprecated."
),
)
def __init__(
self,
name: Optional[str] = None,
Expand Down
Loading

0 comments on commit 567a326

Please sign in to comment.