# T1 Measurement

Now that we have measured the basic qubit properties — readout resonator frequency, qubit resonance frequency and qubit drive pulse amplitudes — and calibrated our system accordingly, we can use these to obtain information about the properties of our qubit. First, we will do a simple measurement of the lifetime T1 of the qubit.

To measure the lifetime of the qubit state, the qubit is brought to its excited state. We will then wait a variable time before measuring the state of the qubit. Averaging over many measurements will yield the probability of still finding the qubit in its excited state after this time.

The experimental parameters for the T1 experiment are the range of delay times and the number of steps we will iterate the delay over. We also define the pulse used to drive the qubit from the ground to its excited state, using the Gaussian waveform already used in the Rabi experiment, together with the newly determined π-pulse amplitude.

# delay range for ramsey pulses
t1_min = 0.
t1_max = 5 * qubit_parameters['T1']
# how many delay points to sweep
t1_num = 60

# how many averages per point: 2^n_average
n_average = 10

# set up sweep parameter
t1_sweep = LinearSweepParameter(uid="t1_delay", start=t1_min, stop=t1_max, count=t1_num)

# T1 excitation pulse - qubit pi pulse
x180 = pulse_library.gaussian(
uid="x180", length=qubit_parameters['qb_len'], amplitude=qubit_parameters['pi_amp']
)

The definition of the experiment follows the same lines as before, with the sweep parameter now being the delay time between the qubit excitation pulse and the readout of the qubit state.

# Create Experiment
exp_t1 = Experiment(
uid="Qubit T1",
signals=[
ExperimentSignal("drive"),
ExperimentSignal("measure"),
ExperimentSignal("acquire"),
],
)

## define experiment sequence
# outer loop - real-time averaging
with exp_t1.acquire_loop_rt(uid="t1_shots", count=pow(2, n_average), averaging_mode=AveragingMode.SEQUENTIAL, acquisition_type=AcquisitionType.INTEGRATION):
# inner loop - real-time sweep delay between pi pulse and readout
with exp_t1.sweep(uid="t1_sweep", parameter=t1_sweep):
# qubit pi pulse and following delay
with exp_t1.section(uid="qubit_excitation", length=t1_max+2*x180.length, alignment=SectionAlignment.RIGHT):
exp_t1.play(signal="drive", pulse=x180)
exp_t1.delay(signal="drive", time=t1_sweep)
# readout pulse and data acquisition
)