schedule#

Schedule helper functions.

Module Contents#

Functions#

get_pulse_uuid(→ int)

Return an unique identifier for a pulse.

get_acq_uuid(→ int)

Return an unique identifier for a acquisition protocol.

_generate_acq_info_by_uuid(→ None)

get_acq_info_by_uuid(→ dict[int, dict[str, Any]])

Return a lookup dictionary of unique identifiers of acquisition information.

extract_acquisition_metadata_from_schedule(...)

Extract acquisition metadata from a schedule.

extract_acquisition_metadata_from_acquisition_protocols(...)

Private function containing the logic of extract_acquisition_metadata_from_schedule.

_extract_port_clocks_used(→ set[tuple])

Extracts which port-clock combinations are used in an operation or schedule.

get_pulse_uuid(pulse_info: dict[str, Any], excludes: list[str] = None) int[source]#

Return an unique identifier for a pulse.

Parameters:
  • pulse_info – The pulse information dictionary.

  • excludes – A list of keys to exclude.

Returns:

The uuid hash.

get_acq_uuid(acq_info: dict[str, Any]) int[source]#

Return an unique identifier for a acquisition protocol.

Parameters:

acq_info – The acquisition information dictionary.

Returns:

The uuid hash.

_generate_acq_info_by_uuid(operation: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.ScheduleBase, acqid_acqinfo_dict: dict) None[source]#
get_acq_info_by_uuid(schedule: quantify_scheduler.schedules.schedule.CompiledSchedule) dict[int, dict[str, Any]][source]#

Return a lookup dictionary of unique identifiers of acquisition information.

Parameters:

schedule – The schedule.

extract_acquisition_metadata_from_schedule(schedule: quantify_scheduler.schedules.schedule.Schedule) quantify_scheduler.schedules.schedule.AcquisitionMetadata[source]#

Extract acquisition metadata from a schedule.

This function operates under certain assumptions with respect to the schedule.

  • The acquisition_metadata should be sufficient to initialize the xarray dataset (described in quantify-core !212) that executing the schedule will result in.

  • All measurements in the schedule use the same acquisition protocol.

  • The used acquisition index channel combinations for each measurement are unique.

  • The used acquisition indices for each channel are the same.

  • When BinMode is APPEND The number of data points per acquisition index assumed to be given by the schedule’s repetition property. This implies no support for feedback (conditional measurements).

Parameters:

schedule – schedule containing measurements from which acquisition metadata can be extracted.

Returns:

The acquisition metadata provides a summary of the acquisition protocol, bin-mode, return-type and acquisition indices of the acquisitions in the schedule.

Raises:

AssertionError – If not all acquisition protocols in a schedule are the same. If not all acquisitions use the same bin_mode. If the return type of the acquisitions is different.

extract_acquisition_metadata_from_acquisition_protocols(acquisition_protocols: list[dict[str, Any]], repetitions: int) quantify_scheduler.schedules.schedule.AcquisitionMetadata[source]#

Private function containing the logic of extract_acquisition_metadata_from_schedule.

The logic is factored out as to work around limitations of the different interfaces required.

Parameters:
  • acquisition_protocols – A list of acquisition protocols.

  • repetitions – How many times the acquisition was repeated.

_extract_port_clocks_used(operation: quantify_scheduler.operations.operation.Operation | quantify_scheduler.schedules.schedule.Schedule) set[tuple][source]#

Extracts which port-clock combinations are used in an operation or schedule.