qtt.instrument_drivers package¶
Subpackages¶
- qtt.instrument_drivers.adapters package
- qtt.instrument_drivers.virtualAwg package
- Subpackages
- Submodules
- qtt.instrument_drivers.virtualAwg.sequencer module
- qtt.instrument_drivers.virtualAwg.serializer module
- qtt.instrument_drivers.virtualAwg.settings module
- qtt.instrument_drivers.virtualAwg.templates module
- qtt.instrument_drivers.virtualAwg.virtual_awg module
Submodules¶
qtt.instrument_drivers.BlueforsMonitor module¶
-
class
qtt.instrument_drivers.BlueforsMonitor.FridgeDataReceiver(name, **kwargs)[source]¶ Bases:
qtt.instrument_drivers.DistributedInstrument.InstrumentDataClientReceives temperature and pressure data from the Bluefors fridge with server connection.
qtt.instrument_drivers.DistributedInstrument module¶
-
class
qtt.instrument_drivers.DistributedInstrument.InstrumentDataClient(name, address='localhost', port=8080, user=None, password=None, **kwargs)[source]¶ Bases:
qcodes.instrument.base.InstrumentA proxy client for collecting instrument measurable quantities from a server.
- Parameters
-
class
qtt.instrument_drivers.DistributedInstrument.InstrumentDataServer(functions, address='*', port=8080, user=None, password=None)[source]¶ Bases:
objectRepresents a server proxy for sending instrument measurable quantities to a client.
- Parameters
qtt.instrument_drivers.FPGA_ave module¶
-
class
qtt.instrument_drivers.FPGA_ave.FPGA_ave(name, address, mirrorfactors=[1, 1], verbose=1, **kwargs)[source]¶ Bases:
qcodes.instrument.visa.VisaInstrumentThis is the python driver for the FPGA averaging, it communicates with the FPGA to get an average of a pulse
Usage: Initialize with <name> = instruments.create(‘name’, ‘FPGA_AVE’, address=’<COM PORT>’) <COM PORT> = COM5 e.g.
-
get_idn()[source]¶ Parse a standard VISA
*IDN?response into an ID dict.Even though this is the VISA standard, it applies to various other types as well, such as IPInstruments, so it is included here in the Instrument base class.
Override this if your instrument does not support
*IDN?or returns a nonstandard IDN string. This string is supposed to be a comma-separated list of vendor, model, serial, and firmware, but semicolon and colon are also common separators so we accept them here as well.- Returns
A dict containing vendor, model, serial, and firmware.
-
readFPGA(FPGA_mode=0, ReadDevice=['FPGA_ch1', 'FPGA_ch2'], Naverage=1, verbose=1, waittime=0)[source]¶ Basic function to read the data from the FPGA memory.
-
read_raw_bytes(size=None)[source]¶ Returns the values that are in the FPGA buffer. Replacement for read_raw in messagebased.py, also see: https://github.com/hgrecco/pyvisa/issues/93 https://github.com/hgrecco/pyvisa/issues/190
-
qtt.instrument_drivers.ILM200 module¶
-
class
qtt.instrument_drivers.ILM200.OxfordInstruments_ILM200(name, address, number=1, **kwargs)[source]¶ Bases:
qcodes.instrument.visa.VisaInstrumentThis is the qcodes driver for the Oxford Instruments ILM 200 Helium Level Meter.
Usage: Initialize with <name> = instruments.create(‘name’, ‘OxfordInstruments_ILM200’, address=’<Instrument address>’) <Instrument address> = ASRL4::INSTR
Note: Since the ISOBUS allows for several instruments to be managed in parallel, the command which is sent to the device starts with ‘@n’, where n is the ISOBUS instrument number.
-
get_all()[source]¶ Reads all implemented parameters from the instrument, and updates the wrapper.
- Input:
None
- Output:
None
-
get_idn()[source]¶ Overides the function of Instrument since ILM does not support ‘*IDN?’
This string is supposed to be a comma-separated list of vendor, model, serial, and firmware, but semicolon and colon are also common separators so we accept them here as well.
- Returns
A dict containing vendor, model, serial, and firmware.
- Return type
idn (dict)
-
qtt.instrument_drivers.TimeStamp module¶
qtt.instrument_drivers.gates module¶
Created on Wed Feb 8 13:36:01 2017
@author: diepencjv
-
class
qtt.instrument_drivers.gates.VirtualDAC(name, instruments, gate_map, rc_times=None, **kwargs)[source]¶ Bases:
qcodes.instrument.base.InstrumentThis class maps the dacs of IVVI(‘s) to named gates.
The main functionality is the renaming of numbered dacs of one or multiple DAC instruments (for example an IVVI or SPI D5a module) to gates, which in general have names describing their main purpose or position on the sample.
-
add_instruments(instruments)[source]¶ Add instruments to the virtual dac.
- Parameters
instruments (list) – a list of qcodes instruments
-
property
gate_map¶ A map between IVVI dac and gate.
-
get_boundaries()[source]¶ Get boundaries on the values that can be set on the gates.
- Returns
A range of allowed values per parameter.
- Return type
-
property
instruments¶ A list of QCoDeS instruments.
-
resetgates(activegates, basevalues=None, verbose=2)[source]¶ Reset a set of gates to new values.
If no new values are specified the gates will be reset to zero.
-
resettodataset(dataset)[source]¶ Reset gates to the values from a previous dataset :param dataset: the dataset or location to load from. :type dataset: DataSet or str
-
restrict_boundaries(gate_boundaries)[source]¶ Restrict boundaries values that can be set on the gates.
- Parameters
gate_boundaries (dict) – For each gate a range used to restrict the current boundaries to
-
set_boundaries(gate_boundaries)[source]¶ Set boundaries on the values that can be set on the gates.
Assigns a range of values to the validator of a parameter.
- Parameters
gate_boundaries (dict) – a range of allowed values per parameter.
-
-
qtt.instrument_drivers.gates.virtual_IVVI¶
qtt.instrument_drivers.parameter_scaler module¶
-
class
qtt.instrument_drivers.parameter_scaler.ParameterScaler(output: qcodes.instrument.parameter.Parameter, division: Optional[Union[int, float, qcodes.instrument.parameter.Parameter]] = None, gain: Optional[Union[int, float, qcodes.instrument.parameter.Parameter]] = None, name: Optional[str] = None, label: Optional[str] = None, unit: Optional[str] = None)[source]¶ Bases:
qcodes.instrument.parameter.ParameterDeprecated class, use qcodes.ScaledParameter instead
qtt.instrument_drivers.simulation_instruments module¶
Contains simulated instruments
-
class
qtt.instrument_drivers.simulation_instruments.SimulationAWG(name, **kwargs)[source]¶ Bases:
qcodes.instrument.base.Instrument
qtt.instrument_drivers.virtual_awg module¶
Created on Wed Aug 31 13:04:09 2016
@author: diepencjv
-
qtt.instrument_drivers.virtual_awg.plot_wave_raw(wave_raw, samplerate=None, station=None)[source]¶ Plot the raw wave
- Parameters
wave_raw (array) – raw data which represents the waveform
- Returns
the plot showing the data
- Return type
plot (QtPlot)
-
qtt.instrument_drivers.virtual_awg.sweep_2D_process(data, waveform, diff_dir=None)[source]¶ Process data from sweep_2D
-
class
qtt.instrument_drivers.virtual_awg.virtual_awg(name, instruments=[], awg_map=None, hardware=None, verbose=1, **kwargs)[source]¶ Bases:
qcodes.instrument.base.Instrument-
hardware¶ contains AWG to plunger values
- Type
Instrument
-
check_amplitude(gate, mvrange)[source]¶ Calculates the lowest allowable AWG peak-to-peak amplitude based on the ranges to be applied to the gates. If the AWG amplitude is too low, it gives a warning and increases the amplitude.
-
check_frequency_waveform(period, width)[source]¶ Check whether a sawtooth waveform with specified period can be generated
-
make_pulses(voltages, waittimes, reps=1, filtercutoff=None, mvrange=None)[source]¶ Make a pulse sequence with custom voltage levels and wait times at each level.
- Parameters
voltages (list of floats) – voltage levels to be applied in the sequence
waittimes (list of floats) – duration of each pulse in the sequence
reps (int) – number of times to repeat the pulse sequence in the waveform
filtercutoff (float) – cutoff frequency of a 1st order butterworth filter to make the pulse steps smoother
- Returns
raw data which represents the waveform
- Return type
wave_raw (array)
-
make_sawtooth(sweeprange, period, width=0.95, repetitionnr=1, start_zero=False)[source]¶ Make a sawtooth with a decline width determined by width. Not yet scaled with awg_to_plunger value.
-
pulse_gates(gate_voltages, waittimes, reps=1, filtercutoff=None, reset_to_zero=False, delete=True)[source]¶ Send a pulse sequence with the AWG that can span over any gate space. Sends a marker to measurement instrument at the start of the sequence. Only works with physical gates.
- Parameters
gate_voltages (dict) – keys are gates to apply the sequence to, and values
arrays with the voltage levels to be applied in the sequence (are) –
waittimes (list of floats) – duration of each pulse in the sequence
reset_to_zero (bool) – if True, the function offsets the voltages values so that the last point is 0V on all gates (i.e. it centers the pulse sequence on the last point).
- Returns
The waveform being send with the AWG. sweep_info (dict): the keys are tuples of the awgs and channels to activate
- Return type
waveform (dict)
-
set_amplitude(amplitude)[source]¶ Set the AWG peak-to-peak amplitude for all channels
- Parameters
amplitude (float) – peak-to-peak amplitude (V)
-
sweep_2D(samp_freq, sweepgates, sweepranges, resolution, width=0.95, comp=None, delete=True)[source]¶ Send sawtooth signals to the sweepgates which effectively do a 2D scan.
The first sweepgate is the fast changing gate (on the horizontal axis).
- Parameters
- Returns
The waveforms being send with the AWG. sweep_info (dict): the keys are tuples of the awgs and channels to activate
- Return type
waveform (dict)
-
sweep_2D_virt(samp_freq, gates_horz, gates_vert, sweepranges, resolution, width=0.95, delete=True)[source]¶ Send sawtooth signals to the linear combinations of gates set by gates_horz and gates_vert which effectively do a 2D scan of two virtual gates.
The horizontal direction is the direction where the AWG signal is changing fastest. It is the first element in the resolution and sweepranges.
- Parameters
samp_freq (float) – sampling frequency of the measurement instrument in Hertz.
gates_horz (dict) – the gates for the horizontal direction and their coefficients
gates_vert (dict) – the gates for the vertical direction and their coefficients
sweepranges (list) – two floats for sweepranges in milliVolts
resolution (list) – two ints for numbers of pixels
- Returns
The waveforms being send with the AWG. sweep_info (dict): the keys are tuples of the awgs and channels to activate
- Return type
waveform (dict)
-
sweep_gate(gate, sweeprange, period, width=0.95, wave_name=None, delete=True)[source]¶ Send a sawtooth signal with the AWG to a gate to sweep. Also send a marker to the measurement instrument.
- Parameters
- Returns
The waveform being send with the AWG. sweep_info (dict): the keys are tuples of the awgs and channels to activate
- Return type
waveform (dict)
Example
>>> waveform, sweep_info = sweep_gate('P1',sweeprange=60,period=1e-3)
-
sweep_gate_virt(gate_comb, sweeprange, period, width=0.95, delete=True)[source]¶ Send a sawtooth signal with the AWG to a linear combination of gates to sweep. Also send a marker to the measurement instrument.
- Parameters
- Returns
The waveform being send with the AWG. sweep_info (dict): the keys are tuples of the awgs and channels to activate
- Return type
waveform (dict)
-
sweep_init(waveforms, period=0.001, delete=True, samp_freq=None)[source]¶ Send waveform(s) to gate(s)
- Parameters
- Returns
the keys are tuples of the awgs and channels to activate
- Return type
sweep_info (dict)
>> sweep_info = sweep_init(waveforms)
-
sweep_process(data, waveform, Naverage=1, direction='forwards', start_offset=1)[source]¶ Process the data returned by reading out based on the shape of the sawtooth send with the AWG.
- Parameters
- Returns
The data after dropping part of it.
- Return type
data_processed (array)
Example
>> data_processed = sweep_process(data, waveform, 25)
-
sweep_run(sweep_info)[source]¶ Activate AWG(s) and channel(s) for the sweep(s).
- Parameters
sweep_info (dict) – the keys are tuples of the awgs and channels to activate
-
sweepandpulse_gate(sweepdata, pulsedata, wave_name=None, delete=True, shift_zero=True)[source]¶ Makes and outputs a waveform which overlays a sawtooth signal to sweep a gate, with a pulse sequence. A marker is sent to the measurement instrument at the start of the waveform. IMPORTANT: The function offsets the voltages values so that the last point is 0 V on all gates (i.e. it centers the pulse sequence on the last point)
- Parameters
- Returns
The waveform being sent with the AWG. sweep_info (dict): the keys are tuples of the awgs and channels to activate
- Return type
waveform (dict)
-
qtt.instrument_drivers.virtual_gates module¶
Created on Thu Dec 8 10:37:36 2016
@author: diepencjv, eendebakpt
-
class
qtt.instrument_drivers.virtual_gates.VirtualGates(name, gates_instr, crosscap_map, **kwargs)[source]¶ Bases:
qcodes.instrument.base.InstrumentA virtual gate instrument to control linear combinations of gates.
The virtual gates can be defined, such that when changing one of the virtual gates, the others are not influenced. The virtual gates can be used for changing only one physical parameter, e.g. a chemical potential or a tunnel coupling.
Note: They do not (yet?) have an offset relative to the physical parameters. The sweepmap describes a submatrix of the inverse of the virt_gate_map.
-
name¶ The name of the virtual gate object
- Type
string
-
gates_instr¶ The instrument of physical gates
- Type
Instrument
Functions:
-
convert_map_to_matrix(base_map, gates=None, vgates=None)[source]¶ Convert map of the crosscap form to matrix
- Parameters
base_map (ordered_dict) – Crosscap map or its inverse. gates (list or None): list of gate names (columns of matrix) vgates (list or None): list of virtual gate names (rows of matrix)
- Returns
Matrix with its elements orderd with given gate order.
- Return type
converted_matrix (array)
-
convert_matrix_to_map(base_matrix, gates=None, vgates=None)[source]¶ Convert ordered matrix to map.
- Parameters
base_matrix (array) – Matrix with its elements ordered with given gate order. gates (list or None): list of gate names (columns of matrix) vgates (list or None): list of virtual gate names (rows of matrix)
- Returns
Map after conversion.
- Return type
converted_map (ordered_dict)
-
static
from_dictionary(vgdict, gates, name=None)[source]¶ Convert dictionary to virtual gate matrix object
-
multi_set(increment_map)[source]¶ Update multiple parameters at once
- Parameters
increment_map (dict) – dictionary with keys the gate names and values the increments
-
normalize_matrix()[source]¶ Normalize the rows of the matrix by dividing each row by the diagonal coefficient
-
static
print_map(base_map)[source]¶ Show map as table.
- Parameters
base_map (dict) – Map of what to show. Either a crosscap_map or a crosscap_map_inv.
-
ratio(target, g1, g2, laplace=0)[source]¶ Return ratio of influence of two gates
- Parameters
- Returns
ratio (float)
-
resetgates(activegates, basevalues=None, verbose=0)[source]¶ Reset a set of gates to new values.
If no new values are specified the virtual gates will be reset to zero.
-
set_crosscap_map(replace_map, verbose=0)[source]¶ Sets the cross-capacitance map by replacing the specified map. Then updates the connected parameters in memory.
- Parameters
replace_map (dict) –
Map containing replacing values. Uses an arbitrary part of the dict inside the full map. Order of gates does not matter.
Example: {‘VP2’: {‘P2’: 0.4}, ‘VP2’: {‘P1’: 0.4, ‘P3’: 0.1}}
-
set_crosscap_map_inv(replace_map, verbose=0)[source]¶ Sets the inverse of the cross-capacitance map by replacing the specified map. Then updates the connected parameters in memory.
- Parameters
replace_map (dict) –
Map containing replacing values. Uses an arbitrary part of the dict inside the full map. Order of gates does not matter.
Example: {‘P1’: {‘VP2’: -0.4}, ‘P2’: {‘VP1’: -0.4, ‘VP3’: -0.1}}
-
-
qtt.instrument_drivers.virtual_gates.create_virtual_matrix_dict(virt_basis, physical_gates, c=None, verbose=1)[source]¶ Converts the virtual gate matrix into a virtual gate mapping
-
qtt.instrument_drivers.virtual_gates.extend_virtual_gates(vgates, pgates, virts, name='vgates', verbose=0)[source]¶ Create a new virtual gates object based on another virtual gates object
-
qtt.instrument_drivers.virtual_gates.set_distance_matrix(virt_gates, dists)[source]¶ Update the cross capacitance matrix for a virtual_gate matrix
- Parameters
virt_gates (VirtualGates) – virtual gates object
dists (list) – list of distances between dots
-
qtt.instrument_drivers.virtual_gates.update_cc_matrix(virt_gates, update_cc, old_cc=None, verbose=1)[source]¶ Create a new virtual gates object using an update matrix
- Parameters
virt_gates (VirtualGates) – virtual gates object
update_cc (array) – update to cc matrix
old_cc (array or None) – if None, then get the old cc matrix from the virt_gates
verbose (int) – verbosity level
- Returns
new_cc (array): results (dict): dictionary with additional results
- Return type
new_virt_gates (virtual gates)
qtt.instrument_drivers.virtual_instruments module¶
Toy model to test TNO algorithms with Qcodes
@author: eendebakpt