qblox_acq_index_manager#
Utility class for dynamically allocating Qblox acquisition indices and bins and for Qblox sequencers.
Module Contents#
Classes#
Qblox acquisition index and QBlox acquisition bin. |
|
Utility class that keeps track of all the reserved indices, bins for a sequencer. |
Attributes#
Binned type acquisition hardware mapping. |
|
Type for all type acquisition hardware mapping. |
- QbloxAcquisitionBinMapping[source]#
Binned type acquisition hardware mapping.
Each value maps the acquisition index to a hardware bin, which is specified by the Qblox acquisition index, and the Qblox acquisition bin.
- QbloxAcquisitionHardwareMapping[source]#
Type for all type acquisition hardware mapping.
This is a union of types, because the exact mapping type depends on the protocol.
- class QbloxAcquisitionIndexManager[source]#
Utility class that keeps track of all the reserved indices, bins for a sequencer.
Each acquisition channel is mapped to a unique Qblox acquisition index. For binned acquisitions, each new allocation request reserves the Qblox acquisition bins in order (incrementing the bin index by one). For trace and ttl and other acquisitions, the whole Qblox acquisition index is reserved, there, the bin index has no relevance.
- _acq_declaration_dict: dict[str, Any][source]#
Acquisition declaration dictionary.
This data is used in
qblox_instruments.qcodes_drivers.Sequencer
sequence parameter’s “acquisitions”.
- _acq_hardware_mapping_binned: dict[collections.abc.Hashable, QbloxAcquisitionBinMapping][source]#
Acquisition hardware mapping for binned acquisitions.
- _acq_hardware_mapping_not_binned: dict[collections.abc.Hashable, QbloxAcquisitionIndex][source]#
Acquisition hardware mapping for not binned acquisitions.
- _next_free_qblox_acq_bin: list[int] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0][source]#
Maps each Qblox acquisition index to the next free (unreserved) bin.
- _acq_channel_to_qblox_acq_index: dict[collections.abc.Hashable, int][source]#
Maps each acquisition channel to the Qblox acquisition index it uses.
- _not_allowed_multiple_on_channel: set[collections.abc.Hashable][source]#
Specifies which acquisition channels do not allow multiple acquisitions on the same acquisition channel.
- _reserve_qblox_acq_bins(number_of_bins: int, qblox_acq_index: int, acq_channel: collections.abc.Hashable, acq_indices: list[int] | None = None) int [source]#
Reserves the Qblox acquisition bin with the parameters. This function already assumes that the bin is free, not yet used.
Note, number_of_bins must be equal to the length of acq_indices if not None.
- Parameters:
number_of_bins – Number of bins to reserve.
qblox_acq_index – Qblox acquisition index to be used.
acq_channel – Acquisition channel.
acq_indices – Acquisition index. If None, it has no corresponding acquisition index (for example Trace acquisition).
- Returns:
The starting Qblox acquisition bin.
- allocate_bins(acq_channel: collections.abc.Hashable, acq_indices: list[int] | int, sequencer_name: str) tuple[int, int] [source]#
Allocates len(acq_indices) number of Qblox acquisition bins.
- Parameters:
acq_channel – Acquisition channel.
acq_indices – Acquisition index. If None, it has no corresponding acquisition index (for example Trace acquisition).
sequencer_name – Sequencer name.
- Returns:
The Qblox acquisition index, and the Qblox acquisition bin offset as integers.
- Raises:
IndexError – When the QbloxAcquisitionBinManager runs out of bins to allocate.
- allocate_qblox_index(acq_channel: collections.abc.Hashable, sequencer_name: str, allow_multiple_on_channel: bool) int [source]#
Allocates a whole Qblox acquisition index for ttl, trace or other acquisition for the given acquisition channel.
- Parameters:
acq_channel – Acquisition channel.
sequencer_name – Sequencer name.
allow_multiple_on_channel – True if and only if we allow multiple acquisitions on the same acquisition channel.
- Returns:
The Qblox acquisition index.
- Raises:
IndexError – When the QbloxAcquisitionBinManager runs out of acquisition indices to allocate.
- acq_declaration_dict() dict[str, Any] [source]#
Returns the acquisition declaration dict, which is needed for the qblox-instruments. This data is used in
qblox_instruments.qcodes_drivers.Sequencer
sequence parameter’s “acquisitions”.- Returns:
The acquisition declaration dict.
- acq_hardware_mapping() dict[collections.abc.Hashable, QbloxAcquisitionHardwareMapping] [source]#
Returns the acquisition hardware mapping, which is needed for quantify instrument coordinator to figure out which hardware index, bin needs to be mapped to which output acquisition data.
- Returns:
The acquisition hardware mapping.