qtt.instrument_drivers package

Subpackages

Submodules

qtt.instrument_drivers.BlueforsMonitor module

class qtt.instrument_drivers.BlueforsMonitor.BlueforsApp[source]

Bases: object

check_directory()[source]
main(argv)[source]
print_header()[source]
print_settings()[source]
print_usage(status=0)[source]
set_directory(directory: str)[source]
set_password(password: str)[source]
set_portnumber(port: str)[source]
set_username(username: str)[source]
class qtt.instrument_drivers.BlueforsMonitor.FridgeDataReceiver(*args: Any, **kwargs: Any)[source]

Bases: InstrumentDataClient

Receives temperature and pressure data from the Bluefors fridge with server connection.

class qtt.instrument_drivers.BlueforsMonitor.FridgeDataSender(folder_path, **kwargs)[source]

Bases: object

Sends temperature and pressure data of the Bluefors fridge to the proxy client connections.

get_datetime()[source]
get_pressures()[source]
get_status(item)[source]
get_temperatures()[source]

qtt.instrument_drivers.DistributedInstrument module

class qtt.instrument_drivers.DistributedInstrument.InstrumentDataClient(*args: Any, **kwargs: Any)[source]

Bases: Instrument

A proxy client for collecting instrument measurable quantities from a server.

Parameters:
  • name (str) – the name of the instrument.

  • address (str) – the ip-address of the server.

  • port (int) – the port number of the proxy server.

  • user (str) – a username for protection.

  • password (str) – a password for protection.

add_measurable_quantity(name='quantity', unit='arb.', default_value=None, doc_string='Unknown', command_name='', params=None)[source]

Adds a instument function to the dataclient.

class qtt.instrument_drivers.DistributedInstrument.InstrumentDataServer(functions, address='*', port=8080, user=None, password=None)[source]

Bases: object

Represents a server proxy for sending instrument measurable quantities to a client.

Parameters:
  • functions (dict) – the instrument functions.

  • address (str) – the ip-address of the server.

  • port (int) – the port number of the proxy server.

  • user (str) – a username for protection.

  • password (str) – a password for protection.

run()[source]

Starts the server proxy and blocks the current thread. A keyboard interuption will stop and clean-up the server proxy.

start()[source]

Starts the server proxy.

stop()[source]

Stops the server proxy.

qtt.instrument_drivers.FPGA_ave module

qtt.instrument_drivers.ILM200 module

class qtt.instrument_drivers.ILM200.OxfordInstruments_ILM200(*args: Any, **kwargs: Any)[source]

Bases: VisaInstrument

This 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.

close()[source]

Safely close connection

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)

local()[source]

Set control to local & locked

Input:

None

Output:

None

remote()[source]

Set control to remote & locked

Input:

None

Output:

None

set_remote_status(mode)[source]

Set remote control status.

Input:

mode(int) : 0 : “Local and locked”, 1 : “Remote and locked”, 2 : “Local and unlocked”, 3 : “Remote and unlocked”,

Output:

None

set_to_fast()[source]

Set helium meter channel 1 to fast mode.

set_to_slow()[source]

Set helium meter channel 1 to slow mode.

qtt.instrument_drivers.TimeStamp module

class qtt.instrument_drivers.TimeStamp.TimeStampInstrument(*args: Any, **kwargs: Any)[source]

Bases: Instrument

Instrument that generates a timestamp

reset()[source]

Reset the timestamp offset such that the timestamps start at 0

qtt.instrument_drivers.gates module

Created on Wed Feb 8 13:36:01 2017

@author: diepencjv, eendebakpt

class qtt.instrument_drivers.gates.VirtualDAC(*args: Any, **kwargs: Any)[source]

Bases: Instrument

This 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.

name

The name given to the VirtualDAC object

Type:

str

instruments

a list of qcodes instruments

Type:

list

gate_map

the map between IVVI dac and gate

Type:

dict

rc_times

dictionary with rc times for the gates

Type:

dict

add_instruments(instruments)[source]

Add instruments to the virtual dac.

Parameters:

instruments (list) – a list of qcodes instruments

allvalues()[source]

Return all gate values in a simple dict.

allvalues_string(fmt='%.3f')[source]

Return all gate values in string format.

property gate_map

A map between IVVI dac and gate.

get_all(verbose=0)[source]

Gets all gate values.

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:

dict

get_idn()[source]

Overrule because the default VISA command does not work.

get_instrument_parameter(g)[source]

Returns the dac parameter mapped to this gate.

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.

Parameters:
  • activegates (list or dict) – gates to reset

  • basevalues (dict) – new values for the gates

  • verbose (int) – output level

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

restore_at_exit() AbstractContextManager[source]

Create context that stores values of the parameters and restores on exit

Example

>>> gate_map = {'T': (0, 15), 'P1': (0, 3), 'P2': (0, 4)}
>>> ivvi = VirtualIVVI('ivvi', model=None)
>>> gates = VirtualDAC('gates', instruments=[ivvi], gate_map=gate_map)
>>>         with self.gates.restore_at_exit():
            gates.P1.increment(10)
>>> print(f"value after with block: {gates.P1()}")  # prints 0
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.

set_overshoot(gate, value, extra_delay=0.02, overshoot=4)[source]

Set gate to a value with overshoot

This function can be used for gates with a slow RC value on the bias-T. The actual overshoot is determined by the rc_times in the object.

Parameters:
  • gate (str) – gate to set

  • value (float) – value to set at the gate

  • extra_delay (float) –

  • overshoot (float) – overshoot factor

visualize(fig=1)[source]

Create a graphical representation of the system (needs graphviz).

qtt.instrument_drivers.gates.virtual_IVVI

alias of VirtualDAC

qtt.instrument_drivers.simulation_instruments module

Contains simulated instruments

class qtt.instrument_drivers.simulation_instruments.SimulationAWG(*args: Any, **kwargs: Any)[source]

Bases: Instrument

awg_gate(name)[source]
stop()[source]
sweep_2D(samp_freq, sweepgates, sweepranges, resolution)[source]
sweep_2D_virt(samp_freq, gates_horz, gates_vert, sweepranges, resolution)[source]
sweep_gate(gate, sweeprange, period, width=0.95, wave_name=None, delete=True)[source]
sweep_gate_virt(fast_sweep_gates, sweeprange, period, delete=None)[source]
class qtt.instrument_drivers.simulation_instruments.SimulationDigitizer(*args: Any, **kwargs: Any)[source]

Bases: Instrument

measuresegment(waveform, channels=[0])[source]

Measure a segment of data

Parameters:
  • waveform (object) – waveform currently on AWG

  • channels (list) – channels to measure

myhoneycomb(multiprocess=False, verbose=0)[source]
Parameters:
  • multiprocess (bool) – honeycomb simulation multiprocess

  • verbose (int) – verbosity of the method (0 == none)

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(*args: Any, **kwargs: Any)[source]

Bases: Instrument

A 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:

allvalues(get_latest=False)[source]

Return all virtual gate voltage values in a dict.

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

get_crosscap_map()[source]

Gets the current cross-capacitance map.

get_crosscap_map_inv()[source]

Gets the current inverse of cross-capacitance map.

get_crosscap_matrix()[source]

Gets the current cross-capacitance matrix.

get_crosscap_matrix_inv()[source]

Gets the current inverse of cross-capacitance matrix.

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

pgates()[source]

Return the names of the physical gates

plot_matrix(fig=10, inverse=False)[source]

Plot the cross-capacitance matrix as a figure

Parameters:
  • fig (int) – number of figure window

  • inverse (bool) – If True then plot the inverse matrix

print_inverse_matrix()[source]
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.

print_matrix()[source]
ratio(target, g1, g2, laplace=0)[source]

Return ratio of influence of two gates

Parameters:
  • target (str) – target gate

  • g1 (str) – gates

  • g2 (str) – gates

  • laplace (float) – parameter for Laplacian smoothing

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.

Parameters:
  • activegates (list or dict) – Virtual gates to reset

  • basevalues (dict) – New values for the gates

  • verbose (int) – Output level

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}}

set_crosscap_matrix(cc)[source]

Sets the cross-capacitance matrix. Update the dependent variables

set_distances(dists)[source]

Update the cross-capacitance matrix based on a list of distances

setgates(values, verbose=0)[source]

Set gates to new values.

Parameters:
  • values (dict) – keys are gate names, values are values to be set

  • verbose (int) – Output level

to_dictionary()[source]

Convert a virtual gates object to a dictionary for storage

vgates()[source]

Return the names of the virtual gates

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

Parameters:
  • virt_basis (list) – containing all the virtual gates in the setup

  • physical_gates (list) – containing all the physical gates in the setup

  • c (array or None) – virtual gate matrix

Returns:

dictionary, mapping of the virtual gates

Return type:

virtual_matrix (dict)

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

class qtt.instrument_drivers.virtual_instruments.VirtualIVVI(*args: Any, **kwargs: Any)[source]

Bases: Instrument

allvalues()[source]

Return all DAC values

Returns:

dictionary with all DAC values

Return type:

dict

get_idn()[source]

Overwrites the get_idn function using constants as the virtual device does not have a proper *IDN function.

class qtt.instrument_drivers.virtual_instruments.VirtualMeter(*args: Any, **kwargs: Any)[source]

Bases: Instrument

get_idn()[source]

Overrule because the default get_idn yields a warning