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

Remove pulse module files, pulse visualization and final cleanup #13872

Merged
merged 52 commits into from
Mar 6, 2025

Conversation

eliarbel
Copy link
Contributor

@eliarbel eliarbel commented Feb 18, 2025

Summary

This is the final PR to actually remove pulse. It removes all pulse module files, its visualization support, related testing and a few other related leftovers.

Pulse, you meant a lot to many of us, RIP! (in Qiskit Dynamics) 〰️ 👋

Details and comments

Based on: #13861, #13793 and #13805. Will be on hold until these are merged.

Closes #13662

eliarbel and others added 30 commits February 9, 2025 12:41
…y tests that checked V1 functionality, mitigators (independent removal). Update rest of unit tests to use GenericBackendV2
Co-authored-by: Raynel Sanchez <87539502+raynelfss@users.noreply.github.com>
This commit removes pulse-related functionality from GenericBackendV2, as
part of Pulse removal in Qiskit 2.0. This includes the ability to initialize
the backend with custom calibrations and query it for channel information.
Also, various clean ups where made to accommodate for the updated API of
GenericBackendV2.
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

github-merge-queue bot pushed a commit to qiskit-community/qiskit-experiments that referenced this pull request Mar 2, 2025
This change prepares the package for Qiskit 2.0 by removing all features
related to Qiskit Pulse which is removed in Qiskit 2.0 (see for example
[Qiskit#13872](Qiskit/qiskit#13872)). It
includes several related changes:

* Remove all experiments that require pulse schedules to run on a
backend with a set of standard basis gates. The set of removed
experiments includes `Rabi` and `QubitSpectroscopy` for example.
Additionally, analysis classes used only the removed experiments are
also removed. These classes should have all emitted deprecation warnings
in the previous release.
* Remove all code related pulse calibration management, including the
`Calibrations` and `BasisGateLibrary` classes and the calibration
experiment classes. These classes should have all emitted deprecation
warnings in the previous release.
* Deprecate `PulseBackend` and drop `qiskit-dynamics` as a dependency of
`qiskit-experiments[extras]`. This is a last dependency on Qiskit Pulse
that is not fully dropped yet because it was not previously deprecated.
* Convert the `jupyter-execute` cells in the docs to use Qiskit Aer or
mock backends instead of using `PulseBackend`.
* Remove pulse support from other experiments and classes that have not
been removed including methods of `BackendData` and `BackendTiming` like
`pulse_time` and the feature of `MultiStateDiscrimination` that allowed
it to accept pulse schedules for exciting higher qubit states. Also,
remove the ability to serialize and deserialize pulse schedule blocks
with `ExperimentEncoder` and `ExperimentDecoder`.
* Deprecate `FineZXAmplitude` as it can not be easily used without a
pulse calibration to implement an RZX rotation.
* Update examples in the documentation that previously used removed
experiments to use other experiments that have not been removed.
* Remove support for custom pulse calibrations from randomized
benchmarking experiments and `ParallelExperiment`.
* Add a private `ZZRamseyTestBackend` for the `ZZRamsey` tests and
documentation that is similar to `T2HahnBackend` to provide more
consistency with the other experiment examples that were updated not to
use `PulseBackend`.

Note that a few small pulse features might have been removed without a
release cycle of deprecation warnings. Since the IBM Quantum service was
the main use case of the Qiskit Pulse features and it has already
stopped accepting jobs with Qiskit Pulse calibrations, it was deemed
better to do a clean removal of all pulse features than to adhere
strictly to the deprecation policy.

The changes here focus on the Qiskit Pulse related updates needed for
compatibility with Qiskit 2.0. Some further follow up will also be
necessary to address other incompatibilities with Qiskit 2.0.
mtreinish pushed a commit to Qiskit/qiskit-neko that referenced this pull request Mar 5, 2025
…55)

BackendV1 and qiskit.qobj removals in Qiskit/qiskit#13793 cause the test in qiskit_neko/tests/experiments/test_tomography.py to fail. This is part of the tests that are blocking the Qiskit/qiskit#13793 and Qiskit/qiskit#13872 PR in Qiskit from being merged.

There is a PR in Qiskit Experiments that address these removals: qiskit-community/qiskit-experiments#1526. Until it is merged, we need to skip this failing test.

Tracked in #54
@mtreinish mtreinish removed the on hold Can not fix yet label Mar 6, 2025
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

Overall this LGTM. I found one nit inline but otherwise everything looks good. I'm EoD now so I'm not going to apply the nit fix just so we don't interrupt the CI run that's in progress.

I did rebase this after the other removals merged in the interest of time so I want to make sure I did that correctly before apply the small inline suggestion on the release notes.

@@ -367,6 +367,7 @@ fn extract_basis_target(
/// This needs to use a Python instance of `QuantumCircuit` due to it needing
/// to access `has_calibration_for()` which is unavailable through rust. However,
/// this API will be removed with the deprecation of `Pulse`.
/// TODO: pulse is removed, we can use op.blocks
Copy link
Member

Choose a reason for hiding this comment

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

Do we have an issue to track this?

@@ -1077,10 +1077,11 @@ def load_qpy(qpy_files, version_parts):

from qiskit.qpy.exceptions import QpyError

while pulse_files:
path, version = pulse_files.popitem()
for path, min_version in pulse_files.items():
Copy link
Member

Choose a reason for hiding this comment

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

Oh thanks for updating this based on my comments in the earlier PR. I didn't expect that.

@mtreinish mtreinish enabled auto-merge March 6, 2025 01:49
@mtreinish mtreinish added this pull request to the merge queue Mar 6, 2025
Merged via the queue into Qiskit:main with commit fdd5e96 Mar 6, 2025
20 checks passed
@wshanks
Copy link
Contributor

wshanks commented Mar 6, 2025

Farewell, Pulse! This PR removes me from the CODEOWNERS file. I will miss all the GitHub notifications about random Qiskit PR's after someone merges main into their PR branch and pulls in a change to the pulse module 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Removal Include in the Removed section of the changelog mod: pulse Related to the Pulse module priority: high
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove pulse and its dependencies in Qiskit 2.0
5 participants