code: def to_circuit(self) -> Circuit:
          
          circuit = Circuit(device=self.device)
          time = None  # type: Optional[Timestamp]
          for so in self.scheduled_operations:
              if so.time != time:
                  circuit.append(so.operation,
                                 strategy=InsertStrategy.NEW_THEN_INLINE)
                  time = so.time
              else:
                  circuit.append(so.operation,
                                 strategy=InsertStrategy.INLINE)
          return circuit
docs: Convert the schedule to a circuit.
  
          This discards most timing information from the schedule, but does place
          operations that are scheduled at the same time in the same Moment.