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

Schedule.channels

Returns channels that this schedule uses.

Schedule.duration

Duration of this schedule component.

Schedule.instances_counter

Schedule.instructions

Get the time-ordered instructions from self.

Schedule.name

Name of ScheduleComponent.

Schedule.prefix

Schedule.start_time

Starting time of this schedule component.

Schedule.stop_time

Stopping time of this schedule component.

Schedule.timeslots

Time keeping attribute.

Methods

Schedule.append(schedule[, name])

Return a new schedule with schedule inserted at the maximum time over all channels shared between self and schedule.

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 this Schedule which pass though the provided filters; i.e. an instruction will be retained iff every function in filter_funcs returns True, the instruction occurs on a channel type contained in channels, the instruction type is contained in instruction_types, and the period over which the instruction operates is fully contained in one specified in time_ranges or intervals.

Schedule.flatten()

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 into self at start_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 and schedules.