Ejemplo n.º 1
0
class TestVirtualMeter(TestCase):
    def setUp(self):
        self.virtual_meter = VirtualMeter(
            qtt.measurements.scans.instrumentName('gates'))

    def tearDown(self):
        self.virtual_meter.close()

    def test_amplitude_parameter(self):
        self.assertEqual(self.virtual_meter.amplitude.unit, 'a.u.')

        self.assertIsInstance(self.virtual_meter.amplitude(), float)
        with self.assertRaises(AttributeError):
            self.virtual_meter.amplitude.set(2.0)
Ejemplo n.º 2
0
 def setUp(self):
     self.virtual_meter = VirtualMeter(
         qtt.measurements.scans.instrumentName('gates'))
Ejemplo n.º 3
0
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 = virtual_gates(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,
                             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