コード例 #1
0
ファイル: sequence.py プロジェクト: zaguros/analysis
    def get_electron_ROC(self, **kw):
        ssro_calib_folder = kw.pop('ssro_calib_folder', None)
        if ssro_calib_folder is None:
            ssro_calib_folder = toolbox.latest_data('SSROCalibration')
        # print ssro_calib_folder
        if ssro_calib_folder == '':
            ssro_calib_folder = toolbox.latest_data('SSROCalibration')

        self.p0 = np.zeros(self.normalized_ssro.shape)
        self.u_p0 = np.zeros(self.normalized_ssro.shape)

        ro_duration = self.g.attrs['SSRO_duration']
        roc = error.SingleQubitROC()

        # Decide between ssro calib via MW Initialisation or some other method
        # At the time of writing only MWInit and full las0r SSRO exist ~SK 2016
        if 'MWInit' in ssro_calib_folder:
            el_state = self.adgrp.attrs['electron_transition']
            # print 'MWInit, el_state: ' + str(el_state)

            roc.F0, roc.u_F0, roc.F1, roc.u_F1 = \
                ssro.get_SSRO_MWInit_calibration(ssro_calib_folder,
                        ro_duration,el_state)

        else:
            roc.F0, roc.u_F0, roc.F1, roc.u_F1 = \
                ssro.get_SSRO_calibration(ssro_calib_folder,
                        ro_duration)

        p0, u_p0 = roc.num_eval(self.normalized_ssro, self.u_normalized_ssro)

        self.p0 = p0
        self.u_p0 = u_p0

        self.result_corrected = True
コード例 #2
0
def get_RO_fidelities(ssro_folder,mw_transition,E_RO_duration):

    if 'MWInit' in ssro_folder:
        F_0,u_F0,F_1,u_F1 = ssro.get_SSRO_MWInit_calibration(ssro_folder,E_RO_duration,mw_transition)
    else:
        F_0,u_F0,F_1,u_F1 = ssro.get_SSRO_calibration(ssro_folder,E_RO_duration)

    return F_0,F_1 ### excludiung uncertainties for now.
コード例 #3
0
ファイル: purify_BK.py プロジェクト: zaguros/analysis
    def find_RO_fidelities(self, timestamp, raw_data, folder=''):

        ssro_folder = tb.data_from_time(timestamp, folder=folder)

        if 'MWInit' in ssro_folder:
            F_0, u_F0, F_1, u_F1 = ssro.get_SSRO_MWInit_calibration(
                ssro_folder, raw_data.g.attrs['E_RO_durations'][0],
                raw_data.g.attrs['electron_transition'])
        else:
            F_0, u_F0, F_1, u_F1 = ssro.get_SSRO_calibration(
                ssro_folder, raw_data.g.attrs['E_RO_durations'][0])

        return F_0, F_1
コード例 #4
0
ファイル: mbi.py プロジェクト: machielblok/analysis
    def get_electron_ROC(self, ssro_calib_folder=''):
        if ssro_calib_folder == '':
            ssro_calib_folder = toolbox.latest_data('SSRO')

        self.p0 = np.zeros(self.normalized_ssro.shape)
        self.u_p0 = np.zeros(self.normalized_ssro.shape)

        ro_durations = self.g.attrs['E_RO_durations']
        roc = error.SingleQubitROC()

        # Decide between ssro calib via MW Initialisation or some other method
        # At the time of writing only MWInit and full las0r SSRO exist ~SK 2016
        if 'MWInit' in ssro_calib_folder:
            el_state = self.adgrp.attrs['electron_transition']
            # print 'MWInit, el_state: ' + str(el_state)

            for i in range(len(self.normalized_ssro[0])):
                roc.F0, roc.u_F0, roc.F1, roc.u_F1 = \
                    ssro.get_SSRO_MWInit_calibration(ssro_calib_folder,
                            ro_durations[i],el_state)

                p0, u_p0 = roc.num_eval(self.normalized_ssro[:,i],
                        self.u_normalized_ssro[:,i])

                self.p0[:,i] = p0
                self.u_p0[:,i] = u_p0


        else:
            for i in range(len(self.normalized_ssro[0])):
                roc.F0, roc.u_F0, roc.F1, roc.u_F1 = \
                    ssro.get_SSRO_calibration(ssro_calib_folder,
                            ro_durations[i])

                p0, u_p0 = roc.num_eval(self.normalized_ssro[:,i],
                        self.u_normalized_ssro[:,i])

                self.p0[:,i] = p0
                self.u_p0[:,i] = u_p0



        self.result_corrected = True
コード例 #5
0
ファイル: mbi.py プロジェクト: zaguros/analysis
    def get_electron_ROC(self, ssro_calib_folder='',**kw):
        if ssro_calib_folder == '':
            ssro_calib_folder = toolbox.latest_data('SSROCalibration', **kw)

        self.p0 = np.zeros(self.normalized_ssro.shape)
        self.u_p0 = np.zeros(self.normalized_ssro.shape)

        ro_durations = self.g.attrs['E_RO_durations']
        roc = error.SingleQubitROC()

        # Decide between ssro calib via MW Initialisation or some other method
        # At the time of writing only MWInit and full las0r SSRO exist ~SK 2016
        if 'MWInit' in ssro_calib_folder:
            el_state = self.adgrp.attrs['electron_transition']
            # print 'MWInit, el_state: ' + str(el_state)

            for i in range(len(self.normalized_ssro[0])):
                roc.F0, roc.u_F0, roc.F1, roc.u_F1 = \
                    ssro.get_SSRO_MWInit_calibration(ssro_calib_folder,
                            ro_durations[i],el_state)

                p0, u_p0 = roc.num_eval(self.normalized_ssro[:,i],
                        self.u_normalized_ssro[:,i])

                self.p0[:,i] = p0
                self.u_p0[:,i] = u_p0


        else:
            for i in range(len(self.normalized_ssro[0])):
                roc.F0, roc.u_F0, roc.F1, roc.u_F1 = \
                    ssro.get_SSRO_calibration(ssro_calib_folder,
                            ro_durations[i])

                p0, u_p0 = roc.num_eval(self.normalized_ssro[:,i],
                        self.u_normalized_ssro[:,i])

                self.p0[:,i] = p0
                self.u_p0[:,i] = u_p0


        self.result_corrected = True
コード例 #6
0
ファイル: sequence.py プロジェクト: machielblok/analysis
    def get_electron_ROC(self, **kw):
        ssro_calib_folder = kw.pop('ssro_calib_folder', toolbox.latest_data('SSRO'))
        # print ssro_calib_folder
        if ssro_calib_folder == '':
                ssro_calib_folder = toolbox.latest_data('SSRO')


        self.p0 = np.zeros(self.normalized_ssro.shape)
        self.u_p0 = np.zeros(self.normalized_ssro.shape)

        ro_duration = self.g.attrs['SSRO_duration']
        roc = error.SingleQubitROC()

        # Decide between ssro calib via MW Initialisation or some other method
        # At the time of writing only MWInit and full las0r SSRO exist ~SK 2016
        if 'MWInit' in ssro_calib_folder:
            el_state = self.adgrp.attrs['electron_transition']
            # print 'MWInit, el_state: ' + str(el_state)
       
            roc.F0, roc.u_F0, roc.F1, roc.u_F1 = \
                ssro.get_SSRO_MWInit_calibration(ssro_calib_folder,
                        ro_duration,el_state)

        else:
            roc.F0, roc.u_F0, roc.F1, roc.u_F1 = \
                ssro.get_SSRO_calibration(ssro_calib_folder,
                        ro_duration)

        p0, u_p0 = roc.num_eval(self.normalized_ssro,
                self.u_normalized_ssro)

        self.p0 = p0
        self.u_p0 = u_p0



        self.result_corrected = True