Esempio n. 1
0
    def setUpClass(self):
        self.AWG = HDAWG.ZI_HDAWG8(name='DummyAWG8',
                                   server='emulator',
                                   num_codewords=32,
                                   device='dev8026',
                                   interface='1GbE')
        # We use an HDAWG because the interface should be similar
        # to a QWG and we do not have a dummy driver
        self.QWG = qwg.Mock_QWG('mock_qwg')

        self.AWG8_MW_LutMan = mwl.AWG8_MW_LutMan('MW_LutMan')
        self.AWG8_MW_LutMan.AWG(self.AWG.name)
        self.AWG8_MW_LutMan.channel_I(1)
        self.AWG8_MW_LutMan.channel_Q(2)
        self.AWG8_MW_LutMan.mw_modulation(100e6)
        self.AWG8_MW_LutMan.sampling_rate(2.4e9)
        self.AWG8_MW_LutMan.set_default_lutmap()

        self.AWG8_VSM_MW_LutMan = mwl.AWG8_VSM_MW_LutMan('MW_LutMan_VSM')
        self.AWG8_VSM_MW_LutMan.AWG(self.AWG.name)
        self.AWG8_VSM_MW_LutMan.channel_GI(1)
        self.AWG8_VSM_MW_LutMan.channel_GQ(2)
        self.AWG8_VSM_MW_LutMan.channel_DI(3)
        self.AWG8_VSM_MW_LutMan.channel_DQ(4)
        self.AWG8_VSM_MW_LutMan.mw_modulation(100e6)
        self.AWG8_VSM_MW_LutMan.sampling_rate(2.4e9)
        self.AWG8_VSM_MW_LutMan.set_default_lutmap()

        self.CBox_MW_LutMan = mwl.CBox_MW_LutMan('CBox_MW_LutMan')
        self.QWG_MW_LutMan = mwl.QWG_MW_LutMan('QWG_MW_LutMan')
        self.QWG_MW_LutMan.AWG(self.QWG.name)
        self.QWG_MW_LutMan.channel_I(1)
        self.QWG_MW_LutMan.channel_Q(2)
Esempio n. 2
0
 def setup_class(cls):
     print('Connecting...')
     cls.hd = HDAWG.ZI_HDAWG8(name='MOCK_HD',
                              server='emulator',
                              num_codewords=32,
                              device='dev8026',
                              interface='1GbE')
Esempio n. 3
0
 def setUpClass(cls):
     cls.k0 = lko.LinDistortionKernel('k0')
     cls.AWG = HDAWG.ZI_HDAWG8(name='DummyAWG8',
                               server='emulator',
                               num_codewords=32,
                               device='dev8026',
                               interface='1GbE')
     cls.k0.instr_AWG(cls.AWG.name)
     cls.k0.cfg_awg_channel(1)
Esempio n. 4
0
    def setup_class(cls):
        # gets called at initialization of test class
        cls.AWG = HDAWG.ZI_HDAWG8(name='DummyAWG8', server='emulator',
                                  num_codewords=32, device='dev8026', interface='1GbE')

        cls.fluxlutman = flm.HDAWG_Flux_LutMan('fluxlutman_main')
        cls.k0 = lko.LinDistortionKernel('k0')
        cls.fluxlutman_partner = flm.HDAWG_Flux_LutMan('fluxlutman_partner')

        # cz sim related below
        cls.fluxlutman_static = flm.HDAWG_Flux_LutMan('fluxlutman_static')
        cls.sim_control_CZ_NE = scCZ.SimControlCZ(
            cls.fluxlutman.name + '_sim_control_CZ_NE')
        cls.sim_control_CZ_NW = scCZ.SimControlCZ(
            cls.fluxlutman.name + '_sim_control_CZ_NW')
        cls.sim_control_CZ_SE = scCZ.SimControlCZ(
            cls.fluxlutman.name + '_sim_control_CZ_SE')
        cls.sim_control_CZ_SW = scCZ.SimControlCZ(
            cls.fluxlutman.name + '_sim_control_CZ_SW')
Esempio n. 5
0
    def setUpClass(self):
        self.station = station.Station()
        self.CCL_qubit = ct.CCLight_Transmon('CCL_qubit')

        self.MW1 = vmw.VirtualMWsource('MW1')
        self.MW2 = vmw.VirtualMWsource('MW2')
        self.MW3 = vmw.VirtualMWsource('MW3')
        self.SH = sh.virtual_SignalHound_USB_SA124B('SH')
        self.UHFQC = UHF.UHFQC(name='UHFQC',
                               server='emulator',
                               device='dev2109',
                               interface='1GbE')

        self.CCL = dummy_CCL('CCL')
        # self.VSM = Dummy_Duplexer('VSM')
        self.VSM = Dummy_QuTechVSMModule('VSM')

        self.MC = measurement_control.MeasurementControl(
            'MC', live_plot_enabled=False, verbose=False)
        self.MC.station = self.station
        self.station.add_component(self.MC)

        # Required to set it to the testing datadir
        test_datadir = os.path.join(pq.__path__[0], 'tests', 'test_output')
        self.MC.datadir(test_datadir)
        a_tools.datadir = self.MC.datadir()

        self.AWG = HDAWG.ZI_HDAWG8(name='DummyAWG8',
                                   server='emulator',
                                   num_codewords=32,
                                   device='dev8026',
                                   interface='1GbE')
        self.AWG8_VSM_MW_LutMan = mwl.AWG8_VSM_MW_LutMan('MW_LutMan_VSM')
        self.AWG8_VSM_MW_LutMan.AWG(self.AWG.name)
        self.AWG8_VSM_MW_LutMan.channel_GI(1)
        self.AWG8_VSM_MW_LutMan.channel_GQ(2)
        self.AWG8_VSM_MW_LutMan.channel_DI(3)
        self.AWG8_VSM_MW_LutMan.channel_DQ(4)
        self.AWG8_VSM_MW_LutMan.mw_modulation(100e6)
        self.AWG8_VSM_MW_LutMan.sampling_rate(2.4e9)

        self.ro_lutman = UHFQC_RO_LutMan('RO_lutman',
                                         num_res=5,
                                         feedline_number=0)
        self.ro_lutman.AWG(self.UHFQC.name)

        # Assign instruments
        self.CCL_qubit.instr_LutMan_MW(self.AWG8_VSM_MW_LutMan.name)
        self.CCL_qubit.instr_LO_ro(self.MW1.name)
        self.CCL_qubit.instr_LO_mw(self.MW2.name)
        self.CCL_qubit.instr_spec_source(self.MW3.name)

        self.CCL_qubit.instr_acquisition(self.UHFQC.name)
        self.CCL_qubit.instr_VSM(self.VSM.name)
        self.CCL_qubit.instr_CC(self.CCL.name)
        self.CCL_qubit.instr_LutMan_RO(self.ro_lutman.name)
        self.CCL_qubit.instr_MC(self.MC.name)

        self.CCL_qubit.instr_SH(self.SH.name)

        config_fn = os.path.join(pq.__path__[0], 'tests', 'openql',
                                 'test_cfg_CCL.json')
        self.CCL_qubit.cfg_openql_platform_fn(config_fn)

        # Setting some "random" initial parameters
        self.CCL_qubit.ro_freq(5.43e9)
        self.CCL_qubit.ro_freq_mod(200e6)

        self.CCL_qubit.freq_qubit(4.56e9)
        self.CCL_qubit.freq_max(4.62e9)

        self.CCL_qubit.mw_freq_mod(-100e6)
        self.CCL_qubit.mw_awg_ch(1)
        self.CCL_qubit.cfg_qubit_nr(0)

        self.CCL_qubit.mw_vsm_delay(15)

        self.CCL_qubit.mw_mixer_offs_GI(.1)
        self.CCL_qubit.mw_mixer_offs_GQ(.2)
        self.CCL_qubit.mw_mixer_offs_DI(.3)
        self.CCL_qubit.mw_mixer_offs_DQ(.4)
Esempio n. 6
0
from pycqed.instrument_drivers.physical_instruments.ZurichInstruments import ZI_HDAWG8
from pycqed.instrument_drivers.physical_instruments import QuTech_CCL

reload(QuTech_CCL)

CCL = QuTech_CCL.CCL('CCL', address='192.168.0.11', port=5025)
cs_filepath = os.path.join(pq.__path__[0], 'measurement', 'openql_experiments',
                           'output', 'cs.txt')

CCL.control_store(cs_filepath)

# AWG8 = ZI_HDAWG8.ZI_HDAWG8('AWG8_8003', device='dev8003')
# AWG8 = ZI_HDAWG8.ZI_HDAWG8('AWG8_8004', device='dev8004')
# AWG8 = ZI_HDAWG8.ZI_HDAWG8('AWG8_8005', device='dev8005')
AWG8 = ZI_HDAWG8.ZI_HDAWG8('AWG8_8006', device='dev8006')
# AWG8 = ZI_HDAWG8.ZI_HDAWG8('AWG8_8008', d/evice='dev8008')

##########################################
#  2. Starting AWG8 test program in CCL  #
##########################################

AWG_type = 'microwave'
# AWG_type = 'flux'

if AWG_type == 'microwave':
    example_fp = os.path.abspath(
        os.path.join(pq.__path__[0], '..', 'examples', 'CCLight_example',
                     'qisa_test_assembly', 'consecutive_cws_double.qisa'))

    sequence_length = 32
    def setUpClass(self):
        """
        This sets up a mock setup using a CCL to control multiple qubits
        """
        self.station = station.Station()

        self.MW1 = vmw.VirtualMWsource("MW1")
        self.MW2 = vmw.VirtualMWsource("MW2")
        self.MW3 = vmw.VirtualMWsource("MW3")
        self.SH = sh.virtual_SignalHound_USB_SA124B("SH")
        self.UHFQC_0 = UHF.UHFQC(
            name="UHFQC_0", server="emulator", device="dev2109", interface="1GbE"
        )

        self.UHFQC_1 = UHF.UHFQC(
            name="UHFQC_1", server="emulator", device="dev2110", interface="1GbE"
        )

        self.UHFQC_2 = UHF.UHFQC(
            name="UHFQC_2", server="emulator", device="dev2111", interface="1GbE"
        )

        self.CCL = dummy_CCL('CCL')
        self.QCC = dummy_QCC('QCC')
        self.CC = CC('CC', DummyTransport())
        self.VSM = Dummy_QuTechVSMModule('VSM')
        self.MC = measurement_control.MeasurementControl(
            "MC", live_plot_enabled=False, verbose=False
        )
        self.MC.station = self.station
        self.station.add_component(self.MC)

        # Required to set it to the testing datadir
        test_datadir = os.path.join(pq.__path__[0], "tests", "test_output")
        self.MC.datadir(test_datadir)
        a_tools.datadir = self.MC.datadir()

        self.AWG_mw_0 = HDAWG.ZI_HDAWG8(
            name="AWG_mw_0",
            server="emulator",
            num_codewords=32,
            device="dev8026",
            interface="1GbE",
        )

        self.AWG_mw_1 = HDAWG.ZI_HDAWG8(
            name="AWG_mw_1",
            server="emulator",
            num_codewords=32,
            device="dev8027",
            interface="1GbE",
        )
        self.AWG_flux_0 = HDAWG.ZI_HDAWG8(
            name="AWG_flux_0",
            server="emulator",
            num_codewords=32,
            device="dev8028",
            interface="1GbE",
        )

        if 0: # FIXME: PR #658: test broken by commit bd19f56
            self.mw_lutman = mwl.AWG8_VSM_MW_LutMan("MW_LutMan_VSM")
            self.mw_lutman.AWG(self.AWG_mw_0.name)
            self.mw_lutman.channel_GI(1)
            self.mw_lutman.channel_GQ(2)
            self.mw_lutman.channel_DI(3)
            self.mw_lutman.channel_DQ(4)
        else: # FIXME: workaround
            self.mw_lutman = mwl.AWG8_MW_LutMan("MW_LutMan")
            self.mw_lutman.channel_I(1)
            self.mw_lutman.channel_Q(2)

        self.mw_lutman.mw_modulation(100e6)
        self.mw_lutman.sampling_rate(2.4e9)

        self.ro_lutman_0 = UHFQC_RO_LutMan(
            "ro_lutman_0", feedline_number=0, feedline_map="S17", num_res=9
        )
        self.ro_lutman_0.AWG(self.UHFQC_0.name)

        self.ro_lutman_1 = UHFQC_RO_LutMan(
            "ro_lutman_1", feedline_number=1, feedline_map="S17", num_res=9
        )
        self.ro_lutman_1.AWG(self.UHFQC_1.name)

        self.ro_lutman_2 = UHFQC_RO_LutMan(
            "ro_lutman_2", feedline_number=2, feedline_map="S17", num_res=9
        )
        self.ro_lutman_2.AWG(self.UHFQC_2.name)

        # Assign instruments
        qubits = []
        for q_idx in range(17):
            q = ct.CCLight_Transmon("q{}".format(q_idx))
            qubits.append(q)

            q.instr_LutMan_MW(self.mw_lutman.name)
            q.instr_LO_ro(self.MW1.name)
            q.instr_LO_mw(self.MW2.name)
            q.instr_spec_source(self.MW3.name)

            if q_idx in [13, 16]:
                q.instr_acquisition(self.UHFQC_0.name)
                q.instr_LutMan_RO(self.ro_lutman_0.name)
            elif q_idx in [1, 4, 5, 7, 8, 10, 11, 14, 15]:
                q.instr_acquisition(self.UHFQC_1.name)
                q.instr_LutMan_RO(self.ro_lutman_1.name)
            elif q_idx in [0, 2, 3, 6, 9, 12]:
                q.instr_acquisition(self.UHFQC_2.name)
                q.instr_LutMan_RO(self.ro_lutman_2.name)

            q.instr_VSM(self.VSM.name)
            q.instr_CC(self.CCL.name)
            q.instr_MC(self.MC.name)

            q.instr_SH(self.SH.name)

            config_fn = os.path.join(pq.__path__[0], "tests", "test_cfg_CCL.json")
            q.cfg_openql_platform_fn(config_fn)

            # Setting some "random" initial parameters
            q.ro_freq(5.43e9 + q_idx * 50e6)
            q.ro_freq_mod(200e6)

            q.freq_qubit(4.56e9 + q_idx * 50e6)
            q.freq_max(4.62e9 + q_idx * 50e6)

            q.mw_freq_mod(-100e6)
            q.mw_awg_ch(1)
            q.cfg_qubit_nr(q_idx)
            # q.mw_vsm_delay(15)
            q.mw_mixer_offs_GI(0.1)
            q.mw_mixer_offs_GQ(0.2)
            q.mw_mixer_offs_DI(0.3)
            q.mw_mixer_offs_DQ(0.4)

        # Set up the device object and set required params
        self.device = do.DeviceCCL("device")
        self.device.qubits([q.name for q in qubits])
        self.device.instr_CC(self.CCL.name)

        self.device.instr_AWG_mw_0(self.AWG_mw_0.name)
        self.device.instr_AWG_mw_1(self.AWG_mw_1.name)
        self.device.instr_AWG_flux_0(self.AWG_flux_0.name)

        self.device.ro_lo_freq(6e9)

        # Fixed by design
        self.dio_map_CCL = {"ro_0": 1, "ro_1": 2, "flux_0": 3, "mw_0": 4, "mw_1": 5}
        # Fixed by design
        self.dio_map_QCC = {
            "ro_0": 1,
            "ro_1": 2,
            "ro_2": 3,
            "mw_0": 4,
            "mw_1": 5,
            "flux_0": 6,
            "flux_1": 7,
            "flux_2": 8,
            "mw_2": 9,
            "mw_3": 10,
            "mw_4": 11,
        }
        # Modular, arbitrary example here
        self.dio_map_CC = {
            "ro_0": 0,
            "ro_1": 1,
            "ro_2": 2,
            "mw_0": 3,
            "mw_1": 4,
            "flux_0": 6,
            "flux_1": 7,
            "flux_2": 8,
        }

        self.device.dio_map(self.dio_map_CCL)
Esempio n. 8
0
    def setUpClass(self):
        """
        This sets up a mock setup using a CCL to control multiple qubits
        """
        self.station = station.Station()

        self.MW1 = vmw.VirtualMWsource('MW1')
        self.MW2 = vmw.VirtualMWsource('MW2')
        self.MW3 = vmw.VirtualMWsource('MW3')
        self.SH = sh.virtual_SignalHound_USB_SA124B('SH')
        self.UHFQC_0 = UHF.UHFQC(name='UHFQC_0',
                                 server='emulator',
                                 device='dev2109',
                                 interface='1GbE')

        self.UHFQC_1 = UHF.UHFQC(name='UHFQC_1',
                                 server='emulator',
                                 device='dev2110',
                                 interface='1GbE')

        self.UHFQC_2 = UHF.UHFQC(name='UHFQC_2',
                                 server='emulator',
                                 device='dev2111',
                                 interface='1GbE')

        self.CCL = dummy_CCL('CCL')
        self.QCC = dummy_QCC('QCC')
        self.CC = QuTechCC('CC', DummyTransport())
        self.VSM = Dummy_Duplexer('VSM')

        self.MC = measurement_control.MeasurementControl(
            'MC', live_plot_enabled=False, verbose=False)
        self.MC.station = self.station
        self.station.add_component(self.MC)

        # Required to set it to the testing datadir
        test_datadir = os.path.join(pq.__path__[0], 'tests', 'test_output')
        self.MC.datadir(test_datadir)
        a_tools.datadir = self.MC.datadir()

        self.AWG_mw_0 = HDAWG.ZI_HDAWG8(name='AWG_mw_0',
                                        server='emulator',
                                        num_codewords=32,
                                        device='dev8026',
                                        interface='1GbE')

        self.AWG_mw_1 = HDAWG.ZI_HDAWG8(name='AWG_mw_1',
                                        server='emulator',
                                        num_codewords=32,
                                        device='dev8027',
                                        interface='1GbE')
        self.AWG_flux_0 = HDAWG.ZI_HDAWG8(name='AWG_flux_0',
                                          server='emulator',
                                          num_codewords=32,
                                          device='dev8028',
                                          interface='1GbE')

        self.AWG8_VSM_MW_LutMan = mwl.AWG8_VSM_MW_LutMan('MW_LutMan_VSM')
        self.AWG8_VSM_MW_LutMan.AWG(self.AWG_mw_0.name)
        self.AWG8_VSM_MW_LutMan.channel_GI(1)
        self.AWG8_VSM_MW_LutMan.channel_GQ(2)
        self.AWG8_VSM_MW_LutMan.channel_DI(3)
        self.AWG8_VSM_MW_LutMan.channel_DQ(4)
        self.AWG8_VSM_MW_LutMan.mw_modulation(100e6)
        self.AWG8_VSM_MW_LutMan.sampling_rate(2.4e9)

        self.ro_lutman_0 = UHFQC_RO_LutMan('ro_lutman_0',
                                           feedline_number=0,
                                           feedline_map='S17',
                                           num_res=9)
        self.ro_lutman_0.AWG(self.UHFQC_0.name)

        self.ro_lutman_1 = UHFQC_RO_LutMan('ro_lutman_1',
                                           feedline_number=1,
                                           feedline_map='S17',
                                           num_res=9)
        self.ro_lutman_1.AWG(self.UHFQC_1.name)

        self.ro_lutman_2 = UHFQC_RO_LutMan('ro_lutman_2',
                                           feedline_number=2,
                                           feedline_map='S17',
                                           num_res=9)
        self.ro_lutman_2.AWG(self.UHFQC_2.name)

        # Assign instruments
        qubits = []
        for q_idx in range(17):
            q = ct.CCLight_Transmon('q{}'.format(q_idx))
            qubits.append(q)

            q.instr_LutMan_MW(self.AWG8_VSM_MW_LutMan.name)
            q.instr_LO_ro(self.MW1.name)
            q.instr_LO_mw(self.MW2.name)
            q.instr_spec_source(self.MW3.name)

            if q_idx in [13, 16]:
                q.instr_acquisition(self.UHFQC_0.name)
                q.instr_LutMan_RO(self.ro_lutman_0.name)
            elif q_idx in [1, 4, 5, 7, 8, 10, 11, 14, 15]:
                q.instr_acquisition(self.UHFQC_1.name)
                q.instr_LutMan_RO(self.ro_lutman_1.name)
            elif q_idx in [0, 2, 3, 6, 9, 12]:
                q.instr_acquisition(self.UHFQC_2.name)
                q.instr_LutMan_RO(self.ro_lutman_2.name)

            q.instr_VSM(self.VSM.name)
            q.instr_CC(self.CCL.name)
            q.instr_MC(self.MC.name)

            q.instr_SH(self.SH.name)

            config_fn = os.path.join(pq.__path__[0], 'tests',
                                     'test_cfg_CCL.json')
            q.cfg_openql_platform_fn(config_fn)

            # Setting some "random" initial parameters
            q.ro_freq(5.43e9 + q_idx * 50e6)
            q.ro_freq_mod(200e6)

            q.freq_qubit(4.56e9 + q_idx * 50e6)
            q.freq_max(4.62e9 + q_idx * 50e6)

            q.mw_freq_mod(-100e6)
            q.mw_awg_ch(1)
            q.cfg_qubit_nr(q_idx)
            # q.mw_vsm_delay(15)
            q.mw_mixer_offs_GI(.1)
            q.mw_mixer_offs_GQ(.2)
            q.mw_mixer_offs_DI(.3)
            q.mw_mixer_offs_DQ(.4)

        # Set up the device object and set required params
        self.device = do.DeviceCCL('device')
        self.device.qubits([q.name for q in qubits])
        self.device.instr_CC(self.CCL.name)
        self.device.instr_AWG_mw_0(self.AWG_mw_0.name)
        self.device.instr_AWG_mw_1(self.AWG_mw_1.name)
        self.device.instr_AWG_flux_0(self.AWG_flux_0.name)

        self.device.ro_lo_freq(6e9)
Esempio n. 9
0
log.debug("File for CC = '{}'".format(cc_file_name))

##########################################
# Open physical instruments
##########################################
#station = station.Station()

instr = lambda: 0  # create empty 'struct'
instr.mw = []
instr.flux = []
instr.ro = []
for i, dev in enumerate(conf.mw):
    name = 'mw_' + str(i)
    log.debug(f'connecting to microwave AWG8 {name}={dev}')
    instr.mw.append(ZI_HDAWG8.ZI_HDAWG8(name, device=dev))
    log.debug(f'connected to mw AWG8 {name}={dev}')
    #station.add_component(instr.mw[i])

for i, dev in enumerate(conf.flux):
    name = 'flux_' + str(i)
    log.debug(f'connecting to flux AWG8 {name}={dev}')
    instr.flux.append(ZI_HDAWG8.ZI_HDAWG8(name, device=dev))
    #station.add_component(instr.flux[i])

for i, dev in enumerate(conf.ro):
    name = 'ro_' + str(i)
    log.debug(f'connecting to readout UHFQA {name}={dev}')
    instr.ro.append(ZI_UHFQC.UHFQC(name, device=dev))
    #station.add_component(instr.ro[i])
Esempio n. 10
0
        opt_set_lvds = True
    elif val == "-c":
        opt_set_cmos = True
    elif val == '-s':
        opt_dio_snapshot = True
    elif val == "-S":
        opt_dio = True
    elif val == "-c":
        opt_codewords = True
    else:
        dev = val
    arg += 1

if 1:  # HDAWG
    log.debug('connecting to instrument')
    instr = ZI_HDAWG8.ZI_HDAWG8('hdawg', device=dev)
    instr.assure_ext_clock()

    # -l: set DIO interface to LVDS (NB: this mode persists across power cycles)
    if opt_set_lvds:
        log.info('setting DIO interface to LVDS')
        instr.set('dios_0_interface', 1)

    # -c: set DIO interface to CMOS (NB: this mode persists across power cycles)
    if opt_set_cmos:
        log.info('setting DIO interface to CMOS')
        instr.set('dios_0_interface', 0)

    # -s: plot DIO snapshot  using HDAWG driver function
    if opt_dio_snapshot:
        instr.plot_dio_snapshot()