qtt.instrument_drivers.virtualAwg.awgs package¶
Submodules¶
qtt.instrument_drivers.virtualAwg.awgs.KeysightM3202A module¶
-
class
qtt.instrument_drivers.virtualAwg.awgs.KeysightM3202A.KeysightM3202A_AWG(awg)[source]¶ Bases:
qtt.instrument_drivers.virtualAwg.awgs.common.AwgCommon-
change_setting(name, value)[source]¶ - Updates a setting of the underlying AWG. The default settings are set during the
constructing of the AWG.
- Parameters
name (str) – The name of the setting, e.g. ‘amplitude’
value (Any) – the value to set the setting, e.g. 2.0 V.
-
disable_outputs(channels=None)[source]¶ - Disables the given channel(s) of the AWG. A run command is required to turn off
the enabled channel(s). No channels argument sets all the channels to disabled.
-
enable_outputs(channels=None)[source]¶ - Enables the given channel(s) of the AWG. A run command is required to turn on
the enabled channel(s). No channels argument sets all the channels to enabled.
-
property
fetch_awg¶ Gets the underlying AWG instance, e.g. the Tektronix_AWG5014 object.
- Returns
The AWG instance.
-
retrieve_gain()[source]¶ Gets the gain of all AWG output channels in arbritrary units.
- Returns
The amplitude of the output channels in arbritrary units.
- Return type
Float
-
retrieve_running_mode()[source]¶ - An AWG has certain running modes for the output channels. This functions
gets the running mode.
- Returns
The running mode of the AWG, e.g. continues, sequencing.
- Return type
String
-
retrieve_sampling_rate()[source]¶ Gets the number of samples the AWG outputs per second.
- Returns
The number of samples the AWG outputs per second.
- Return type
Int
-
retrieve_setting(name)[source]¶ Gets a setting from the AWG.
- Parameters
setting – The name of the setting, e.g. ‘amplitude’
- Returns
The value of the setting, e.g. 2.0 V.
- Return type
Any
-
update_gain(gain)[source]¶ Sets the gain of all AWG output channels.
- Parameters
gain (float) – The amplitude of the output channels in arbritrary units.
-
update_running_mode(mode)[source]¶ - An AWG has certain running modes for the output channels. This function
sets the running mode.
- Parameters
mode (Any) – The running mode of the AWG, e.g. continues, sequencing.
-
update_sampling_rate(sampling_rate)[source]¶ Sets the sampling rate of the AWG.
- Parameters
sampling_rate (int) – The number of samples the AWG outputs per second.
-
upload_waveforms(sequence_names, sequence_channels, sequence_items, reload=True)[source]¶ Sends the sequences to the AWG.
- Parameters
sequence_names (str, list) – A list with the name of the sequence for each sequence.
sequence_channels (int, list) – A list with the channel for each sequence.
sequence_items (Sequence, list) – The Sequencer sequences.
reload (bool) – Reload all the sequences if True else only change the sequence order.
-
qtt.instrument_drivers.virtualAwg.awgs.Tektronix5014C module¶
-
class
qtt.instrument_drivers.virtualAwg.awgs.Tektronix5014C.Tektronix5014C_AWG(awg: qcodes.instrument_drivers.tektronix.AWG5014.Tektronix_AWG5014)[source]¶ Bases:
qtt.instrument_drivers.virtualAwg.awgs.common.AwgCommon-
change_setting(name: str, value: float) → None[source]¶ - Sets a setting on the AWG. The changeable settings are:
marker_low, marker_high, amplitudes and offset.
- Parameters
name – The name of the setting.
value – The value the setting should get.
-
static
create_waveform_data(names: List[str], channels: List[Tuple[int, …]], items: List[numpy.ndarray]) → Tuple[Dict[int, List[str]], Dict[str, List[numpy.ndarray]]][source]¶ Transforms the data into the correct waveform data.
A marker waveform will be merged with the channel waveform if the channels list contain both the marker waveform and the output waveform on the same channel.
- Parameters
names – The waveform names.
channels – A list containing the channel numbers to which each waveform belongs. E.g. [(1,), (1, 2)]. The second tuple element corresponds to the marker number.
items – A list containing the data for each waveform.
- Returns
A tuple with the channel data and the waveform data. The channel data contains for each waveform the name and to which channel it belongs. The waveform data contains for each waveform the name and the actual waveform.
- Raises
ValueError – If the number of elements in names, channels and items do not match.
-
disable_outputs(channels: Optional[List[int]] = None) → None[source]¶ Disables the outputs for the given channels.
This function equals disabling the CH1, .. CH4 buttons on the AWG.
- Parameters
channels – A list with the channel numbers. All channels are enabled, if no value is given.
- Raises
ValueError – If channels contains an invalid channel number.
-
enable_outputs(channels: Optional[List[int]] = None) → None[source]¶ Enables the outputs for the given channels.
This function equals enabling the CH1, .. CH4 buttons on the AWG.
- Parameters
channels – A list with the channel numbers. All channels are enabled, if no value is given.
- Raises
ValueError – If channels contains an invalid channel number.
-
property
fetch_awg¶ Return the AWG instance.
-
get_sequence_length() → int[source]¶ Gets the number of rows in the sequence.
- Returns
The number of rows in the sequence.
-
retrieve_gain() → float[source]¶ Gets the amplitude for all the output channels.
- Returns
The amplitude for all output channels.
- Raises
AwgCommonError – If not all channel amplitudes have the same value. Then the settings in the AWG are off and needs to be reset first.
-
retrieve_running_mode() → float[source]¶ - Sets the running mode. The possible modes are the
continues (CONT) and sequential (SEQ).
- Returns
‘CONT’ or ‘SEQ’.
-
retrieve_sampling_rate() → int[source]¶ Gets the sample rate of the AWG.
- Returns
The sample rate of the AWG in Samples/second.
-
retrieve_setting(name: str) → float[source]¶ - Gets a setting from the AWG. The gettable are:
marker_low, marker_high, amplitudes and offset.
- Parameters
name – The name of the setting.
-
set_sequence_length(row_count: int) → None[source]¶ Sets the number of rows in the sequence.
- Parameters
row_count – The number of rows in the sequence.
-
stop() → None[source]¶ Disables the AWG outputs.
This function equals disabling the Run button on the AWG.
-
update_gain(gain: float) → None[source]¶ Sets the amplitude of the channel outputs.
The amplitude for all channels are set to the same value using this function.
- Parameters
gain – The amplitude of the output channels.
-
update_running_mode(mode: str) → None[source]¶ - Sets the running mode. The possible modes are the
continues (CONT) and sequential (SEQ).
- Parameters
mode – Either ‘CONT’ (continues) or ‘SEQ’ (sequential).
- Raises
ValueError – If the given mode is not ‘CONT’ (continues) or ‘SEQ’ (sequential).
-
update_sampling_rate(sampling_rate: int) → None[source]¶ Sets the sampling rate of the AWG.
- Parameters
sampling_rate – The number of samples the AWG outputs per second.
-
upload_waveforms(sequence_names: List[str], sequence_channels: List[Tuple[int, …]], sequence_items: List[numpy.ndarray], reload: bool = True) → None[source]¶ Uploads the sequence with waveforms to the user defined waveform list.
- Parameters
sequences_names – The names of the waveforms.
sequence_channels – A list containing the channel numbers to which each waveform belongs. E.g. [(1,), (1, 2)]. The second tuple element corresponds to the marker number.
sequence_items – A list containing the data for each waveform.
-
qtt.instrument_drivers.virtualAwg.awgs.ZurichInstrumentsHDAWG8 module¶
-
class
qtt.instrument_drivers.virtualAwg.awgs.ZurichInstrumentsHDAWG8.ZurichInstrumentsHDAWG8(awg, awg_number=0)[source]¶ Bases:
qtt.instrument_drivers.virtualAwg.awgs.common.AwgCommon-
change_setting(name, value)[source]¶ - Updates a setting of the underlying AWG. The default settings are set during the
constructing of the AWG.
- Parameters
name (str) – The name of the setting, e.g. ‘amplitude’
value (Any) – the value to set the setting, e.g. 2.0 V.
-
disable_outputs(channels=None)[source]¶ - Disables the given channel(s) of the AWG. A run command is required to turn off
the enabled channel(s). No channels argument sets all the channels to disabled.
-
enable_outputs(channels=None)[source]¶ - Enables the given channel(s) of the AWG. A run command is required to turn on
the enabled channel(s). No channels argument sets all the channels to enabled.
-
property
fetch_awg¶ Gets the underlying AWG instance, e.g. the Tektronix_AWG5014 object.
- Returns
The AWG instance.
-
retrieve_gain()[source]¶ Gets the gain of all AWG output channels in arbritrary units.
- Returns
The amplitude of the output channels in arbritrary units.
- Return type
Float
-
retrieve_running_mode()[source]¶ - An AWG has certain running modes for the output channels. This functions
gets the running mode.
- Returns
The running mode of the AWG, e.g. continues, sequencing.
- Return type
String
-
retrieve_sampling_rate()[source]¶ Gets the number of samples the AWG outputs per second.
- Returns
The number of samples the AWG outputs per second.
- Return type
Int
-
retrieve_setting(name)[source]¶ Gets a setting from the AWG.
- Parameters
setting – The name of the setting, e.g. ‘amplitude’
- Returns
The value of the setting, e.g. 2.0 V.
- Return type
Any
-
update_gain(gain)[source]¶ Set the gain of the device by setting the range of all channels to two times the gain
The range is twice the gain under the assumption that the load on the output channels is 50 Ohm. For a high impedance load the gain equals the range.
-
update_running_mode(mode)[source]¶ - An AWG has certain running modes for the output channels. This function
sets the running mode.
- Parameters
mode (Any) – The running mode of the AWG, e.g. continues, sequencing.
-
update_sampling_rate(sampling_rate)[source]¶ Sets the sampling rate of the AWG.
- Parameters
sampling_rate (int) – The number of samples the AWG outputs per second.
-
upload_waveforms(sequence_names, sequence_channels, sequence_items, reload=True)[source]¶ Sends the sequences to the AWG.
- Parameters
sequence_names (str, list) – A list with the name of the sequence for each sequence.
sequence_channels (int, list) – A list with the channel for each sequence.
sequence_items (Sequence, list) – The Sequencer sequences.
reload (bool) – Reload all the sequences if True else only change the sequence order.
-
qtt.instrument_drivers.virtualAwg.awgs.common module¶
-
class
qtt.instrument_drivers.virtualAwg.awgs.common.AwgCommon(name, channel_numbers, marker_numbers)[source]¶ Bases:
abc.ABC-
abstract
change_setting(name, value)[source]¶ - Updates a setting of the underlying AWG. The default settings are set during the
constructing of the AWG.
- Parameters
name (str) – The name of the setting, e.g. ‘amplitude’
value (Any) – the value to set the setting, e.g. 2.0 V.
-
abstract
disable_outputs(channels=None)[source]¶ - Disables the given channel(s) of the AWG. A run command is required to turn off
the enabled channel(s). No channels argument sets all the channels to disabled.
-
abstract
enable_outputs(channels=None)[source]¶ - Enables the given channel(s) of the AWG. A run command is required to turn on
the enabled channel(s). No channels argument sets all the channels to enabled.
-
abstract property
fetch_awg¶ Gets the underlying AWG instance, e.g. the Tektronix_AWG5014 object.
- Returns
The AWG instance.
-
abstract
retrieve_gain()[source]¶ Gets the gain of all AWG output channels in arbritrary units.
- Returns
The amplitude of the output channels in arbritrary units.
- Return type
Float
-
abstract
retrieve_running_mode()[source]¶ - An AWG has certain running modes for the output channels. This functions
gets the running mode.
- Returns
The running mode of the AWG, e.g. continues, sequencing.
- Return type
String
-
abstract
retrieve_sampling_rate()[source]¶ Gets the number of samples the AWG outputs per second.
- Returns
The number of samples the AWG outputs per second.
- Return type
Int
-
abstract
retrieve_setting(name)[source]¶ Gets a setting from the AWG.
- Parameters
setting – The name of the setting, e.g. ‘amplitude’
- Returns
The value of the setting, e.g. 2.0 V.
- Return type
Any
-
abstract
update_gain(gain)[source]¶ Sets the gain of all AWG output channels.
- Parameters
gain (float) – The amplitude of the output channels in arbritrary units.
-
abstract
update_running_mode(mode)[source]¶ - An AWG has certain running modes for the output channels. This function
sets the running mode.
- Parameters
mode (Any) – The running mode of the AWG, e.g. continues, sequencing.
-
abstract
update_sampling_rate(sampling_rate)[source]¶ Sets the sampling rate of the AWG.
- Parameters
sampling_rate (int) – The number of samples the AWG outputs per second.
-
abstract
upload_waveforms(sequence_names, sequence_channels, sequence_items, reload=True)[source]¶ Sends the sequences to the AWG.
- Parameters
sequence_names (str, list) – A list with the name of the sequence for each sequence.
sequence_channels (int, list) – A list with the channel for each sequence.
sequence_items (Sequence, list) – The Sequencer sequences.
reload (bool) – Reload all the sequences if True else only change the sequence order.
-
abstract