Please read Overview and Glossary before starting this guide..
This guide is divided into 2 parts, both are required to be read inorder to perform an experiment.
General syntax:
import sqdtoolz as <pkg_obj>
import numpy as np
Example:
import sqdtoolz as stz
import numpy as np
General syntax:
<lab_obj> = <pkg_obj>.Laboratory(instr_config_file = "<yaml filename>", save_dir = "<path to dir in which data is saved>")
Example:
lab = stz.Laboratory(instr_config_file = "eth_test2.yaml", save_dir = "Z:\\Data\\sqdtoolz_test\\")
NOTE: To know more about different type of HALs & their customisations read HAL section.
General Syntax:
<lab_obj>.load_instruments('<yaml name of insturment>')
Example:
lab.load_instrument('pulser')
General Syntax:
<pkg_obj>.<HAL type>("<hal_obj_name">, <lab_obj>, "<yaml_name>")
Example:
stz.DDG("DDG", lab, 'pulser')
General Syntax:
<lab_obj>.HAL('<hal name>').<sub_obj_function>().parameter = <<value>>
# or
<lab_obj>.HAL('<hal name>').parameter = <<value>>
Example:
lab.HAL('DDG').get_trigger_output('AB').TrigPulseLength = 10e-9
lab.HAL('sw_radial_rt').Position = 'P2'
General syntax:
<pkg_obj>.<variable_type>('var_name', <lab_obj>, <additional arugments>)
Example:
stz.VariableProperty('MWFreq', lab, lab.HAL("MW_cav"), 'Frequency')
stz.VariableProperty('MWDownConv', lab, lab.HAL("MW_dnc"), 'Frequency')
stz.VariableSpaced('CavityFreq', lab, 'MWFreq', 'MWDownConv', 25e6)
General syntax:
<lab_obj>.VAR('<var_name>').Value = <<value>>
Example:
lab.VAR('CavityFreq').Value = 7636827765.17
General Syntax:
<pkg_obj>.ExperimentSpecification('<spec_name>', <lab_obj>, '<JSON_name>')
Example:
stz.ExperimentSpecification('CavitySpec', lab, 'Cavity')
General Syntax:
<pkg_obj>.ExperimentSpecification('<spec_name>', <lab_obj>)
Example:
stz.ExperimentSpecification('cav2d',lab)
The destination can be anything; a var, hal, waveform or any other object property registered with lab object.
General Syntax:
<lab_obj>.SPEC('<spec_name>').set_destination('<SPEC's_parameter_name>', <lab_obj>.<VAR/HAL/WAVeform_name>, <VAR/HAL/WAVeform's_parameter_name>)
Example:
lab.SPEC('Cavity').set_destination('Frequency', lab.VAR('CavityFreq'))
lab.SPEC('Cavity').set_destination('Power', lab.HAL("MW_cav"), 'Power')
lab.SPEC('Cavity')['Power'].Value = -30
General Syntax:
<pkg_obj>.ExperimentConfiguration('<Config name>', <lab_obj>, <repetition_time>, [ <list of HAL names> ], <ACQ HAL>, [ <list of SPECs names> ])
Example:
stz.ExperimentConfiguration('contMeasQ', lab, 1.1e-3, ['DDG', 'WfmCon', 'MW_cav', 'MW_dnc', 'MW_qubit', 'sw_radial_rt'], 'DigiC', ['Cavity', 'Qubit1'])
General Synatax:
from sqdtoolz.Experiments.<folder>.<experiment_module> import *
Example:
from sqdtoolz.Experiments.Experimental.ExpPeakScouterIQ import*
from sqdtoolz.Experiments.Experimental.ExpRabi import*
General Syntax:
exp_obj = <Exp_CLASS_name>("<exp_name>", <lab_obj>.CONFIG('<config_name>', <additional parameters>)
Example:
new_exp = ExpRabi("RabiAuto", lab.CONFIG('RabiAuto'), lab.WFMT('QubitFreqGE'), np.linspace(0.0,0.5,100), param_rabi_frequency=lab.SPEC('Qubit1')['Rabi Amplitude Frequency'], param_rabi_decay_time=lab.VAR('Qubit Decay Rate'))
General Syntax:
data_variable = <lab_obj>.run_single(<exp_obj>)
Example:
leData = lab.run_single(new_exp)
This completes the PART A of quick start guide. Part B provides controls on programming awg and processing data, with a lot of customisation, which are mentioned in the their respective sub-files.
This is advanced section because it assumes you have some basic knowledge of stack and have read the HAL types and other details.
NOTE: For more customization please read Processor Section
General Syntax (NOTE: CPU can be replaced by GPU)
<proc_obj> = <pkg_obj>.ProcessorCPU('<proc_name>', <lab_obj>)
Example:
myProc = stz.ProcessorCPU('ddcInteg', lab)
This section require user to read Processor Section in miscellaeous section.
General Syntax:
<lab_obj>.HAL('<ACQ_obj_name>').set_data_processor(<<proc_obj>)
Example:
lab.HAL("DigiC").set_data_processor(myProc)
NOTE: To know more about different type of waveforms & their customisations read WaveformAWG section.
General Syntax:
<pkg_obj>.WaveformAWG("<AWG_obj_name>", <lab_obj>, [ ('<AWG_YAML_name>', 'ch<channel_number>'), (<similar tuple for more channels/AWG>) ], <sampling_rate>, <repetition_time>)
Example:
stz.WaveformAWG("WfmCon", lab, [('Agi1', 'ch1'), ('Agi1', 'ch2')], 1.25e9, total_time = 1024e-9)