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

0.6 release notes and deprecation policy #1385

Merged
merged 25 commits into from
Feb 8, 2024
Merged
Changes from 5 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f99b279
fix formatting and consolidate notes
coruscating Jan 31, 2024
12f9d25
more formatting fixes
coruscating Feb 1, 2024
8de4e04
move notes
coruscating Feb 1, 2024
f12c50c
update deprecation policy
coruscating Feb 2, 2024
db331c6
merge main
coruscating Feb 2, 2024
112f1e9
update notes
coruscating Feb 5, 2024
22812bc
Merge branch 'main' into 0.6-release-notes
coruscating Feb 5, 2024
afeeb81
fix notes in wrong section
coruscating Feb 5, 2024
b9fb13e
Merge branch '0.6-release-notes' of github.com:coruscating/qiskit-exp…
coruscating Feb 5, 2024
b817048
minor text fixes
coruscating Feb 6, 2024
d720f6d
Apply suggestions from code review
coruscating Feb 6, 2024
6d993f6
review comments
coruscating Feb 6, 2024
79f9265
Merge remote-tracking branch 'upstream/main' into 0.6-release-notes
coruscating Feb 6, 2024
553f502
update deprecation policy
coruscating Feb 6, 2024
931d05d
add pandas intersphinx, expose RB synthesis, more fixes
coruscating Feb 7, 2024
b57deb0
update text
coruscating Feb 7, 2024
2cf403c
review comment
coruscating Feb 7, 2024
280bc1a
add links to old and new providers
coruscating Feb 7, 2024
6641efa
add feature subsections
coruscating Feb 7, 2024
5544899
update provider and aer ref links
coruscating Feb 7, 2024
5df6090
add feature and bug fix subsections
coruscating Feb 7, 2024
8edbd46
add upgrade instructions
coruscating Feb 7, 2024
0d62d21
update deprecation section
coruscating Feb 7, 2024
bfce4f1
Merge remote-tracking branch 'upstream/main' into 0.6-release-notes
coruscating Feb 8, 2024
e1ed9fb
update artifact note
coruscating Feb 8, 2024
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
29 changes: 24 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -361,11 +361,21 @@ There are a few other build options available:

### Deprecation policy

Qiskit Experiments is part of Qiskit and, therefore, the [Qiskit Deprecation
Policy](https://github.com/Qiskit/qiskit/blob/main/DEPRECATION.md) fully applies here.
Public-facing changes must come with a deprecation warning for at least three months or
two version cycles before the old feature is removed. Deprecations can only happen on
minor releases and not on patch releases.
Qiskit Experiments's deprecation policy is based on Qiskit's [Deprecation
Policy](https://github.com/Qiskit/qiskit/blob/45e42525224e9e1857300e7e5529273fe619c9e4/DEPRECATION.md)
prior to its 1.0 release. Public-facing changes must come with a deprecation warning
for at least three months or two version cycles before the old feature is removed.
Deprecations can only happen on minor releases and not on patch releases.

The timeline for deprecating an existing feature is as follows:

* Minor release 1: An alternative path is provided. A `PendingDeprecationWarning` should be issued
when the old path is used, indicating to users how to switch to the new path and the release
in which the old path will no longer be available.
* Minor release 2: The `PendingDeprecationWarning` becomes a `DeprecationWarning`. The release note
should indicate the feature has been deprecated and how to switch to the new path.
* Minor release 3: The old feature is removed. The release note should indicate that the feature has
been removed and how to switch to the new path.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wshanks I'm linking to the commit where DEPRECATION.md was added to Qiskit. Not sure if there's a better link.

What do you think about this timeline? It's faster than the Qiskit policy, which says the old feature cannot be removed in the minor release immediately after the warnings, but that would be far too long for us. The other thing is we don't use PendingDeprecationWarning that much right now, and it creates more code churn than just starting with a DeprecationWarning and keeping that for two cycles.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That link seems okay. A cleaner link might be the rc1 tag: https://github.com/Qiskit/qiskit/blob/1.0.0rc1/DEPRECATION.md That's a little misleading if the file gets changed before 1.0.0, but the file isn't in the 0.46 release branch. It could probably be backported.

Three cycles seems like too much for this package. I like the pending deprecation warnings, but they may be too much overhead for us to manage right now. Perhaps we could use deprecation helper functions that check the current version and automatically determine the warning type by comparing to the since argument. The goal with pending is to give downstream libraries a chance to test for and fix pending deprecations before they become deprecations since those print out to users. I don't know that we have many downstream consumers that are not end users. It makes most sense for library consumers in between the package emitting the warning and end users.

We have also discussed reducing the deprecation cycle to a single version for features outside of the framework.

Copy link
Collaborator Author

@coruscating coruscating Feb 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated the link. I broke the changes into three types in 553f502 and made specifying pending warnings optional.


#### Adding deprecation warnings

@@ -389,6 +399,15 @@ Utilities](https://docs.quantum.ibm.com/api/qiskit/utils) to add warnings:
pass
```

Note that these pre-deprecation and deprecation warnings will cause the CI to fail, but features up
for deprecation should continue to be tested until their removal. All such expected warnings
should be caught in tests:

```python
with self.assertWarns(DeprecationWarning):
# Test something deprecated here
```

### Development cycle

The development cycle for Qiskit Experiments is all handled in the open using project
Original file line number Diff line number Diff line change
@@ -8,19 +8,19 @@ features:
:meth:`.ExperimentData.get_service_from_provider` enabling the automatic
setting of the experiment database service via passing the provider.
- |
The `start_datetime`property of :class:`.ExperimentData`is now being
The ``start_datetime`` property of :class:`.ExperimentData` is now being
set to the time the experiment data was created.
- |
The `end_datetime` property of :class:`.ExperimentData` is now being
The ``end_datetime`` property of :class:`.ExperimentData` is now being
set to the latest time a successful job terminated.
- |
The `creation_datetime` and `updated_datetime` properties of :class:`.ExperimentData`
The ``creation_datetime`` and ``updated_datetime`` properties of :class:`.ExperimentData`
are now being read from the server when saving the experiment.
- |
All the datetime properties are stored in UTC and converted to local when using getters.
All the datetime properties are now stored in UTC and converted to local time when using getters.
- |
:meth:`.ExperimentData.save` can now raise exceptions when saving
fails, unless the `suppress_errors` flag is set (on by default)
fails, unless the ``suppress_errors`` flag is set (on by default).
fixes:
Original file line number Diff line number Diff line change
@@ -7,14 +7,11 @@ upgrade:
allowed. Use ``physical_qubits`` keyword argument with a sequence type input.
* The ``scipy_linear_lstsq`` and ``scipy_gaussian_lstsq`` fitters for the
:class:`.StateTomographyAnalysis` and :class:`.ProcessTomographyAnalysis`
classes have been removed. Use the :func:`.linear_lstsq`, :func:`.cvxpy_linear_lstsq`,
or :func:`.cvxpy_gaussian_lstsq` fitters instead.
classes have been removed. Use the :func:`.cvxpy_linear_lstsq`
and :func:`.cvxpy_gaussian_lstsq` fitters instead.
* Curve fit solvers ``curve_fit()`` and ``multi_curve_fit()`` as well as fit functions
``bloch_oscillation_x()``, ``bloch_oscillation_y()``, and ``bloch_oscillation_z()`` have been
removed. Use the LMFIT library instead.
* The scipy lstsq tomography fitters ``scipy_linear_lstsq`` and ``scipy_gaussian_lstsq`` have
been removed. Use the `linear_lstsq`, `cvxpy_linear_lstsq`, or `cvxpy_gaussian_lstsq` fitter
instead.
* The ``flat_top_widths`` argument and experiment option of the
:class:`.CrossResonanceHamiltonian` experiment and its subclass have been removed. Use
``durations`` instead.
9 changes: 9 additions & 0 deletions releasenotes/notes/0.6/0.6_release-4d766733941ad57a.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
prelude: >
Qiskit Experiments 0.6 adds numerous features and improvements. It is compatible with Qiskit 1.0.
Notable changes include refactoring the analysis results to a Pandas dataframe, and refactoring
curve fit data into a new :class:`ScatterTable` container based on dataframes that is stored
by default as an artifact in :class:`ExperimentData` along with the summary of fit results.
New experiments include :class:`StarkP1Spectroscopy`, :class:`StarkRamseyXY`,
:class:`StarkRamseyXYScan`. The supported provider for running jobs on IBM backends has
switched from ``qiskit-ibm-provider`` to ``qiskit-ibm-experiment``.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
feature:
- |
Figures in :class:`.ExperimentData` objects can now be accessed without the ``.svg`` extension.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
other:
- |
Display a warning when running an analysis on :class:`.ExperimentData` objects which do not contain data.
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ other:
upgrade:
- |
The representation of pulses in the :class:`.FixedFrequencyTransmon` library
was changed from complex amplitude to (``amp``,``angle``) representation. All pulses
was changed from complex amplitude to (``amp``, ``angle``) representation. All pulses
now include an ``angle`` parameter, and the default values of ``amp`` are set
as type ``float`` instead of ``complex``.
- |
Original file line number Diff line number Diff line change
@@ -8,6 +8,6 @@ fixes:
- |
:class:`.qiskit_experiments.library.FineXDragCal` and
:class:`.qiskit_experiments.library.EFRoughXSXAmplitudeCal` were updated to
attach `"sx"` and `"x"` calibrations to their circuits, respectively.
Previously, they only attached the `"x"` and `"x12"` calibrations that they
attach ``"sx"`` and ``"x"`` calibrations to their circuits, respectively.
Previously, they only attached the ``"x"`` and ``"x12"`` calibrations that they
were calibrating. See issue `#1158 <https://github.com/Qiskit-Extensions/qiskit-experiments/issues/1158>`_.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
features:
- |
Added a `broadcast` option to the :class:`.CompositeAnalysis`. When `broadcast=True` is passed,
Added a ``broadcast`` option to :class:`.CompositeAnalysis`. When ``broadcast=True`` is passed,
this option will be applied to child experiment analyses within the class. This means it will iterate
through the child analysis classes and apply the given option to each of
them.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
fixes:
- |
The :meth:`.ExperimentData.copy` method under ExperimentData class now copies the provider.
Original file line number Diff line number Diff line change
@@ -3,9 +3,7 @@ features:
- |
A new method :meth:`BaseExperiment.job_info` has been added that will
output the number of jobs the experiment is expected to be split into
based on the provided backend.
- |
Refer to issue
`#1247 https://github.com/Qiskit-Extensions/qiskit-experiments/issues/1247`
based on the provided backend. Refer to issue
`#1247 <https://github.com/Qiskit-Extensions/qiskit-experiments/issues/1247>`_
for more details.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
upgrade:
- |
Dropped support for Python 3.7 and added support for Python 3.12.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
The :attr:`ExperimentData.auto_save` setter no longer saves sub-experiments twice.
- |
:meth:`ExperimentData.save` now handles correctly figures in sub-experiments when ``flatten_results=True``.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
upgrade:
- |
The variables `__drive_freq_parameter__` and `__readout_freq_parameter__`
have been removed from `Calibrations`. These variables were given special
The variables ``__drive_freq_parameter__`` and ``__readout_freq_parameter__``
have been removed from :class:`.Calibrations`. These variables were given special
treatment which is inconsistent with the framework. To replace them a
mechanism to define and add parameters without a schedule has been added to
the basis gate library. This has the added benefit of making the API of
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@ upgrade:
``qiskit``. This change follows the move in upstream Qiskit to rename
``qiskit-terra`` to ``qiskit``. The minimum required version was increased
from 0.24 for ``qiskit-terra`` to 0.44 for ``qiskit`` (equivalent to
`qiskit-terra`` 0.25). The maximum ``qiskit`` version was set to ``<1.0``
``qiskit-terra`` 0.25). The maximum ``qiskit`` version was set to ``<1.0``
in anticipation of breaking changes in Qiskit 1.0. Closer to the Qiskit 1.0
release, a patch release of ``qiskit-experiments`` will remove this
constraint and address any compatibility issues. For more information see
the `Qiskit repository renaming plan
<https://github.com/Qiskit/RFCs/blob/5793e78dc8e4d8d17f8ef7fad789c6c5ebd3a061/0011-repo-rename.md>`__
and the `Qiskit issue <https://github.com/Qiskit/qiskit/issues/11240>`__
for the renaming of the package.
and the `Qiskit 1.0 migration guide <https://docs.quantum.ibm.com/api/migration-guides/qiskit-1.0>`__
for information on renaming of the package.
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@
fixes:
- |
Resolved a serialization issue that affected Rabi experiments when running it through
`qiskit-ibm-provider` using custom amplitudes provided as a numpy array.
the backend provider using custom amplitudes provided as a numpy array.
- |
Resolved an issue that caused QV experiments to fail when executed via `qiskit-ibm-provider` using
Resolved an issue that caused QV experiments to fail when executed via the backend provider using
Qiskit Terra for calculating ideal probabilities, instead of Aer.
- |
Resolved a serialization issue that affected DRAG experiments with integral beta values specified.
Original file line number Diff line number Diff line change
@@ -4,5 +4,5 @@ other:
Removed the reset instruction from the beginning of tomography experiments.
Since qubits are usually reset between circuits, this change should have no
impact on tomography experiments, but it should allow backends that do not
provide a reset instruction to run tomography experiments. `#1250
<https://github.com/Qiskit-Extensions/qiskit-experiments/issues/881>`
provide a reset instruction to run tomography experiments. See `#1250
<https://github.com/Qiskit-Extensions/qiskit-experiments/issues/881>`_.
Original file line number Diff line number Diff line change
@@ -8,4 +8,7 @@ upgrade:
With the impending deprecation of the ``qiskit-ibm-provider`` package, support for
``qiskit-ibm-provider`` is now deprecated and will be removed
in the next release. Users should migrate to ``qiskit-ibm-runtime`` following the
`migration guide <https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime-from-provider>`.
`migration guide
<https://docs.quantum.ibm.com/api/migration-guides/qiskit-runtime-from-provider>`_.
``qiskit-ibm-runtime`` is not listed as a dependency for compatibility reasons, but users
will need it to run experiments on IBM backends.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions releasenotes/notes/bugfix_expdata_copy-2c73a21ad720858d.yaml

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions releasenotes/notes/dump-terra-0_24-47c5d4fb92f1d97b.yaml

This file was deleted.

This file was deleted.