Drivers
Arbitrary waveform generator driver
silospin.drivers.zi_hdawg_driver.HdawgDriver(dev_id, server_host='localhost', server_port=8004, api_level=6, interface='1GbE', rf_cores=[1, 2, 3], plunger_channels={'p12': 7, 'p21': 8})Driver class for Zurich HDAWG (Zurich arbitrary waveform generator) instrument. Configured for 4 AWG cores.
_awgs(dict) — Dictionary for 4 AWG cores. Keys correspond to each AWG ("awg1"..."awg4"), values are Zurich AWG core objects._channel_mapping(dict) — Channel mapping for AWG. Takes in RF core and DC channel groupings, returns mapping from AWG core indices to gate indices and channels._command_tables(dict) — Dictionary of command tables uploaded to each AWG core, pulled dicectly from the instrument._connection_settings('dict') — Dictionary of connection settings. Keys/values: "hdawg_id" (str), "server_host" (str), "server_port" (int), "api_level" (int), "interface" (str), "connection_status" (bool)._daq(zhinst.core.ziDAQServer) — Instance of Zurich driver DAQ module._hdawg(zhinst.toolkit.driver.devices.hdawg.HDAWG) — Instance of Zurich HDAWG driver._oscillator_freq(dict) — Dictionary of 16 HDAWG oscillator frequencies. Keys: "osc1"..."osc16" (str). Values: corresponding oscillator frequencies in Hz (float)._run_status(dict) — Dictionary of run status for each core ("awg1"..."awg4"), True if running and False if not._sequences(dict) — Dictionary of sequencer code uploaded to each AWG core (keys correspond to each core "awg1"..."awg4")._session(zhinst.toolkit.session.Session) — Instance of Zurich session for established connection._sines(dict) — Dictionary of 8 HDAWG sine generator properties. Outer keys correspond to the sine wave ("sine1"..."sine8"), with dictionary values as separate dictionaries. Inner dictionary for each sine generator describes propertie of sine generator. Keys/Values: "osc" (int) [oscillator index from 0-15], "phaseshift" (float) [phase shift for oscillator in degrees], "harmonic" (int) [harmonic of sine wave], "amp1" (float) [amplitude on output 1], "amp2" (float) [amplitude on output 2].
assign_osc(sin_num,osc_num)(None.) — Assigns an oscillator index (osc_num from 1-16) to a sine generator (sin_num from 1-8).compile_core(awg_num)(None.) — Compiles specified core awg_num.compile_run_core(awg_num)(None.) — Compiles and runs specified core, awg_num.get_all_awg_parameters()(all_awg_parameters : 'dict') — No input parameters. Returns dictionary current state of the instrument.get_awg(awg_num)(awg_core : 'zhinst.toolkit.driver.nodes.awg.AWG') — Gets AWG core object for awg core awg_num (ranges from 1-4).get_connection_settings(param)(connection_setting : 'str' or 'int' or 'bool'.) — Returns connections setting corresponding to param of the instrument. Parameters include: "hdawg_id" , "server_host" , "server_port" , "api_level" , "interface" , "connection_status".get_modulation_mode(sin_num)(modulation_mode : 'int') — Gets modulation mode for sine generator sin_num ranges from 1-8).get_osc_freq(osc_num)(osc_freq : 'float') — Returns frequency of oscillator osc_num in Hz. osc_num ranges from 1-16.get_out_amp(sin_num,wave_num)(amp : 'float') — Gets output amplitude (in volts) for wave output wave_num (ranges from 1-2) of sine generator sin_num (ranges from 1-8).get_phase(sin_num)(phaseshift : 'float') — Gets the phase (in degrees) for sine generator sin_num (from 1-8).get_sequence(awg_idx)(sequence : 'str') — Gets the code on the sequencer for a given AWG core index, awg_idx ranging from 0-3.get_sine(sin_num)(sine : 'dict') — Returns a dictionary representing the state of sine generator sin_num (ranges from 1-8).get_updated_run_status(awg_num)(run_status : 'bool') — Gets the run status for specified AWG core.set_command_table(ct,awg_idx)(None.) — Uploads command table ct (in specified format) to AWG core, awg_idx (ranges from 0-3).set_modulation_mode(sin_num,mode)(None) — Sets modulation mode for sine generator sin_num ranges from 1-8).set_osc_freq(osc_num,freq)(None.) — Sets oscillator frequency freq in Hz for oscillator osc_num (from 1-16).set_out_amp(sin_num,wave_num,amp)(None.) — Sets output amplitude (in volts) for wave output wave_num (ranges from 1-2) of sine generator sin_num (ranges from 1-8).set_phase(sin_num,phase)(None.) — Sets oscillator phase (in degrees) for sine generator sin_num (from 1-8).set_sine(sin_num,osc_num,phase,harmonic,amp1,amp2)(None) — Returns a dictionary representing the state of sine generator sin_num (ranges from 1-8).stop_core(awg_num)(None.) — Stops specified core.
get_all_awg_parameters()No input parameters. Returns dictionary current state of the instrument.
Parameters dictionaries are described below:
-
"connection", dictionary of connection settings
-
"oscillators", dictionary of oscillator frequencies
-
"sines", dictionary of sine generator parameters
-
"command_tables", dictionary of uploaded command tables
-
"sequences", dictionary of uploaded sequencer code
-
"run_status", dictionary of run statuses for each core
-
"channel_map", channel mapping dictonary
get_connection_settings(param)Returns connections setting corresponding to param of the instrument. Parameters include: "hdawg_id" , "server_host" , "server_port" , "api_level" , "interface" , "connection_status".
Specified connection setting for the HDAWG.
get_osc_freq(osc_num)Returns frequency of oscillator osc_num in Hz. osc_num ranges from 1-16.
Keep the following oscillator grouping per AWG core in mind: -osc 1-4, AWG 1 -osc 5-9, AWG 2 -osc 10-13, AWG 3 -osc 14-16, AWG 4
Oscillator frequency in Hz.
set_osc_freq(osc_num, freq)Sets oscillator frequency freq in Hz for oscillator osc_num (from 1-16).
get_phase(sin_num)Gets the phase (in degrees) for sine generator sin_num (from 1-8).
Phase shift for sine generator in degrees.
set_phase(sin_num, phase)Sets oscillator phase (in degrees) for sine generator sin_num (from 1-8).
get_modulation_mode(sin_num)Gets modulation mode for sine generator sin_num ranges from 1-8).
Note that modulation mode follows the convention:
-
0, Modulation Off: AWG Output goes directly to Signal Output.
-
1, Sine 11: AWG Outputs 0 and 1 are both multiplied with Sine Generator signal 0.
-
2, Sine 22: AWG Outputs 0 and 1 are both multiplied with Sine Generator signal 1.
-
3, Sine 12: AWG Outputs 0 and 1 are multiplied with Sine Generator signal 0 and 1.
-
4, Sine 21: AWG Outputs 0 and 1 are multiplied with Sine Generator signal 1 and 0.
-
5, Advanced: Output modulates corresponding sines from modulation carriers.
-
6, Mixer Calibration: The AWG outputs are multiplied with the sum or difference of Sine Generators multiplied by gains specified. The resulting output signal is AWG1(Sine1Gain1 - Sine2Gain2) + AWG2(Sine1Gain2 + Sine2Gain1).
Modulation mode of sine generator ranges from 0-6.
set_modulation_mode(sin_num, mode)Sets modulation mode for sine generator sin_num ranges from 1-8).
Note that modulation mode follows the convention:
-
0, Modulation Off: AWG Output goes directly to Signal Output.
-
1, Sine 11: AWG Outputs 0 and 1 are both multiplied with Sine Generator signal 0.
-
2, Sine 22: AWG Outputs 0 and 1 are both multiplied with Sine Generator signal 1.
-
3, Sine 12: AWG Outputs 0 and 1 are multiplied with Sine Generator signal 0 and 1.
-
4, Sine 21: AWG Outputs 0 and 1 are multiplied with Sine Generator signal 1 and 0.
-
5, Advanced: Output modulates corresponding sines from modulation carriers.
-
6, Mixer Calibration: The AWG outputs are multiplied with the sum or difference of Sine Generators multiplied by gains specified. The resulting output signal is AWG1x(Sine1xGain1 - Sine2*Gain2) + AWG2x(Sine1xGain2 + Sine2xGain1).
get_sine(sin_num)Returns a dictionary representing the state of sine generator sin_num (ranges from 1-8).
The dictionary comprises the parameters listed below:
-
'osc', oscillator index (int)
-
'phaseshift', phase offset (degrees) for current sine generator (float)
-
'harmonic', harmonic of the oscillator's output (int)
-
'amp1', amplitude (volts) of sine output 1 (float)
-
'amp2', amplitude (volts) of sine output 2 (float)
Dictionary representing the sine generator's current state.
assign_osc(sin_num, osc_num)Assigns an oscillator index (osc_num from 1-16) to a sine generator (sin_num from 1-8).
set_sine(sin_num, osc_num, phase=0.0, harmonic=1, amp1=1.0, amp2=1.0)Returns a dictionary representing the state of sine generator sin_num (ranges from 1-8).
The dictionary comprises the parameters listed below:
-
'osc', oscillator index (int)
-
'phaseshift', phase offset (degrees) for current sine generator (float)
-
'harmonic', harmonic of the oscillator's output (int)
-
'amp1', amplitude (volts) of sine output 1 (float)
-
'amp2', amplitude (volts) of sine output 2 (float)
get_awg(awg_num)Gets AWG core object for awg core awg_num (ranges from 1-4).
Zurich AWG core object.
get_out_amp(sin_num, wave_num)Gets output amplitude (in volts) for wave output wave_num (ranges from 1-2) of sine generator sin_num (ranges from 1-8).
Amplitude in volts of specified channel output.
set_out_amp(sin_num, wave_num, amp)Sets output amplitude (in volts) for wave output wave_num (ranges from 1-2) of sine generator sin_num (ranges from 1-8).
get_sequence(awg_idx)Gets the code on the sequencer for a given AWG core index, awg_idx ranging from 0-3.
Sequencer code for specified AWG core.
get_updated_run_status(awg_num)Gets the run status for specified AWG core.
True if currently running, False if not running.
compile_core(awg_num)Compiles specified core awg_num.
compile_run_core(awg_num)Compiles and runs specified core, awg_num.
stop_core(awg_num)Stops specified core.
set_command_table(ct, awg_idx)Uploads command table ct (in specified format) to AWG core, awg_idx (ranges from 0-3).
Lock-in amplifier driver
Digital-to-analog convertor driver
Trigger box driver