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

ScheduleBlock 3/4 - add ScheduleBlock #5854

Merged
merged 209 commits into from
Mar 31, 2021

Conversation

nkanazawa1989
Copy link
Contributor

@nkanazawa1989 nkanazawa1989 commented Feb 16, 2021

Summary

This is 3/4 step of ScheduleBlock implementation #5679

Details and comments

This PR adds ScheduleBlock representation of pulse program that coexists with Schedule. This new representation has notion of transformation instead of the absolute instruction time t0, which allows the pulse builder to generate a lazy scheduled program (i.e. all pulse durations can be parameterized). With this representation we can define fully parameterized pulse schedule.

The output of the pulse builder is replaced with this representation in following PR. The ScheduleBlock should support all methods and properties currently available in the Schedule though it doesn't have explicit timeslots. An abstract class for both Schedule and ScheduleBlock is defined to remove code redundancy, and a function that converts ScheduleBlock into Schedule is defined as qiskit.pulse.transforms.block_to_schedule. This ensures full backward-compatibility for pulse program execution.

TODO

  • util methods, i.e. filter, replace, ...
  • docstring
  • unittest

nkanazawa1989 and others added 5 commits March 31, 2021 00:38
Co-authored-by: Thomas Alexander <thomasalexander2718@gmail.com>
Co-authored-by: Thomas Alexander <thomasalexander2718@gmail.com>
Co-authored-by: Thomas Alexander <thomasalexander2718@gmail.com>
taalexander
taalexander previously approved these changes Mar 30, 2021
eggerdj
eggerdj previously approved these changes Mar 30, 2021
Copy link
Contributor

@eggerdj eggerdj left a comment

Choose a reason for hiding this comment

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

LGTM. Looking forward to seeing this in action.

@mtreinish mtreinish added automerge Changelog: New Feature Include in the "Added" section of the changelog labels Mar 31, 2021
@mtreinish mtreinish added Changelog: API Change Include in the "Changed" section of the changelog Changelog: Deprecation Include in "Deprecated" section of changelog labels Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: API Change Include in the "Changed" section of the changelog Changelog: Deprecation Include in "Deprecated" section of changelog Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants