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 calibrations APIs and related functionality #13861

Merged
merged 33 commits into from
Mar 2, 2025

Conversation

eliarbel
Copy link
Contributor

@eliarbel eliarbel commented Feb 17, 2025

Summary

This PR removes the calibration functionality from everywhere in Qiskit, outside of Pulse itself. This includes things like the calibrations property in QuantumCircuit and DAGCircuit, and Target's support for calibrations. It also removes transitive dependencies on the calibrations functionality, e.g. within passes and the scheduler.

Details and comments

The following user-facing parts have been removed (alongside any internal dependencies):

  • Calibration-related APIs (e.g. calibration, has_calibration_for etc.) from QuantumCircuit, DAGCircuit, Target, DAGDependency and InstructionProperties.
  • Logic related to pulse-gate handling in passes.
  • The inst_map argument from generate_preset_pass_manager, transpile, PassManagerConfig and Target.from_configuration.
  • qiskit.scheduler module has been removed.

This PR is based on changes introduced in: #13814

Part of #13662

eliarbel and others added 18 commits February 9, 2025 12:41
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.
@eliarbel eliarbel added on hold Can not fix yet Changelog: Removal Include in the Removed section of the changelog mod: pulse Related to the Pulse module labels Feb 17, 2025
@eliarbel eliarbel added this to the 2.0.0 milestone Feb 17, 2025
@eliarbel eliarbel self-assigned this Feb 17, 2025
@coveralls
Copy link

coveralls commented Feb 17, 2025

Pull Request Test Coverage Report for Build 13606341608

Details

  • 59 of 62 (95.16%) changed or added relevant lines in 21 files are covered.
  • 101 unchanged lines in 16 files lost coverage.
  • Overall coverage increased (+0.3%) to 87.213%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/providers/backend_compat.py 1 2 50.0%
qiskit/visualization/circuit/matplotlib.py 1 3 33.33%
Files with Coverage Reduction New Missed Lines %
crates/accelerate/src/basis/basis_translator/mod.rs 1 89.11%
crates/accelerate/src/unitary_synthesis.rs 1 94.39%
qiskit/providers/fake_provider/generic_backend_v2.py 1 95.87%
qiskit/transpiler/instruction_durations.py 1 75.37%
qiskit/utils/deprecate_pulse.py 1 97.06%
qiskit/providers/backend_compat.py 2 17.65%
qiskit/providers/backend.py 2 78.4%
qiskit/transpiler/preset_passmanagers/generate_preset_pass_manager.py 2 95.27%
qiskit/transpiler/target.py 2 78.81%
crates/circuit/src/dag_circuit.rs 3 87.33%
Totals Coverage Status
Change from base Build 13599804497: 0.3%
Covered Lines: 75467
Relevant Lines: 86532

💛 - Coveralls

@eliarbel eliarbel added mod: transpiler Issues and PRs related to Transpiler mod: circuit Related to the core of the `QuantumCircuit` class or the circuit library labels Feb 17, 2025
@eliarbel eliarbel marked this pull request as ready for review February 20, 2025 11:46
@qiskit-bot
Copy link
Collaborator

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

@eliarbel eliarbel removed the on hold Can not fix yet label Feb 28, 2025
ElePT
ElePT previously approved these changes Feb 28, 2025
Copy link
Contributor

@ElePT ElePT left a comment

Choose a reason for hiding this comment

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

LGTM!! Thanks for this thorough PR. I have a couple of comments but they are tiny and given the queue of removals I would merge this PR now regardless of them.

# does this run have uncalibrated gates?
uncalibrated_p = not has_cals_p or any(not dag._has_calibration_for(g) for g in old_run)
# does this run have gates not in the image of ._decomposers _and_ uncalibrated?
# does this run have gates not in the image of ._decomposers?
Copy link
Contributor

Choose a reason for hiding this comment

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

I find this comment a bit cryptic but probably not the time to pick on it either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the original comment for this execution path. I agree it's cryptic especially since what is .decomposers. Also agree we should not try to address this here and now.

@ElePT ElePT enabled auto-merge February 28, 2025 19:02
@eliarbel
Copy link
Contributor Author

eliarbel commented Mar 1, 2025

Thanks @ElePT for the review and comments, all applied. There was a stuck job from yesterday before your review, hopefully this time it'll go through.

@ElePT ElePT added this pull request to the merge queue Mar 2, 2025
Merged via the queue into Qiskit:main with commit 5184ca4 Mar 2, 2025
20 checks passed
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: circuit Related to the core of the `QuantumCircuit` class or the circuit library mod: pulse Related to the Pulse module mod: transpiler Issues and PRs related to Transpiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants