Spin qubit measurement software

This example shows a typical workflow of tasks undertaken when performing spin qubit measurements.

[2]:
import sys, os, tempfile
import numpy as np
%matplotlib inline
%gui qt
import matplotlib.pyplot as plt
import qcodes
from qcodes.data.data_set import DataSet
import qtt
from qtt.measurements.scans import scanjob_t

# set data directory
datadir = os.path.join(tempfile.mkdtemp(), 'qdata')
DataSet.default_io = qcodes.data.io.DiskIO(datadir)

Load your station

For the purpose of this example we will use a virtual system that simulates the device and instruments in a 2-dot spin-qubit dot setup. The hardware consists of a virtual multimeter (keithley), voltage sources (ivvi) and a virtual gates object (gates) that applies voltages to the virtual device gates.

[3]:
import qtt.simulation.virtual_dot_array as virtual_dot

nr_dots = 2
station = virtual_dot.initialize(nr_dots=nr_dots)

keithley1 = station.keithley1
keithley3 = station.keithley3

# virtual gates for the model
gates = station.gates
initialize: create virtualdot
initialized virtual dot system (2 dots)

Setup measurement windows

  • Parameter viewer (pv): gui for reading and changing the values of the instruments

  • Live plotting window (plotQ): for on-going measurements

[4]:
pv = qtt.createParameterWidget([gates, ])
mwindows = qtt.gui.live_plotting.setupMeasurementWindows(station, create_parameter_widget=False)
plotQ = mwindows['plotwindow']

Read out instruments

We can, for example, readout a gate voltage or readout the voltage measured by the multimeter. We can also retrieve the full state of our measurement station using station.snapshot(), which returns a dictionary with every parameter of every instrument in the station.

[5]:
print('gate P1: %.1f, amplitude: %f' % (gates.P1.get(),  keithley3.readnext()) )
snapshotdata = station.snapshot()
gate P1: -0.1, amplitude: 1.001941

Simple 1D scan loop

We use the scan1D function to measurements as we sweep one parameter. This function has scanjob as argument, where the parameters of the scan are set.

[6]:
scanjob = scanjob_t({'sweepdata': dict({'param': 'P1', 'start': -500, 'end': 1, 'step': .8, 'wait_time': 1e-2}), 'minstrument': [keithley3.amplitude]})
data1d = qtt.measurements.scans.scan1D(station, scanjob, location=None, verbose=1)
scan1D: 0/627: time 0.4
scan1D: 132/627: time 1.9
scan1D: 262/627: time 3.4
scan1D: 394/627: time 5.0
scan1D: 525/627: time 6.5

Analyse the scan

We have scripts for performing various analysis on our data (see the Analysis examples). In this example we use a script that determines the pinch-off voltage from our 1D scan.

[7]:
print( data1d )
adata = qtt.algorithms.gatesweep.analyseGateSweep(data1d, fig=100)
DataSet:
   location = '2018-09-05/15-45-03_qtt_scan1D'
   <Type>   | <array_id>          | <array.name>        | <array.shape>
   Measured | keithley3_amplitude | keithley3_amplitude | (627,)
   Setpoint | P1                  | P1                  | (627,)
analyseGateSweep: pinch-off point -212.000, value 0.297
../../_images/notebooks_measurements_spinqubit_measurement_17_1.png

Make a 2D scan

We can also perfom scans of a 2-dimensional gate space. In this example the scan reveals the charge stability diagram of our 2-dot system.

[8]:
start=-500
scanjob = scanjob_t({'sweepdata': dict({'param': 'B2', 'start': start, 'end': start+400, 'step': 4.}), 'minstrument': ['keithley1.amplitude'], 'wait_time': 0.})
scanjob['stepdata'] = dict({'param': 'B0', 'start': start, 'end': start+400, 'step': 4.})
data = qtt.measurements.scans.scan2D(station, scanjob, liveplotwindow=plotQ)

_=qcodes.MatPlot(data.default_parameter_array())
scan2D: 0/100: time 00:00:00 (~00:00:00 remaining): setting B0 to -500.000
scan2D: 65/100: time 00:00:02 (~00:00:01 remaining): setting B0 to -240.000
../../_images/notebooks_measurements_spinqubit_measurement_20_1.png

More analysis

[9]:
from qtt.utilities.imagetools import cleanSensingImage
im, tr = qtt.data.dataset2image(data)

imx=cleanSensingImage(im)
plt.imshow(imx)
plt.axis('off')
[9]:
(-0.5, 99.5, 99.5, -0.5)
../../_images/notebooks_measurements_spinqubit_measurement_22_1.png

Send data to powerpoint

We can copy data from a dataset to an open Powerpoint presentation using qtt.utilities.tools.addPPT_dataset(dataset).

[10]:
_=qtt.utilities.tools.addPPT_dataset(data, verbose=1)
could not open active Powerpoint presentation, opening blank presentation
addPPTslide: presentation name: Presentation1, adding slide 1
 image aspect ratio 1.67, slide aspect ratio 1.78
adjust width 720->583
slide width height: [960.0, 540.0]
image width height: 583, 350

Browse the recorded data

We have a GUI for easy browsing of our saved datasets.

[11]:
logviewer = qtt.gui.dataviewer.DataViewer(datadir=datadir, verbose=1)
findfilesR: C:\Users\EENDEB~1\AppData\Local\Temp\tmpxtbpablc\qdata: 0.0%
DataViewer: found 2 files

We can fetch the active dataset from the viewer:

[13]:
dataset = logviewer.dataset
print( dataset )
DataSet:
   location = 'C:\\Users\\EENDEB~1\\AppData\\Local\\Temp\\tmpxtbpablc\\qdata\\2018-09-05\\15-45-03_qtt_scan1D'
   <Type>   | <array_id>          | <array.name> | <array.shape>
   Setpoint | P1                  | None         | (627,)
   Measured | keithley3_amplitude | None         | (627,)
[ ]: