Example #1
0
A handy feature is that you can simply reëxecute the all the code, and should
stay in a consisten state. It will only fail for those instruments that you
have specified to not be simply reinstantiated (depending on the setting in
your qcdoesrc.json file and the  auto reconnect option in the yaml file)

You can try starting the qcodes monitor and see how the parameters get added.
Currently a bug is that the parameters do not get removed once an instrument
is closed. So there will appear multiple copies of them.

"""
from qdev_wrappers.station_configurator import StationConfigurator
import qcodes as qc

# scfg = StationConfigurator('exampleConfig.yaml')
scfg = StationConfigurator('testSetupConfig.yaml')

# Configure all settings in the Alazar card

alazar = scfg.load_instrument('Alazar')
alazar.sync_settings_to_card()
#alazar.config(clock_source='INTERNAL_CLOCK',
#              sample_rate=1_000_000_000,
#              clock_edge='CLOCK_EDGE_RISING',
#              decimation=1,
#              coupling=['DC','DC'],
#              channel_range=[.4,.4],
#              impedance=[50,50],
#              trigger_operation='TRIG_ENGINE_OP_J',
#              trigger_engine1='TRIG_ENGINE_J',
#              trigger_source1='EXTERNAL',
# -*- coding: utf-8 -*-
"""
Created on Thu May 31 14:01:23 2018

@author: root
"""

import qcodes as qc
import numpy as np
from qdev_wrappers.station_configurator import StationConfigurator
from qdev_wrappers.logger import start_logging
from qdev_wrappers.sweep_functions import do1d, do2d
from qdev_wrappers.file_setup import all_init
import warnings

start_logging()

#scfg = StationConfigurator()
scfg = StationConfigurator('station_conf.yml')
all_init(sample_name='testtest',
         station=scfg.station,
         datafolder='data',
         subfolders=['analyses', 'pptxdumps'])

#mock_dac = scfg.load_instrument('qdac')
#mock_dmm = scfg.load_instrument('dmm1')
    if qc.Station.default:
        close_station(qc.Station.default)
​
    STATION = qc.Station()
​
   
    my_init(SAMPLE_NAME, STATION,
        pdf_folder=True, png_folder=True, analysis_folder=True,
        waveforms_folder=True, calib_config=True,
        annotate_image=False, mainfolder=None, display_pdf=False,
        display_individual_pdf=False, qubit_count=1,
        plot_x_position=0.2)
    
    
# load instruments using station configuration
    scfg = StationConfigurator(station=STATION)
    
     
    vna = scfg.load_instrument('rs_vna_spec', timeout  = 600)#vna for  SPEC
     
    awg5208 = scfg.load_instrument('awg5208') #the AWG that generates our waveforms
     
    switch = scfg.load_instrument('minicircuits_switch')   #allows switching between VNA setup and time domain setup; below we only initiliaze the time domain setup
    
    #Rohde and Schwarz boxes that generate high frequency signals that can be modulated by the AWG    
    cavity = scfg.load_instrument('rs_cavity')  
    localos = scfg.load_instrument('rs_localos')  #second output of the cavity that is not modulated by the AWG
    qubit = scfg.load_instrument('rs_qubit')

​
    Monitor(*scfg.monitor_parameters.values())
from qdev_wrappers.station_configurator import StationConfigurator
from qdev_wrappers.show_num import show_num, show_meta
from qdev_wrappers.sweep_functions import do1d, do2d, do0d
#from qdev_wrappers.transmon import *
from qdev_wrappers.qdev_fitter import qdev_fitter

station = qc.Station()

from qdev_wrappers.logger import start_logging
from qdev_wrappers.file_setup import all_init
import warnings

start_logging()

#scfg = StationConfigurator()
scfg = StationConfigurator('station_conf.yaml')
all_init(sample_name='testtest3',
         station=scfg.station,
         datafolder='data',
         subfolders=['analyses', 'pptxdumps'])

################
Lockin_Middle = scfg.load_instrument('Lockin_Stanford_Research_Middle')
Lockin_Lower = scfg.load_instrument('Lockin_Stanford_Research_Lower')
SG1 = scfg.load_instrument('RohdeSchwarz_SGS100A')
qdac = scfg.load_instrument('qdac')
keysight1 = scfg.load_instrument('SG_Keysight_33500B')
UHFLI = scfg.load_instrument('UHFLI')
mercuryIPS = scfg.load_instrument('mercuryIPS')
fridge = scfg.load_instrument('fridge')
You also need to have the otpion 'enable_forced_reconnect' in your
qcodesrc.json, as it is the case for the example config file in this path.

A handy feature is that you can simply reëxecute the all the code, and should
stay in a consisten state. It will only fail for those instruments that you
have specified to not be simply reinstantiated (depending on the setting in
your qcdoesrc.json file and the  auto reconnect option in the yaml file)

You can try starting the qcodes monitor and see how the parameters get added.
Currently a bug is that the parameters do not get removed once an instrument
is closed. So there will appear multiple copies of them.
"""
from qdev_wrappers.station_configurator import StationConfigurator

# scfg = StationConfigurator('exampleConfig.yaml')
scfg = StationConfigurator()
# dmm1 = scfg.load_instrument('dmm1')
# mock_dac = scfg.load_instrument('mock_dac')
mock_dac = scfg.load_instrument('qdac')

# this works only with the lakeshore PR and when you change the directory in
# yaml file to point to the sim file
# ls = scfg.load_instrument('lakeshore')

# # if you happen to have a qdac you can also change the hardware address in the
# # config file and then do the following:
# # watch out! the current config file will set a voltage on the qdac!
# qdac = scfg.load_instrument('qdac')
# # now you should be able to do
# qdac.Bx(0.04)
# # which should ramp up the voltage of ch02 from 0.02V (initial value) to
Example #6
0
    instr = qc.Instrument._all_instruments.pop(instrument)
    instr = instr()
    instr.close()

# Set up experiment
exp_name = 'qcodes_controls_mdac'
sample_name = 'mdac'

try:
    exp = load_experiment_by_name(exp_name, sample=sample_name)
    print('Experiment loaded. Last ID no:', exp.last_counter)
except ValueError:
    exp = new_experiment(exp_name, sample_name)
    print('Started new experiment')

scfg = StationConfigurator()

mdac = scfg.load_instrument('mdac')
#lockin = scfg.load_instrument('sr860')
#ithaco = scfg.load_instrument('ithaco')
multimeter = scfg.load_instrument('Keysight')

dummy_time = DummyInstrument(name="dummy_time")
time_zero = time.time()


def getTime():
    return time.time() - time_zero


dummy_time.add_parameter('seconds',
Example #7
0
# Close any instruments that may already be open
instruments = list(qc.Instrument._all_instruments.keys())
for instrument in instruments:
    instr = qc.Instrument._all_instruments.pop(instrument)
    instr = instr()
    instr.close()
del instruments

exp_name = 'QDP_FIVEDOT'
sample_name = 'DARLINGTON_D1'

initialise_database()
exp = load_or_create_experiment(exp_name, sample_name)
print('Experiment loaded. Last ID no:', exp.last_counter)

scfg = StationConfigurator()

lockin = scfg.load_instrument('sr860')
ithaco = scfg.load_instrument('ithaco')
#qubit_source = scfg.load_instrument('qubit_source')
#lo_source = scfg.load_instrument('lo_source')
#dso = scfg.load_instrument('dso')
#midas = scfg.load_instrument('midas')
#atten = scfg.load_instrument('atten')
mdac = scfg.load_instrument('mdac')
yoko = scfg.load_instrument('yoko')
dmm = scfg.load_instrument('dmm')
bb1 = scfg.load_instrument('bb1')
bb2 = scfg.load_instrument('bb2')

# Biasing Gate Sets