28 lines
2.7 KiB
Plaintext
28 lines
2.7 KiB
Plaintext
---
|
|
title: Migrate from Qiskit Pulse to fractional gates
|
|
description: Migrate from using Qiskit Pulse to fractional gates to execute single and two-qubit rotations
|
|
---
|
|
|
|
# Migrate from Qiskit Pulse to fractional gates
|
|
|
|
With the introduction of [fractional gates](../guides/fractional-gates), pulse-level control on all IBM Quantum™ processors has been deprecated and will be removed in early 2025. Additionally, the `qiskit.pulse` module has been deprecated as of the Qiskit SDK v1.3.0 and will be removed in Qiskit SDK v2.0.0. This change was motivated by our ongoing focus on utility-scale experiments and support for users exploring applications that might lead to quantum advantage.
|
|
|
|
## Execute single- and two-qubit rotations directly with fractional gates
|
|
|
|
The most common use-case of pulse-level control was to build custom pulse schedules that modify the `ECR` or `RX` pulses to directly execute single- and two-qubit rotations. The typical process was to use the `RXCalibrationBuilder` and `RZXCalibrationBuilder` (or `RZXCalibrationBuilderNoEcho`) and add either a `RXGate` or `RZXGate` instruction to a QPU's `target`, then build a transpilation pipeline containing the calibration builder passes to calibrate the single- and two-qubit rotations for a specified angle. In the background this created a *calibration*, which is a map between a `ScheduleBlock` and a gate in a `QuantumCircuit`.
|
|
|
|
You can now accomplish this on Heron processors using the new `use_fractional_gates` flag. As specified in the [fractional gates guide](/guides/fractional-gates), both $R_X(\theta)$ and $R_ZZ(\theta)$ must be loaded using this flag, which returns a backend whose `Target` attribute contains information about these gates.
|
|
|
|
```python
|
|
service = QiskitRuntimeService()
|
|
backend = service.backend('ibm_torino', use_fractional_gates=True)
|
|
```
|
|
|
|
|
|
## Use Qiskit Dynamics
|
|
|
|
The `qiskit.pulse` module contained much more functionality than just executing single and two-qubit rotations more efficiently. Much of the control over device physics can be modeled using the [Qiskit Dynamics](https://qiskit-community.github.io/qiskit-dynamics/) package found in the Qiskit Ecosystem. In particular, the package has its own analogous representation of many of the features provided by `qiskit.pulse` in the form of a `qiskit_dynamics.signals` module. The documentation of this package contains a few tutorials which may be helpful:
|
|
|
|
- [Simulating Qiskit Pulse Schedules](https://qiskit-community.github.io/qiskit-dynamics/tutorials/qiskit_pulse.html)
|
|
- [Gradient optimization of a pulse sequence](https://qiskit-community.github.io/qiskit-dynamics/tutorials/optimizing_pulse_sequence.html)
|
|
- [Simulating backends at the pulse-level](https://qiskit-community.github.io/qiskit-dynamics/tutorials/dynamics_backend.html) |