ChannelProperties#
- class iqm.pulse.playlist.channel.ChannelProperties(sample_rate, instruction_duration_granularity, instruction_duration_min, compatible_instructions=<factory>, is_iq=False, is_virtual=False, blocks_component=True)#
Bases:
object
Defines the properties of a control or measurement channel.
All ZI instruments (HDAWG, UHFQA, SHFSG, SHFQA) can handle control pulses and waits where the number of samples is
32 + n * 16
, wheren in {0, 1, 2, ...}
.TODO Some of them might be more capable (at least some SHFQA commands can handle
4 + n * 4
) ?Module:
iqm.pulse.playlist.channel
Attributes
Whether content in this channel should block the entire component that it is associated with in the scheduling.
HACK, True iff this is an IQ channel.
Virtual channels are only used on the frontend side during compilation and scheduling.
sample rate of the instrument responsible for the channel (in Hz)
all instruction durations on this channel must be multiples of this granularity (in samples)
all instruction durations on this channel must at least this long (in samples)
instruction types that are allowed on this channel
Methods
Convert a time duration to an integer number of samples at the channel sample rate.
Convert a time duration to number of samples at the channel sample rate.
Convert a time duration in samples at the channel sample rate to seconds.
Round a time duration to the channel granularity.
- Parameters:
- instruction_duration_granularity: int#
all instruction durations on this channel must be multiples of this granularity (in samples)
- instruction_duration_min: int#
all instruction durations on this channel must at least this long (in samples)
- compatible_instructions: tuple[type[Instruction], ...]#
instruction types that are allowed on this channel
- is_virtual: bool = False#
Virtual channels are only used on the frontend side during compilation and scheduling. They are removed from the
Schedule
before it is sent to Station Control. For example, virtual drive channels of computational resonators.
- blocks_component: bool = True#
Whether content in this channel should block the entire component that it is associated with in the scheduling. Typically all physical channels should block their components, but certain virtual channels might not require this.
- duration_to_samples(duration)#
Convert a time duration to number of samples at the channel sample rate.
- duration_to_seconds(duration)#
Convert a time duration in samples at the channel sample rate to seconds.
- duration_to_int_samples(duration, message='Given duration', check_min_samples=True)#
Convert a time duration to an integer number of samples at the channel sample rate.
duration
must be sufficiently close to an integer number of samples, and that number must be something the channel can handle.- Parameters:
duration (float) – time duration in s
message (str) – message identifying the duration we are testing
check_min_samples (bool) – If True, check that the output is at least
instruction_duration_min
.
- Returns:
duration
as an integer number of samples- Raises:
ValueError –
duration
is not close to an integer number of samples, or is otherwise unacceptable to the channel- Return type:
- round_duration_to_granularity(duration, round_up=False, force_min_duration=False)#
Round a time duration to the channel granularity.
- Parameters:
- Returns:
duration
rounded to channel granularity, in s- Return type: