Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version

Circuit Scheduler

qiskit.scheduler

A circuit scheduler compiles a circuit program to a pulse program.


Core API

ScheduleConfig

class qiskit.scheduler.ScheduleConfig(inst_map, meas_map, dt)

GitHub

Configuration for pulse scheduling.

Container for information needed to schedule a QuantumCircuit into a pulse Schedule.

Parameters

  • inst_map (InstructionScheduleMap) – The schedule definition of all gates supported on a backend.
  • meas_map (List[List[int]]) – A list of groups of qubits which have to be measured together.
  • dt (float) – Sample duration.

schedule_circuit

qiskit.scheduler.schedule_circuit.schedule_circuit(circuit, schedule_config, method=None, backend=None)

GitHub

Basic scheduling pass from a circuit to a pulse Schedule, using the backend. If no method is specified, then a basic, as late as possible scheduling pass is performed, i.e. pulses are scheduled to occur as late as possible.

Supported methods:

  • 'as_soon_as_possible': Schedule pulses greedily, as early as possible on a qubit resource. (alias: 'asap')
  • 'as_late_as_possible': Schedule pulses late– keep qubits in the ground state when possible. (alias: 'alap')

Parameters

  • circuit (QuantumCircuit) – The quantum circuit to translate.
  • schedule_config (ScheduleConfig) – Backend specific parameters used for building the Schedule.
  • method (str | None) – The scheduling pass method to use.
  • backend (BackendV1 |BackendV2 | None) – A backend used to build the Schedule, the backend could be BackendV1 or BackendV2.

Returns

Schedule corresponding to the input circuit.

Raises

QiskitError – If method isn’t recognized.

Return type

Schedule


Pulse scheduling methods

as_soon_as_possible

qiskit.scheduler.methods.as_soon_as_possible(circuit, schedule_config, backend=None)

GitHub

Return the pulse Schedule which implements the input circuit using an “as soon as possible” (asap) scheduling policy.

Circuit instructions are first each mapped to equivalent pulse Schedules according to the command definition given by the schedule_config. Then, this circuit instruction-equivalent Schedule is appended at the earliest time at which all qubits involved in the instruction are available.

Parameters

  • circuit (QuantumCircuit) – The quantum circuit to translate.
  • schedule_config (ScheduleConfig) – Backend specific parameters used for building the Schedule.
  • backend (BackendV1 |BackendV2 | None) – A backend used to build the Schedule, the backend could be BackendV1 or BackendV2.

Returns

A schedule corresponding to the input circuit with pulses occurring as early as possible.

Return type

Schedule

as_late_as_possible

qiskit.scheduler.methods.as_late_as_possible(circuit, schedule_config, backend=None)

GitHub

Return the pulse Schedule which implements the input circuit using an “as late as possible” (alap) scheduling policy.

Circuit instructions are first each mapped to equivalent pulse Schedules according to the command definition given by the schedule_config. Then, this circuit instruction-equivalent Schedule is appended at the latest time that it can be without allowing unnecessary time between instructions or allowing instructions with common qubits to overlap.

This method should improves the outcome fidelity over ASAP scheduling, because we may maximize the time that the qubit remains in the ground state.

Parameters

  • circuit (QuantumCircuit) – The quantum circuit to translate.
  • schedule_config (ScheduleConfig) – Backend specific parameters used for building the Schedule.
  • backend (BackendV1 |BackendV2 | None) – A backend used to build the Schedule, the backend could be BackendV1 or BackendV2.

Returns

A schedule corresponding to the input circuit with pulses occurring as late as possible.

Return type

Schedule

Was this page helpful?
Report a bug or request content on GitHub.