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
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
04e2c79
Handle ScheduleBlock and pulse gates loading
eliarbel Feb 9, 2025
39d12b4
Add documentation and remove redundant code
eliarbel Feb 9, 2025
ddb4f56
Limit QPY version when generating circuits for compatibility test
eliarbel Feb 9, 2025
b121665
Remove FakeBackend, FakeQasmBackend, FakePulseBackend, subclasses, an…
ElePT Feb 10, 2025
edcc14a
Remove FakeBackend references from docs (these classes will be remove…
ElePT Feb 10, 2025
08defbf
Generate visuals for test (DUMMY COMMIT)
ElePT Feb 10, 2025
09ff087
Another attempt after fixing lint
ElePT Feb 10, 2025
6c8d616
Desperate measures until better measures are found
ElePT Feb 10, 2025
06a8551
Handle QPY compatibility testing. Misc other fixes
eliarbel Feb 11, 2025
32ffb79
Merge branch 'main' into remove-pulse-qpy
eliarbel Feb 11, 2025
9ea2fd3
Update qiskit/qpy/binary_io/circuits.py
eliarbel Feb 12, 2025
7aff7e2
Merge branch 'main' into remove-pulse-qpy
eliarbel Feb 12, 2025
27ffb51
Remove pulse from GenericBackendV2
eliarbel Feb 12, 2025
173cea2
Merge remote-tracking branch 'upstream/main' into remove-pulse-generi…
eliarbel Feb 13, 2025
ff66b38
Merge branch 'remove-pulse-qpy' into remove-pulse-calibrations
eliarbel Feb 13, 2025
5eb63c9
Merge branch 'remove-pulse-generic-backendv2' into remove-pulse-calib…
eliarbel Feb 13, 2025
082a26f
First pass
eliarbel Feb 14, 2025
2478527
Merge remote-tracking branch 'upstream/main' into remove-pulse-qpy
eliarbel Feb 16, 2025
17ffa6f
Avoid generating pulse circuits in load_qpy & version >= 2.0
eliarbel Feb 16, 2025
86bbeaf
Merge branch 'remove-pulse-qpy' of github.com:eliarbel/qiskit into re…
eliarbel Feb 16, 2025
f0a4f42
Merge remote-tracking branch 'upstream/main' into remove-pulse-calibr…
eliarbel Feb 16, 2025
c2fabe4
Remove more stuff
eliarbel Feb 16, 2025
056105d
Merge branch 'main' of https://github.com/Qiskit/qiskit into remove-f…
ElePT Feb 17, 2025
81c316b
Add renos
ElePT Feb 17, 2025
c46924a
Fix scheduling tests
ElePT Feb 17, 2025
fb53bab
Add reno and some misc fixes
eliarbel Feb 17, 2025
935892b
Remove BackendV1, converters, models, qobj and update tests.
ElePT Feb 17, 2025
da93a94
Fix lint
ElePT Feb 17, 2025
c44bc0f
Add recent changes from remove-pulse-qpy branch
eliarbel Feb 17, 2025
f21f661
Merge branch 'remove-pulse-qpy' into remove-pulse
eliarbel Feb 18, 2025
02ec588
Merge branch 'remove-pulse-calibrations' into remove-pulse
eliarbel Feb 18, 2025
c45823b
Merge remote-tracking branch 'elena/remove-fake-v1' into remove-pulse
eliarbel Feb 18, 2025
f35e18c
Merge remote-tracking branch 'elena/macro-removal' into remove-pulse
eliarbel Feb 18, 2025
f24d391
Remove pulse module files, visualization & testing
eliarbel Feb 18, 2025
7cdee9d
Add reno
eliarbel Feb 18, 2025
30fd28e
Merge remote-tracking branch 'upstream/main' into remove-pulse-qpy
eliarbel Feb 19, 2025
46510ac
Raise QpyError when loading ScheduleBlock payloads
eliarbel Feb 19, 2025
888545b
Clean up TODOs
eliarbel Feb 19, 2025
85c77b7
Merge branch 'remove-pulse-qpy' into remove-pulse-calibrations
eliarbel Feb 19, 2025
3c1435a
Merge branch 'remove-pulse-calibrations' into remove-pulse
eliarbel Feb 19, 2025
191d949
Remove NormalizeRXAngle and rzx_templates
eliarbel Feb 19, 2025
b20ef1d
Merge remote-tracking branch 'upstream/main' into remove-pulse-calibr…
eliarbel Feb 20, 2025
0a760e7
Unify transpiler renos w.r.t pulse removal
eliarbel Feb 20, 2025
de00534
Merge branch 'remove-pulse-calibrations' into remove-pulse
eliarbel Feb 20, 2025
9185254
Merge remote-tracking branch 'upstream/main' into remove-pulse
eliarbel Mar 3, 2025
e5e314e
Update reno and minor cosmetic changes
eliarbel Mar 3, 2025
3474883
Merge branch 'main' into remove-pulse
eliarbel Mar 4, 2025
fcf0c3f
Merge branch 'main' into remove-pulse
eliarbel Mar 4, 2025
1848146
Delete a test file that unintentionally got in
eliarbel Mar 4, 2025
2907895
Merge branch 'main' into remove-pulse
eliarbel Mar 5, 2025
0f8b9f6
Merge remote-tracking branch 'origin/main' into remove-pulse
mtreinish Mar 6, 2025
10642dc
Update releasenotes/notes/remove-pulse-eb43f66499092489.yaml
mtreinish Mar 6, 2025
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
2 changes: 0 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@

# Qiskit folders (also their corresponding tests)
providers/ @Qiskit/terra-core @jyu00
pulse/ @Qiskit/terra-core @eggerdj @wshanks @nkanazawa1989
scheduler/ @Qiskit/terra-core @eggerdj @wshanks @nkanazawa1989
visualization/ @Qiskit/terra-core @nonhermitian
primitives/ @Qiskit/terra-core @Qiskit/qiskit-primitives
# Override the release notes directories to have _no_ code owners, so any review
Expand Down
1 change: 1 addition & 0 deletions crates/accelerate/src/basis/basis_translator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?

fn extract_basis_target_circ(
circuit: &Bound<PyAny>,
source_basis: &mut IndexSet<GateIdentifier, ahash::RandomState>,
Expand Down
7 changes: 0 additions & 7 deletions docs/apidoc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ Serialization:
qasm3
qpy

Pulse-level programming:

.. toctree::
:maxdepth: 1

pulse

Other:

.. toctree::
Expand Down
6 changes: 0 additions & 6 deletions docs/apidoc/pulse.rst

This file was deleted.

10 changes: 0 additions & 10 deletions qiskit/compiler/transpiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from qiskit.circuit.quantumcircuit import QuantumCircuit
from qiskit.dagcircuit import DAGCircuit
from qiskit.providers.backend import Backend
from qiskit.pulse import Schedule
from qiskit.transpiler import Layout, CouplingMap, PropertySet
from qiskit.transpiler.basepasses import BasePass
from qiskit.transpiler.exceptions import TranspilerError, CircuitTooWideForTarget
Expand Down Expand Up @@ -302,16 +301,7 @@ def callback_func(**kwargs):
if not circuits:
return []

# transpiling schedules is not supported yet.
start_time = time()
if all(isinstance(c, Schedule) for c in circuits):
warnings.warn("Transpiling schedules is not supported yet.", UserWarning)
end_time = time()
_log_transpile_time(start_time, end_time)
if arg_circuits_list:
return circuits
else:
return circuits[0]

if optimization_level is None:
# Take optimization level from the configuration or 1 as default.
Expand Down
3 changes: 1 addition & 2 deletions qiskit/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@
a backend and its operation for the :mod:`~qiskit.transpiler` so that circuits
can be compiled to something that is optimized and can execute on the
backend. It also provides the :meth:`~qiskit.providers.BackendV2.run` method which can
run the :class:`~qiskit.circuit.QuantumCircuit` objects and/or
:class:`~qiskit.pulse.Schedule` objects. This enables users and other Qiskit
run the :class:`~qiskit.circuit.QuantumCircuit` objects. This enables users and other Qiskit
APIs to get results from
executing circuits on devices in a standard
fashion regardless of how the backend is implemented. At a high level the basic
Expand Down
93 changes: 4 additions & 89 deletions qiskit/providers/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
from abc import ABC
from abc import abstractmethod
import datetime
from typing import List, Union, Iterable, Tuple
from typing import List, Union, Tuple

from qiskit.circuit.gate import Instruction
from qiskit.utils.deprecate_pulse import deprecate_pulse_dependency


class Backend:
Expand Down Expand Up @@ -202,7 +201,7 @@ def instruction_durations(self):
@property
@abstractmethod
def max_circuits(self):
"""The maximum number of circuits (or Pulse schedules) that can be
"""The maximum number of circuits that can be
run in a single job.

If there is no limit this will return None
Expand Down Expand Up @@ -267,18 +266,6 @@ def meas_map(self) -> List[List[int]]:
"""
raise NotImplementedError

@property
@deprecate_pulse_dependency(is_property=True)
def instruction_schedule_map(self):
"""Return the :class:`~qiskit.pulse.InstructionScheduleMap` for the
instructions defined in this backend's target."""
return self._instruction_schedule_map

@property
def _instruction_schedule_map(self):
"""An alternative private path to be used internally to avoid pulse deprecation warnings."""
return self.target._get_instruction_schedule_map()

def qubit_properties(
self, qubit: Union[int, List[int]]
) -> Union[QubitProperties, List[QubitProperties]]:
Expand Down Expand Up @@ -313,77 +300,6 @@ def qubit_properties(
return self.target.qubit_properties[qubit]
return [self.target.qubit_properties[q] for q in qubit]

@deprecate_pulse_dependency
def drive_channel(self, qubit: int):
"""Return the drive channel for the given qubit.

This is required to be implemented if the backend supports Pulse
scheduling.

Returns:
DriveChannel: The Qubit drive channel

Raises:
NotImplementedError: if the backend doesn't support querying the
measurement mapping
"""
raise NotImplementedError

@deprecate_pulse_dependency
def measure_channel(self, qubit: int):
"""Return the measure stimulus channel for the given qubit.

This is required to be implemented if the backend supports Pulse
scheduling.

Returns:
MeasureChannel: The Qubit measurement stimulus line

Raises:
NotImplementedError: if the backend doesn't support querying the
measurement mapping
"""
raise NotImplementedError

@deprecate_pulse_dependency
def acquire_channel(self, qubit: int):
"""Return the acquisition channel for the given qubit.

This is required to be implemented if the backend supports Pulse
scheduling.

Returns:
AcquireChannel: The Qubit measurement acquisition line.

Raises:
NotImplementedError: if the backend doesn't support querying the
measurement mapping
"""
raise NotImplementedError

@deprecate_pulse_dependency
def control_channel(self, qubits: Iterable[int]):
"""Return the secondary drive channel for the given qubit

This is typically utilized for controlling multiqubit interactions.
This channel is derived from other channels.

This is required to be implemented if the backend supports Pulse
scheduling.

Args:
qubits: Tuple or list of qubits of the form
``(control_qubit, target_qubit)``.

Returns:
List[ControlChannel]: The multi qubit control line.

Raises:
NotImplementedError: if the backend doesn't support querying the
measurement mapping
"""
raise NotImplementedError

def set_options(self, **fields):
"""Set the options fields for the backend

Expand Down Expand Up @@ -433,9 +349,8 @@ def run(self, run_input, **options):
class can handle either situation.

Args:
run_input (QuantumCircuit or Schedule or ScheduleBlock or list): An
individual or a list of :class:`.QuantumCircuit`,
:class:`~qiskit.pulse.ScheduleBlock`, or :class:`~qiskit.pulse.Schedule` objects to
run_input (QuantumCircuit or list): An
individual or a list of :class:`.QuantumCircuit` objects to
run on the backend.
options: Any kwarg options to pass to the backend for running the
config. If a key is also present in the options
Expand Down
8 changes: 3 additions & 5 deletions qiskit/providers/fake_provider/generic_backend_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,13 @@ def run(self, run_input, **options):
"""Run on the backend using a simulator.

This method runs circuit jobs (an individual or a list of :class:`~.QuantumCircuit`
) and pulse jobs (an individual or a list of :class:`~.Schedule` or
:class:`~.ScheduleBlock`) using :class:`~.BasicSimulator` or Aer simulator and returns a
) using :class:`~.BasicSimulator` or Aer simulator and returns a
:class:`~qiskit.providers.Job` object.

If qiskit-aer is installed, jobs will be run using the ``AerSimulator`` with
noise model of the backend. Otherwise, jobs will be run using the
``BasicSimulator`` simulator without noise.

Noisy simulations of pulse jobs are not yet supported in :class:`~.GenericBackendV2`.

Args:
run_input (QuantumCircuit or list): An
individual or a list of :class:`~qiskit.circuit.QuantumCircuit`
Expand All @@ -332,7 +329,8 @@ def run(self, run_input, **options):
Job: The job object for the run

Raises:
QiskitError: If a pulse job is supplied and qiskit_aer is not installed.
QiskitError: If input is not :class:`~qiskit.circuit.QuantumCircuit` or a list of
:class:`~qiskit.circuit.QuantumCircuit` objects.
"""
circuits = run_input
if not isinstance(circuits, QuantumCircuit) and (
Expand Down
158 changes: 0 additions & 158 deletions qiskit/pulse/__init__.py

This file was deleted.

Loading