Time API#
- Time.status()#
Retrieve the synchronization status.
- Properties:
value: None
- Time.arm(slot: int, channel: int, edge_polarity: qblox_instruments.qcodes_drivers.time.Polarity = <Polarity.RISING_EDGE: 1>, sync_ref: qblox_instruments.qcodes_drivers.time.SyncRef = <SyncRef.OFF: 0>) None#
Arms a time capture on the given slot and channel. Edge polarity (rising, falling) and whether to synchronize to the 10 MHz clock can also be specified
- Parameters:
...
- Time.get_capture(slot: int, format: str = 's') int | float#
Gets latest available capture (if any) in the given format
- Parameters:
- Returns:
Current timestamp in the requested format.
- Return type:
- Raises:
ValueError – If the given format is not contemplated
- Time.get_current(format: str = 's') int | float#
Gets current timestamp in the given format
- Parameters:
format (str) – “s”, “ns” or “raw”. Defaults to “s”
- Returns:
Current timestamp in seconds.
- Return type:
- Raises:
NotImplementedError – Functionality not available on this module.
- Time.set_epoch(epoch: float | int | Literal['unix', 'now'] = 'unix', epoch_format: str = 's', authority: str | None = None, pps: qblox_instruments.qcodes_drivers.io_channel_qtm.IOChannelQTM | None = None) None#
Sets epoch
- Parameters:
epoch (float | int | Literal["unix", "now"], optional) –
Set the CTC counter to the specified value, or one of these options:
”unix” (default): CTC counter will be set to how many milliseconds (due to Linux time precision) had passed since 00:00:00 on January 1, 1970 in the moment that the command is executed using CMM local system time.
”now”: CTC counter will be set to 0.
epoch_format (str, optional) – s, ns or raw. By default “s”.
authority (str | None, optional) – The IP of an NTP server. By default None.
pps (IOChannelQTM | None, optional) – If provided, it will wait for the PPS signal and send the adjust for all modules after doing setting the epoch using NTP. By default None.
- Raises:
NotImplementedError – Functionality not available on this module.
- Time.sync_ext_trigger(slot: int, channel: int, trigger_timestamp: Union[float, int] = 0, timeout: Union[float, int] = 1, format: str = 's', edge_polarity: qblox_instruments.qcodes_drivers.time.Polarity = <Polarity.RISING_EDGE: 1>, sync_ref: qblox_instruments.qcodes_drivers.time.SyncRef = <SyncRef.OFF: 0>) float#
Synchronize based on external trigger
- Parameters:
slot (int) – Slot number
channel (int) – Channel number (0-8)
trigger_timestamp (Union[float, int]) – When the trigger pulse will be generated. Will be set to 0 as default.
timeout (Union[float, int]) – How long to wait for a capture while synchronizing, expressed in the unit given by the format argument
format (str) – Time format used throughout this method
- Returns:
Capture timestamp in the given format (if any)
- Return type:
- Raises:
NotImplementedError – Functionality not available on this module.
TimeoutError – No capture completed in the given timeout.