qiskit/pulse/ops.py
def union(*schedules: List[Union[ScheduleComponent, Tuple[int, ScheduleComponent]]],
          name: str = None) -> Schedule:
    """Create a union (and also shift if desired) of all input `Schedule`s.

    Args:
        *schedules: Schedules to take the union of
        name: Name of the new schedule. Defaults to first element of `schedules`
    """
    if name is None and schedules:
        sched = schedules[0]
        if isinstance(sched, (list, tuple)):
            name = sched[1].name
        else:
            name = sched.name
    return Schedule(*schedules, name=name)
def union(*schedules: List[Union[ScheduleComponent, Tuple[int, ScheduleComponent]]],
          name: str = None) -> Schedule:
    """Create a union (and also shift if desired) of all input `Schedule`s.

    Args:
        *schedules: Schedules to take the union of
        name: Name of the new schedule. Defaults to first element of `schedules`
    """
    if name is None and schedules:
        sched = schedules[0]
        if isinstance(sched, (list, tuple)):
            name = sched[1].name
        else:
            name = sched.name
    return Schedule(*schedules, name=name)
Create a union (and also shift if desired) of all input `Schedule`s.

    Args:
        *schedules: Schedules to take the union of
        name: Name of the new schedule. Defaults to first element of `schedules`