Qudi
|
Methods to control Pulse Generator running on OK FPGA. More...
Public Member Functions | |
def | __init__ (self, config, kwargs) |
def | on_activate (self) |
def | on_deactivate (self) |
def | get_constraints (self) |
Retrieve the hardware constrains from the Pulsing device. More... | |
def | pulser_on (self) |
Switches the pulsing device on. More... | |
def | pulser_off (self) |
Switches the pulsing device off. More... | |
def | load_waveform (self, load_dict) |
Loads a waveform to the specified channel of the pulsing device. More... | |
def | load_sequence (self, sequence_name) |
Loads a sequence to the channels of the device in order to be ready for playback. More... | |
def | get_loaded_assets (self) |
def | clear_all (self) |
Clears all loaded waveforms from the pulse generators RAM/workspace. More... | |
def | get_status (self) |
Retrieves the status of the pulsing hardware. More... | |
def | get_sample_rate (self) |
Get the sample rate of the pulse generator hardware. More... | |
def | set_sample_rate (self, sample_rate) |
Set the sample rate of the pulse generator hardware. More... | |
def | get_analog_level (self, amplitude=None, offset=None) |
Retrieve the analog amplitude and offset of the provided channels. More... | |
def | set_analog_level (self, amplitude=None, offset=None) |
Set amplitude and/or offset value of the provided analog channel(s). More... | |
def | get_digital_level (self, low=None, high=None) |
Retrieve the digital low and high level of the provided/all channels. More... | |
def | set_digital_level (self, low=None, high=None) |
Set low and/or high value of the provided digital channel. More... | |
def | get_active_channels (self, ch=None) |
Get the active channels of the pulse generator hardware. More... | |
def | set_active_channels (self, ch=None) |
def | write_waveform (self, name, analog_samples, digital_samples, is_first_chunk, is_last_chunk, total_number_of_samples) |
def | write_sequence (self, name, sequence_parameters) |
Write a new sequence on the device memory. More... | |
def | get_waveform_names (self) |
Retrieve the names of all uploaded waveforms on the device. More... | |
def | get_sequence_names (self) |
Retrieve the names of all uploaded sequence on the device. More... | |
def | delete_waveform (self, waveform_name) |
Delete the waveform with name "waveform_name" from the device memory. More... | |
def | delete_sequence (self, sequence_name) |
Delete the sequence with name "sequence_name" from the device memory. More... | |
def | get_interleave (self) |
Check whether Interleave is ON or OFF in AWG. More... | |
def | set_interleave (self, state=False) |
Turns the interleave of an AWG on or off. More... | |
def | write (self, command) |
Sends a command string to the device. More... | |
def | query (self, question=None) |
Asks the device a 'question' and receive and return an answer from it. More... | |
def | reset (self) |
Reset the device. More... | |
def | has_sequence_mode (self) |
Asks the pulse generator whether sequence mode exists. More... | |
![]() | |
def | __init__ (self, manager, name, config=None, callbacks=None, kwargs) |
Initialise Base class object and set up its state machine. More... | |
def | log (self) |
Returns a logger object. | |
def | is_module_threaded (self) |
Returns whether the module shall be started in a thread. | |
def | on_activate (self) |
Method called when module is activated. More... | |
def | on_deactivate (self) |
Method called when module is deactivated. More... | |
def | getStatusVariables (self) |
Return a dict of variable names and their content representing the module state for saving. More... | |
def | setStatusVariables (self, variableDict) |
Give a module a dict of variable names and their content representing the module state. More... | |
def | getConfiguration (self) |
Return the configration dictionary for this module. More... | |
def | get_connector (self, connector_name) |
Return module connected to the given named connector. More... | |
![]() | |
def | __new__ (cls, name, bases, attrs) |
Collect declared Connectors, ConfigOptions and StatusVars into dictionaries. More... | |
Public Attributes | |
fpga | |
current_status | |
![]() | |
module_state | |
connectors | |
Methods to control Pulse Generator running on OK FPGA.
Ch1 A3 Ch2 C5 Ch3 D6 Ch4 B6 Ch5 C7 Ch6 B8 Ch7 D9 Ch8 C9
Example config for copy-paste:
fpga_pulser_ok: module 'fpga_fastcounter.fast_pulser_qo.OkFpgaPulser' fpga_serial '143400058N' fpga_type 'XEM6310_LX150'
def ok_fpga_pulser.OkFpgaPulser.clear_all | ( | self | ) |
Clears all loaded waveforms from the pulse generators RAM/workspace.
def ok_fpga_pulser.OkFpgaPulser.delete_sequence | ( | self, | |
sequence_name | |||
) |
Delete the sequence with name "sequence_name" from the device memory.
str | sequence_name: The name of the sequence to be deleted Optionally a list of sequence names can be passed. |
def ok_fpga_pulser.OkFpgaPulser.delete_waveform | ( | self, | |
waveform_name | |||
) |
Delete the waveform with name "waveform_name" from the device memory.
str | waveform_name: The name of the waveform to be deleted Optionally a list of waveform names can be passed. |
def ok_fpga_pulser.OkFpgaPulser.get_active_channels | ( | self, | |
ch = None |
|||
) |
Get the active channels of the pulse generator hardware.
list | ch: optional, if specific analog or digital channels are needed to be asked without obtaining all the channels. |
Example for an possible input (order is not important): ch = ['a_ch2', 'd_ch2', 'a_ch1', 'd_ch5', 'd_ch1'] then the output might look like {'a_ch2': True, 'd_ch2': False, 'a_ch1': False, 'd_ch5': True, 'd_ch1': False}
If no parameter (or None) is passed to this method all channel states will be returned.
def ok_fpga_pulser.OkFpgaPulser.get_analog_level | ( | self, | |
amplitude = None , |
|||
offset = None |
|||
) |
Retrieve the analog amplitude and offset of the provided channels.
list | amplitude: optional, if the amplitude value (in Volt peak to peak, i.e. the full amplitude) of a specific channel is desired. |
list | offset: optional, if the offset value (in Volt) of a specific channel is desired. |
If nothing (or None) is passed then the levels of all channels will be returned. If no analog channels are present in the device, return just empty dicts.
Example of a possible input: amplitude = ['a_ch1', 'a_ch4'], offset = None to obtain the amplitude of channel 1 and 4 and the offset of all channels {'a_ch1': -0.5, 'a_ch4': 2.0} {'a_ch1': 0.0, 'a_ch2': 0.0, 'a_ch3': 1.0, 'a_ch4': 0.0}
def ok_fpga_pulser.OkFpgaPulser.get_constraints | ( | self | ) |
Retrieve the hardware constrains from the Pulsing device.
Provides all the constraints (e.g. sample_rate, amplitude, total_length_bins, channel_config, ...) related to the pulse generator hardware to the caller.
SEE PulserConstraints CLASS IN pulser_interface.py FOR AVAILABLE CONSTRAINTS!!!
If you are not sure about the meaning, look in other hardware files to get an impression. If still additional constraints are needed, then they have to be added to the PulserConstraints class.
Each scalar parameter is an ScalarConstraints object defined in cor.util.interfaces. Essentially it contains min/max values as well as min step size, default value and unit of the parameter.
PulserConstraints.activation_config differs, since it contain the channel configuration/activation information of the form: {<descriptor_str>: <channel_set>, <descriptor_str>: <channel_set>, ...}
If the constraints cannot be set in the pulsing hardware (e.g. because it might have no sequence mode) just leave it out so that the default is used (only zeros).
def ok_fpga_pulser.OkFpgaPulser.get_digital_level | ( | self, | |
low = None , |
|||
high = None |
|||
) |
Retrieve the digital low and high level of the provided/all channels.
list | low: optional, if the low value (in Volt) of a specific channel is desired. |
list | high: optional, if the high value (in Volt) of a specific channel is desired. |
If nothing (or None) is passed then the levels of all channels are being returned. If no digital channels are present, return just an empty dict.
Example of a possible input: low = ['d_ch1', 'd_ch4'] to obtain the low voltage values of digital channel 1 an 4. A possible answer might be {'d_ch1': -0.5, 'd_ch4': 2.0} {'d_ch1': 1.0, 'd_ch2': 1.0, 'd_ch3': 1.0, 'd_ch4': 4.0} Since no high request was performed, the high values for ALL channels are returned (here 4).
def ok_fpga_pulser.OkFpgaPulser.get_interleave | ( | self | ) |
Check whether Interleave is ON or OFF in AWG.
Will always return False for pulse generator hardware without interleave.
def ok_fpga_pulser.OkFpgaPulser.get_sample_rate | ( | self | ) |
Get the sample rate of the pulse generator hardware.
def ok_fpga_pulser.OkFpgaPulser.get_sequence_names | ( | self | ) |
Retrieve the names of all uploaded sequence on the device.
def ok_fpga_pulser.OkFpgaPulser.get_status | ( | self | ) |
Retrieves the status of the pulsing hardware.
def ok_fpga_pulser.OkFpgaPulser.get_waveform_names | ( | self | ) |
Retrieve the names of all uploaded waveforms on the device.
def ok_fpga_pulser.OkFpgaPulser.has_sequence_mode | ( | self | ) |
Asks the pulse generator whether sequence mode exists.
def ok_fpga_pulser.OkFpgaPulser.load_sequence | ( | self, | |
sequence_name | |||
) |
Loads a sequence to the channels of the device in order to be ready for playback.
For devices that have a workspace (i.e. AWG) this will load the sequence from the device workspace into the channels. For a device without mass memory this will make the waveform/pattern that has been previously written with self.write_waveform ready to play.
dict|list | sequence_name: a dictionary with keys being one of the available channel index and values being the name of the already written waveform to load into the channel. Examples {1: rabi_ch1, 2: rabi_ch2} or {1: rabi_ch2, 2: rabi_ch1} If just a list of waveform names if given, the channel association will be invoked from the channel suffix '_ch1', '_ch2' etc. |
def ok_fpga_pulser.OkFpgaPulser.load_waveform | ( | self, | |
load_dict | |||
) |
Loads a waveform to the specified channel of the pulsing device.
For devices that have a workspace (i.e. AWG) this will load the waveform from the device workspace into the channel. For a device without mass memory this will make the waveform/pattern that has been previously written with self.write_waveform ready to play.
dict|list | load_dict: a dictionary with keys being one of the available channel index and values being the name of the already written waveform to load into the channel. Examples {1: rabi_ch1, 2: rabi_ch2} or {1: rabi_ch2, 2: rabi_ch1} If just a list of waveform names if given, the channel association will be invoked from the channel suffix '_ch1', '_ch2' etc. |
def ok_fpga_pulser.OkFpgaPulser.pulser_off | ( | self | ) |
Switches the pulsing device off.
def ok_fpga_pulser.OkFpgaPulser.pulser_on | ( | self | ) |
Switches the pulsing device on.
def ok_fpga_pulser.OkFpgaPulser.query | ( | self, | |
question = None |
|||
) |
Asks the device a 'question' and receive and return an answer from it.
str | question: string containing the command |
def ok_fpga_pulser.OkFpgaPulser.reset | ( | self | ) |
Reset the device.
def ok_fpga_pulser.OkFpgaPulser.set_analog_level | ( | self, | |
amplitude = None , |
|||
offset = None |
|||
) |
Set amplitude and/or offset value of the provided analog channel(s).
dict | amplitude: dictionary, with key being the channel descriptor string (i.e. 'a_ch1', 'a_ch2') and items being the amplitude values (in Volt peak to peak, i.e. the full amplitude) for the desired channel. |
dict | offset: dictionary, with key being the channel descriptor string (i.e. 'a_ch1', 'a_ch2') and items being the offset values (in absolute volt) for the desired channel. |
If nothing is passed then the command will return the current amplitudes/offsets.
def ok_fpga_pulser.OkFpgaPulser.set_digital_level | ( | self, | |
low = None , |
|||
high = None |
|||
) |
Set low and/or high value of the provided digital channel.
dict | low: dictionary, with key being the channel descriptor string (i.e. 'd_ch1', 'd_ch2') and items being the low values (in volt) for the desired channel. |
dict | high: dictionary, with key being the channel descriptor string (i.e. 'd_ch1', 'd_ch2') and items being the high values (in volt) for the desired channel. |
If nothing is passed then the command will return the current voltage levels.
def ok_fpga_pulser.OkFpgaPulser.set_interleave | ( | self, | |
state = False |
|||
) |
Turns the interleave of an AWG on or off.
bool | state: The state the interleave should be set to (True: ON, False: OFF) |
Unused for pulse generator hardware other than an AWG.
def ok_fpga_pulser.OkFpgaPulser.set_sample_rate | ( | self, | |
sample_rate | |||
) |
Set the sample rate of the pulse generator hardware.
float | sample_rate: The sampling rate to be set (in Hz) |
def ok_fpga_pulser.OkFpgaPulser.write | ( | self, | |
command | |||
) |
Sends a command string to the device.
str | command: string containing the command |
def ok_fpga_pulser.OkFpgaPulser.write_sequence | ( | self, | |
name, | |||
sequence_parameters | |||
) |
Write a new sequence on the device memory.
str | name: the name of the waveform to be created/append to |
dict | sequence_parameters: dictionary containing the parameters for a sequence |