Schedule¶
- class Schedule(*schedules, name=None)[source]¶
A quantum program schedule with exact time constraints for its instructions, operating over all input signal channels and supporting special syntaxes for building.
Create an empty schedule.
- Parameters
*schedules – Child Schedules of this parent Schedule. May either be passed as the list of schedules, or a list of
(start_time, schedule)
pairs.name (
Optional
[str
]) – Name of this schedule. Defaults to an autogenerated string if not provided.
Attributes
Returns channels that this schedule uses.
Duration of this schedule component.
Get the time-ordered instructions from self.
Name of ScheduleComponent.
Starting time of this schedule component.
Stopping time of this schedule component.
Time keeping attribute.
Methods
Schedule.append
(schedule[, name])Return a new schedule with
schedule
inserted at the maximum time over all channels shared betweenself
andschedule
.Schedule.ch_duration
(*channels)Return the time of the end of the last instruction over the supplied channels.
Schedule.ch_start_time
(*channels)Return the time of the start of the first instruction over the supplied channels.
Schedule.ch_stop_time
(*channels)Return maximum start time over supplied channels.
Schedule.draw
([dt, style, filename, …])Plot the schedule.
Schedule.exclude
(*filter_funcs[, channels, …])Return a Schedule with only the instructions from this Schedule failing at least one of the provided filters. This method is the complement of
self.filter
, so that::.Schedule.filter
(*filter_funcs[, channels, …])Return a new
Schedule
with only the instructions from thisSchedule
which pass though the provided filters; i.e. an instruction will be retained iff every function infilter_funcs
returnsTrue
, the instruction occurs on a channel type contained inchannels
, the instruction type is contained ininstruction_types
, and the period over which the instruction operates is fully contained in one specified intime_ranges
orintervals
.Return a new schedule which is the flattened schedule contained all
instructions
.Schedule.insert
(start_time, schedule[, name])Return a new schedule with
schedule
inserted intoself
atstart_time
.Schedule.shift
(time[, name])Return a new schedule shifted forward by
time
.Schedule.union
(*schedules[, name])Return a new schedule which is the union of both
self
andschedules
.