|
def | __init__ (self, config, kwargs) |
|
def | on_activate (self) |
| Initialisation performed during activation of the module.
|
|
def | on_deactivate (self) |
| Deinitialisation performed during deactivation of the module.
|
|
def | pulse_generator_settings (self) |
| Pulse generator control methods and properties.
|
|
def | pulse_generator_settings (self, settings_dict) |
|
def | pulse_generator_constraints (self) |
|
def | sampled_waveforms (self) |
|
def | sampled_sequences (self) |
|
def | analog_channels (self) |
|
def | digital_channels (self) |
|
def | loaded_asset (self) |
|
def | set_pulse_generator_settings (self, settings_dict=None, kwargs) |
|
def | clear_pulser (self) |
|
def | load_ensemble (self, ensemble) |
|
def | load_sequence (self, sequence) |
|
def | generate_methods (self) |
| Waveform/Sequence generation control methods and properties.
|
|
def | generate_method_params (self) |
|
def | generation_parameters (self) |
|
def | generation_parameters (self, settings_dict) |
|
def | saved_pulse_blocks (self) |
|
def | saved_pulse_block_ensembles (self) |
|
def | saved_pulse_sequences (self) |
|
def | set_generation_parameters (self, settings_dict=None, kwargs) |
|
def | save_block (self, block) |
| Saves a PulseBlock instance. More...
|
|
def | get_block (self, name) |
|
def | delete_block (self, name) |
| Remove the serialized object "name" from the block list and HDD. More...
|
|
def | save_ensemble (self, ensemble) |
| Saves a PulseBlockEnsemble instance. More...
|
|
def | get_ensemble (self, name) |
|
def | delete_ensemble (self, name) |
|
def | save_sequence (self, sequence) |
| Saves a PulseSequence instance. More...
|
|
def | get_sequence (self, name) |
|
def | delete_sequence (self, name) |
|
def | generate_predefined_sequence (self, predefined_sequence_name, kwargs_dict) |
|
def | get_ensemble_info (self, ensemble) |
|
def | get_sequence_info (self, sequence) |
|
def | analyze_block_ensemble (self, ensemble) |
|
def | analyze_sequence (self, sequence) |
|
def | sample_pulse_block_ensemble (self, ensemble, offset_bin=0, name_tag=None) |
| General sampling of a PulseBlockEnsemble object, which serves as the construction plan. More...
|
|
def | sample_pulse_sequence (self, sequence) |
| Samples the PulseSequence object, which serves as the construction plan. More...
|
|
|
| pulsegenerator = Connector(interface='PulserInterface') |
|
| additional_methods_dir |
|
| sigBlockDictUpdated = QtCore.Signal(dict) |
|
| sigEnsembleDictUpdated = QtCore.Signal(dict) |
|
| sigSequenceDictUpdated = QtCore.Signal(dict) |
|
| sigSampleEnsembleComplete = QtCore.Signal(object) |
|
| sigSampleSequenceComplete = QtCore.Signal(object) |
|
| sigLoadedAssetUpdated = QtCore.Signal(str, str) |
|
| sigGeneratorSettingsUpdated = QtCore.Signal(dict) |
|
| sigSamplingSettingsUpdated = QtCore.Signal(dict) |
|
| sigAvailableWaveformsUpdated = QtCore.Signal(list) |
|
| sigAvailableSequencesUpdated = QtCore.Signal(list) |
|
| sigPredefinedSequenceGenerated = QtCore.Signal(object, bool) |
|
This is the Logic class for the pulse (sequence) generation.
It is responsible for creating the theoretical (ideal) contruction plan for a pulse sequence or waveform (digital and/or analog) by creating PulseBlockElements, PulseBlocks, PulseBlockEnsembles and PulseSequences. Based on these objects the logic can sample waveforms according to the underlying hardware constraints (especially the sample rate) and upload these samples to the connected pulse generator hardware.
This logic is also responsible to manipulate and read back hardware settings for waveform/sequence playback (pp-amplitude, sample rate, active channels etc.).
def sequence_generator_logic.SequenceGeneratorLogic.sample_pulse_block_ensemble |
( |
|
self, |
|
|
|
ensemble, |
|
|
|
offset_bin = 0 , |
|
|
|
name_tag = None |
|
) |
| |
General sampling of a PulseBlockEnsemble object, which serves as the construction plan.
- Parameters
-
str|PulseBlockEnsemble | ensemble: PulseBlockEnsemble instance or name of a saved PulseBlockEnsemble to sample |
int | offset_bin: If many pulse ensembles are samples sequentially, then the offset_bin of the previous sampling can be passed to maintain rotating frame across pulse_block_ensembles |
str | name_tag: a name tag, which is used to keep the sampled files together, which where sampled from the same PulseBlockEnsemble object but where different offset_bins were used. |
- Returns
- tuple: of length 3 with (offset_bin, created_waveforms, ensemble_info). offset_bin: integer, which is used for maintaining the rotation frame created_waveforms: list, a list of created waveform names ensemble_info: dict, information about the ensemble returned by analyze_block_ensemble
This method is creating the actual samples (voltages and logic states) for each time step of the analog and digital channels specified in the PulseBlockEnsemble. Therefore it iterates through all blocks, repetitions and elements of the ensemble and calculates the exact voltages (float64) according to the specified math_function. The samples are later on stored inside a float32 array. So each element is calculated with high precision (float64) and then down-converted to float32 to be stored.
To preserve the rotating frame, an offset counter is used to indicate the absolute time within the ensemble. All calculations are done with time bins (dtype=int) to avoid rounding errors. Only in the last step when a single PulseBlockElement object is sampled these integer bin values are translated into a floating point time.
The chunkwise write mode is used to save memory usage at the expense of time. In other words: The whole sample arrays are never created at any time. This results in more function calls and general overhead causing much longer time to complete.
In addition the pulse_block_ensemble gets analyzed and important parameters used during sampling get stored in the ensemble object "sampling_information" attribute. It is a dictionary containing: TODO Add parameters that are stored
def sequence_generator_logic.SequenceGeneratorLogic.sample_pulse_sequence |
( |
|
self, |
|
|
|
sequence |
|
) |
| |
Samples the PulseSequence object, which serves as the construction plan.
- Parameters
-
str|PulseSequence | sequence: Name or instance of the PulseSequence to be sampled. |
The sequence object is sampled by call subsequently the sampling routine for the PulseBlockEnsemble objects and passing if needed the rotating frame option.
Right now two 'simple' methods of sampling where implemented, which reuse the sample function for the Pulse_Block_Ensembles. One, which samples by preserving the phase (i.e. staying in the rotating frame) and the other which samples without keep a phase relationship between the different entries of the PulseSequence object. ATTENTION The phase preservation within a single PulseBlockEnsemble is NOT affected by this method.
More sophisticated sequence sampling method can be implemented here.