As the next step, we will do a Ramsey experiment. For this experiment, we excite the qubit with two consecutive π/2-pulses, and sweep the delay time between the pulses.
As before, we start by defining some experimental parameters. Here, we set the minimum and maximum delay between the two qubit excitation pulses as well as the number of sweep steps and averages per point. We also define the π/2-pulse with a Gaussian waveform envelope, and use the amplitude as calibrated in the Rabi experiment before.
# delay range for ramsey pulses ramsey_min = 0.0 ramsey_max = 2.5 * qubit_parameters['T2_ramsey'] # how many delay points to sweep ramsey_num = 150 # how many averages per point: 2^n_average n_average = 10 # set up delay sweep parameter ramsey_sweep = LinearSweepParameter(uid="ramsey_delay", start=ramsey_min, stop=ramsey_max, count=ramsey_num) # Ramsey excitation pulse - qubit pi/2 pulse - will be slightly detuned x90 = pulse_library.gaussian( uid="x90", length=qubit_parameters['qb_len'], amplitude=qubit_parameters['pihalf_amp'] )
The sweep parameter in the Ramsey experiment is the delay between the two π/2-pulses played on the qubit drive line. The qubit readout section is the same as before. Note that here we also introduce an artificial detuning of the qubit excitation pulse frequency, with the value of the detuning defined through parameter called 'ramsey_det'. For a perfectly calibrated qubit, this artificial detuning will ensure that the measured signal shows oscillations over the delay time. Any additional frequency contribution in the data can then be attributed to a prior miscalibration of the qubit frequency, and the Ramsey experiment is often used to fine-calibrate the qubit resonance frequency.
# Create Experiment exp_ramsey = Experiment( uid="Ramsey", signals=[ ExperimentSignal("drive"), ExperimentSignal("measure"), ExperimentSignal("acquire"), ], ) ## define Experiment sequence # outer loop - real-time averaging with exp_ramsey.acquire_loop_rt(uid="ramsey_shots", count=pow(2, n_average), averaging_mode=AveragingMode.CYCLIC, acquisition_type=AcquisitionType.INTEGRATION): # inner loop - sweep Ramsey delay in real time with exp_ramsey.sweep(uid="ramsey_sweep", parameter=ramsey_sweep, alignment=SectionAlignment.RIGHT): # Ramsey pulse sequence on qubit with exp_ramsey.section(uid="qubit_excitation", length=ramsey_max+2*x90.length, alignment=SectionAlignment.RIGHT): exp_ramsey.play(signal="drive", pulse=x90) exp_ramsey.delay(signal="drive", time=ramsey_sweep) exp_ramsey.play(signal="drive", pulse=x90) # readout pulse and data acquisition readoutQubit(exp_ramsey, section_id="qubit_readout", readout_id="measure", acquire_id="acquire", reserve_id="drive", acquire_handle="q0_ramsey", readout_delay=qubit_parameters['ro_delay'], acquire_offset =qubit_parameters['ro_int_delay'], readout_pulse=readout_pulse, readout_weights=readout_weighting_function, relax_time=qubit_parameters['relax'] )
Figure 1 shows example data as can be obtained from a Ramsey experiment. In addition to oscillations, the measured signal will typically also decay over time with a characteristic timescale called the Ramsey dephasing time, or T2. This timescale carries information about the low frequency part of the noise acting on the qubit. To extract these parameters, we fit the experimental data to a decaying oscillating function, as is shown in the data, and can use these results to fine-tune the qubit excitation frequency as well as determine the dephasing time of the qubit quantum state.