def initialize(reinit=False, nr_dots=2, maxelectrons=2, verbose=2, start_manager=False): global station, _initialized, model logger.info('virtualDot: start') if verbose >= 2: print('initialize: create virtual dot system') if _initialized: if reinit: close(verbose=verbose) else: return station logger.info('virtualDot: make DotModel') model = DotModel(name=qtt.measurements.scans.instrumentName('dotmodel'), verbose=verbose >= 3, nr_dots=nr_dots, maxelectrons=maxelectrons, sdplunger='SD1b') gate_map = model.gate_map if verbose >= 2: logger.info('initialize: DotModel created') ivvis = [] for ii in range(model.nr_ivvi): ivvis.append(VirtualIVVI(name='ivvi%d' % (ii + 1), model=model)) gates = VirtualDAC(name='gates', gate_map=gate_map, instruments=ivvis) gates.set_boundaries(gate_boundaries(gate_map)) logger.info('initialize: set values on gates') gates.set('D0', 101) for g in model.gates: gates.set(g, np.random.rand() - .5) # take into account the voltage divider on the ohmics for g in gates.parameters.keys(): if g.startswith('O'): gg = getattr(gates, g) gg.unit = 'uV' vawg = SimulationAWG(qtt.measurements.scans.instrumentName('vawg')) logger.info('initialize: create virtual keithley instruments') keithley1 = VirtualMeter('keithley1', model=model) keithley3 = VirtualMeter('keithley3', model=model) keithley4 = VirtualMeter('keithley4', model=model) digitizer = SimulationDigitizer( qtt.measurements.scans.instrumentName('sdigitizer'), model=model) logger.info('initialize: create station') station = qcodes.Station(gates, keithley1, keithley3, keithley4, *ivvis, vawg, digitizer, model, update_snapshot=False) station.awg = station.vawg station.metadata['sample'] = 'virtual_dot' station.model = model station.gate_settle = gate_settle station.depletiongate_name = 'D0' station.bottomchannel_current = station.keithley3.amplitude station.jobmanager = None station.calib_master = None _initialized = True if verbose: print('initialized virtual dot system (%d dots)' % nr_dots) return station
reload(qtt.instrument_drivers.simulation_instruments) reload(qtt.measurements.scans) from qtt.instrument_drivers.simulation_instruments import SimulationDigitizer from qtt.instrument_drivers.simulation_instruments import SimulationAWG from qtt.measurements.videomode_processor import DummyVideoModeProcessor station = qtt.simulation.virtual_dot_array.initialize() gates = station.gates pv = qtt.createParameterWidget([gates]) # type: ignore verbose = 1 multiprocess = False digitizer = SimulationDigitizer( qtt.measurements.scans.instrumentName('sdigitizer'), model=station.model) station.add_component(digitizer) station.awg = SimulationAWG(qtt.measurements.scans.instrumentName('vawg')) station.add_component(station.awg) dummy_processor = DummyVideoModeProcessor(station) vm = VideoMode(station, Naverage=25, diff_dir=None, verbose=1, nplots=1, dorun=False, videomode_processor=dummy_processor) vm.updatebg()