コード例 #1
0
    def test_mod_gauss_VSM(self):
        amplitude = .4  # something not equal to one to prevent some bugs
        motzoi = .73
        sigma = 20e-9
        G_I, G_Q, D_I, D_Q = wf.mod_gauss_VSM(
            amplitude, sigma, axis='x', nr_sigma=4,
            sampling_rate=1e9, f_modulation=0,
            motzoi=motzoi, delay=0)

        np.testing.assert_almost_equal(G_I, g_env)
        np.testing.assert_almost_equal(G_Q, np.zeros(len(g_env)))
        np.testing.assert_almost_equal(D_I, np.zeros(len(g_env)))
        np.testing.assert_almost_equal(D_Q, d_env)
コード例 #2
0
    def test_uploading_standard_pulses_AWG8_VSM(self):
        # Tests that all waveforms are present and no error is raised.
        self.AWG8_VSM_MW_LutMan.load_waveforms_onto_AWG_lookuptable()
        expected_wfs = wf.mod_gauss_VSM(
            amp=self.AWG8_VSM_MW_LutMan.mw_amp180(),
            sigma_length=self.AWG8_VSM_MW_LutMan.mw_gauss_width(),
            f_modulation=self.AWG8_VSM_MW_LutMan.mw_modulation(),
            sampling_rate=self.AWG8_VSM_MW_LutMan.sampling_rate(),
            phase=0,
            motzoi=self.AWG8_VSM_MW_LutMan.mw_motzoi())

        for i in range(4):
            uploaded_wf = self.AWG.get('wave_ch{}_cw001'.format(i + 1))
            np.testing.assert_array_almost_equal(expected_wfs[i], uploaded_wf)