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

Conversation

coruscating
Copy link
Collaborator

Summary

Update the release notes and deprecation policy prior to release.

CONTRIBUTING.md Outdated
Comment on lines 364 to 378
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.

@wshanks wshanks added this to the Release 0.6 milestone Feb 2, 2024
This leverages a custom JSON encoder and decoder to serialize
the entire calibration data including user provided schedule templates.
Output JSON data is formatted into the standard data model which is intentionally
agnostic to the calibration data structure, and this allows community
agnostic to the calibration data structure, which this allows community
developer to reuse the calibration data in their platform.
See :mod:`qiskit_experiments.calibration_management.save_utils` for data models.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@nkanazawa1989 Should calibration_management.save_utils be exposed in the API docs? It seems to be internal-only. If so, we should remove the mention here.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It says at the top of the file that it is not intended to be a stable user-facing API. It has to be stable to whatever commitment we make to loading old data though. The main question is should we document the format at all or expect users who care to look into the Python code themselves any way.

I would say just remove the reference here, but the previous sentence doesn't make sense if the model is not documented. I think I would just remove the previous sentence as well because we don't need to commit to supporting a calibration storage format. Others can still use it if they want to. What do you think @nkanazawa1989?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm fine with removing the sentence.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done in b57deb0.

Copy link
Collaborator

@wshanks wshanks Feb 7, 2024

Choose a reason for hiding this comment

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

I would remove part or all of the previous sentence as well. Since the format is not documented, we don't really support users using it outside of the package (though they can try if they want).

coruscating and others added 3 commits February 5, 2024 16:23
0.3.1 release notes were added retroactively, so they must be added to an existing note file created during the correct release
@coruscating coruscating marked this pull request as ready for review February 6, 2024 00:46
Copy link
Collaborator

@wshanks wshanks left a comment

Choose a reason for hiding this comment

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

Here are some comments from reading through the diff. I still want to merge main and #1342 into this branch and look at the sphinx output to see what the final release notes look like, but I didn't get to that yet.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated
Comment on lines 364 to 378
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

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.

CONTRIBUTING.md Outdated Show resolved Hide resolved
releasenotes/notes/0.6/0.6_release-4d766733941ad57a.yaml Outdated Show resolved Hide resolved
releasenotes/notes/0.6/0.6_release-4d766733941ad57a.yaml Outdated Show resolved Hide resolved
This leverages a custom JSON encoder and decoder to serialize
the entire calibration data including user provided schedule templates.
Output JSON data is formatted into the standard data model which is intentionally
agnostic to the calibration data structure, and this allows community
agnostic to the calibration data structure, which this allows community
developer to reuse the calibration data in their platform.
See :mod:`qiskit_experiments.calibration_management.save_utils` for data models.
Copy link
Collaborator

Choose a reason for hiding this comment

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

It says at the top of the file that it is not intended to be a stable user-facing API. It has to be stable to whatever commitment we make to loading old data though. The main question is should we document the format at all or expect users who care to look into the Python code themselves any way.

I would say just remove the reference here, but the previous sentence doesn't make sense if the model is not documented. I think I would just remove the previous sentence as well because we don't need to commit to supporting a calibration storage format. Others can still use it if they want to. What do you think @nkanazawa1989?

Copy link
Collaborator

@wshanks wshanks left a comment

Choose a reason for hiding this comment

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

These look good to me.

Some minor comments from reading through the rendered notes:

  1. We could link to qiskit-ibm-runtime and qiskit-ibm-provider when mentioning them in the prelude.
  2. There are a couple classes not referenced with Sphinx like ParallelExperiment and BatchExperiment.
  3. It would be nice to group the notes so that the experiment data changes, the plotting changes, etc are all together but I think that is hard to do. It would also be nice if the changes highlighted in the prelude were near the top of the notes.

@coruscating
Copy link
Collaborator Author

@wshanks Added subsections and pointed provider mentions to their module's intersphinx entries. Subsections aren't in a reno stable release yet so I pinned reno to the latest git commit. We could arguably have a composite experiments section separate from the base experiment class, but maybe there are already a lot of sections. I also had to add a new features bullet point just so that the New Features section heading shows up—otherwise it looks like the subsections are under Prelude.

- [features_expupdate, Experiment Updates, 2]
- [features_expclass, Experiment Class Features, 2]
- [features_analysis, Analysis Class Features, 2]
- [features_expdata, Experiment Data Features, 2]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I tested with #1342 merged in. Just a note that its release note needs to be updated to go under a section after it is merged (assuming it merges before this PR).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do. I have to move the note to the 0.6/ folder too so this PR should be the last one merged before release.

- [features_expdata, Experiment Data Features, 2]
- [features_curvefit, Curve Fit Features, 2]
- [features_calibration, Calibration Features, 2]
- [features_visualization, Visualization Features, 2]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the sections. Do you think it is too much to add some for upgrade and fixes? When the list gets longer than a page, I find it gets overwhelming to read through.

I think the categories you used for features also work but there could be one more category for packaging upgrades (Qiskit 1.0, providers, Python versions). Maybe those could go under "other"? The deprecated methods and options list might be split out into different sections if we had them (analysis, experiments, experiment class). If we did all those, maybe we would group deprecation notes as well though that list is fairly short.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added in 5df6090 along with a Package Upgrades subsection. I ended up putting the removal notes in that subsection and keeping deprecation notes in its own section since I like them grouped rather than separated into sections, but I don't feel that strongly about it.

Comment on lines +364 to +405
Any change to the existing package code that affects how the user interacts with the package
should give the user clear instructions and advanced warning if the change is nontrivial.
Qiskit Experiments's deprecation policy is based on [Qiskit's
policy](https://github.com/Qiskit/qiskit/blob/1.0.0rc1/DEPRECATION.md) prior to its 1.0 release, but
we impose less stringent requirements such that developers can iterate more quickly.
Deprecations and feature removals can only happen on minor releases and not on patch releases.

The deprecation policy depends on the significance of the user-facing change, which we have divided into
three categories:

A **core feature change** is one that affects how the framework functions, for example a
change to `BaseExperiment`. The timeline for deprecating an existing core 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. The
developer may choose to directly deprecate the feature and issue a `DeprecationWarning` instead,
in which case the release note should indicate the feature has been deprecated and how to switch
to the new path.
* Minor release 2: The `PendingDeprecationWarning` becomes a `DeprecationWarning`, or the
`DeprecationWarning` remains in place. 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.

If the three-release cycle takes fewer than three months, the feature removal must wait for more
releases until three months has elapsed since the first issuing of the `PendingDeprecationWarning`
or `DeprecationWarning`.

A **non-core feature change** may be a change to a specific experiment class or modules such as the
plotter. The timeline is shortened for such a change:

* Minor release 1: An alternative path is provided. A `DeprecationWarning` 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 old feature is removed. The release note should indicate that the feature has
been removed and how to switch to the new path.

Lastly, a **minor, non-core change** could be a cosmetic change such as output file names or a
change to helper functions that isn't directly used in the package codebase. These can be made in
one release without a deprecation process as long as the change is clearly described in the
release notes.
Copy link
Contributor

@mtreinish mtreinish Feb 7, 2024

Choose a reason for hiding this comment

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

Is this documented in the user facing documentation? Personally I think ensuring the deprecation and stability policy are clear for end users too is important as it establishes user expectations and how to deal with potential api changes. For qiskit we put this here: https://github.com/Qiskit/documentation/blob/main/docs/start/install.mdx#L218-L290 which is the user facing documentation of the stability policy (which I still need to update qiskit's in-repo contributing guide to reflect the qiskit 1.0 changes)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point, added in 8edbd46. Might be time to split the Installation section out from Getting Started given its length.

Any change to the existing package code that affects how the user interacts with the package
should give the user clear instructions and advanced warning if the change is nontrivial.
Qiskit Experiments's deprecation policy is based on [Qiskit's
policy](https://github.com/Qiskit/qiskit/blob/1.0.0rc1/DEPRECATION.md) prior to its 1.0 release, but
Copy link
Collaborator

Choose a reason for hiding this comment

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

One of the reasons to still link to the Qiskit policy despite laying a mostly complete policy below is that the Qiskit policy has some good suggestions on how to implement deprecations. We might mention that here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it's a bit awkward that we have our own usage examples but the Qiskit policy is more thorough. I pared down what we have currently to the QE specific deprecate_func() example and added a link to the relevant Qiskit policy section.

@wshanks wshanks mentioned this pull request Feb 7, 2024
@coruscating coruscating added this pull request to the merge queue Feb 8, 2024
Merged via the queue into qiskit-community:main with commit e8531c4 Feb 8, 2024
11 checks passed
@coruscating coruscating deleted the 0.6-release-notes branch February 8, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants