Perform simple measurements with the qtt measurement functions

This example shows how to set values on instruments (such as a voltage on a gate), how to readout values from measurement instruments (such as the voltage on a multimeter), and how to perform simple measurements loops (in this case a 2D gate scan).

[1]:
import qtt
import numpy as np

Measurements with Parameters

For the purpose of this example will use a virtual system that simulates a quantum dot measurement setup. See the qtt.simulation.virtual_dot_array documentation for more info.

[2]:
import qtt.simulation.virtual_dot_array
station=qtt.simulation.virtual_dot_array.initialize()
gates=station.gates
initialize: create virtualdot
initialized virtual dot system (2 dots)

We can read out instruments using a qcodes Parameter.

[3]:
value=gates.P1.get(); print(value)
-0.01483164894377098

Custom measurement loops

The qcodes loop is not suitable for all measurements. You can also write your own loop constructions. There are already several constructions available. For example make a 2D scan one can use the qtt.scans.scan2D

[4]:
import qtt.measurements.scans
scanjob=qtt.measurements.scans.scanjob_t({'sweepdata': {'param':'P1', 'start':20,'end':28,'step': 1.75} ,
         'stepdata': {'param': 'P2', 'start': 0, 'end': 7, 'step': 1}, 'minstrument': ['keithley1.amplitude']})
dataset=qtt.measurements.scans.scan2D(station, scanjob)
scan2D: 0/7: time 00:00:00 (~00:00:00 remaining): setting P2 to 0.000
[5]:
print(dataset)
DataSet:
   location = '2018-09-05/11-50-28_qtt_scan2D'
   <Type>   | <array_id>          | <array.name>        | <array.shape>
   Measured | keithley1_amplitude | keithley1_amplitude | (7, 5)
   Setpoint | P2                  | P2                  | (7,)
   Setpoint | P1                  | P1                  | (7, 5)

The raw data is available as a DataArray or numpy array.

[6]:
print(dataset.default_parameter_array())
DataArray[7,5]: keithley1_amplitude
array([[2.98960663, 2.98920055, 2.98878521, 2.99806085, 2.99676836],
       [2.99280892, 2.99730119, 2.99056696, 2.99518558, 2.99344639],
       [2.99558079, 2.98947501, 2.98971753, 2.99565561, 2.99637049],
       [2.99046836, 2.99784205, 2.98961711, 2.99544447, 2.99375562],
       [2.99459975, 2.99424155, 2.98910142, 2.99222029, 2.98887384],
       [2.99335894, 2.99296707, 2.99501929, 2.99703682, 2.99673491],
       [2.99093673, 2.99259619, 2.99469442, 2.9918319 , 2.99783992]])
[7]:
print(dataset.default_parameter_name())
print(np.array(dataset.default_parameter_array()))
keithley1_amplitude
[[2.98960663 2.98920055 2.98878521 2.99806085 2.99676836]
 [2.99280892 2.99730119 2.99056696 2.99518558 2.99344639]
 [2.99558079 2.98947501 2.98971753 2.99565561 2.99637049]
 [2.99046836 2.99784205 2.98961711 2.99544447 2.99375562]
 [2.99459975 2.99424155 2.98910142 2.99222029 2.98887384]
 [2.99335894 2.99296707 2.99501929 2.99703682 2.99673491]
 [2.99093673 2.99259619 2.99469442 2.9918319  2.99783992]]