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

Pulse instructions should be scheduled with delays #3749

Closed
2 tasks
taalexander opened this issue Jan 24, 2020 · 2 comments
Closed
2 tasks

Pulse instructions should be scheduled with delays #3749

taalexander opened this issue Jan 24, 2020 · 2 comments
Assignees
Labels
mod: pulse Related to the Pulse module priority: high type: enhancement It's working, but needs polishing
Projects

Comments

@taalexander
Copy link
Contributor

taalexander commented Jan 24, 2020

What is the expected enhancement?

Currently, all pulse.Instructions are stored in a Schedule with a two-tuple containing the (start_time, Instruction). While this makes it clear the explicit starting time of every pulse it leads to convoluted internal data structures such as TimeslotCollection for tracking the time of all instructions.

It also encourages inefficient operations such as taking the union of two schedules. At first glance this operation should be efficient since all one needs to do is specifying the starting time of the instructions, but this requires verification that no instructions overlap in time in the two schedules resulting in expensive checks. The requirement for such a check to merge two schedules is obvious within the relatively schedules model, as one must look to make sure a delay exists in the first schedule for all instructions of the second schedule to merge.

Furthermore, explicit timing of instructions will become confusing with the introduction of control-flow to quantum programs as it would become difficult to program experiments containing loops that are not unrollable.

We should move to a model where instructions are explicitly scheduled with Delays (think NOPs) of a given duration. This will:

  • Make appending two schedules a much simpler operation as the dependency of instructions will be specified by their order on operands
    • This will allow a simple transformation to a DAG representation of a basic pulse schedule block
  • Have positive performance impacts.
  • Have implications for the current pulse API. I believe this should be mostly internal-facing and that not many changes will exist for users.

Requirements for closure of this issue include:

  • Approved RFC
  • Implementation
@taalexander taalexander added the type: enhancement It's working, but needs polishing label Jan 24, 2020
@taalexander taalexander added this to To do in Pulse via automation Jan 24, 2020
@lcapelluto lcapelluto self-assigned this Jan 31, 2020
@lcapelluto lcapelluto moved this from To do to Assigned in Pulse Feb 7, 2020
@lcapelluto
Copy link
Contributor

RFC started (only a draft now). RFC link added to description. Qiskit/RFCs#16

@taalexander
Copy link
Contributor Author

This has long since merged. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: pulse Related to the Pulse module priority: high type: enhancement It's working, but needs polishing
Projects
No open projects
Pulse
  
Assigned
Development

No branches or pull requests

3 participants