Relaxation time T1

Using pulsed mode, we measure the energy-relaxation time \(T_1\) of the qubit. The qubit-control pulse is a \(\pi\) pulse with a \(\sin^2\) envelope. The delay \(\delta\) between the control pulse and the resonator-readout pulse is swept. The readout pulse is at the frequency of the readout resonator and has a square envelope.

T1 pulse sequence

The class for performing the \(T_1\) experiment is available at presto-measure/ Here, we run the experiment and observe the exponential decay of the qubit population. We then have a look at the main parts of the code.

You can create a new experiment and run it on your Presto. Be sure to change the parameters of T1 to match your experiment and change presto_address to match the IP address of your Presto:

from t1 import T1
import numpy as np

experiment = T1(
    delay_arr=np.linspace(0, 50e-6, 101),

presto_address = ""  # your Presto IP address
save_filename =

Or you can also load older data:

experiment = T1.load("data/t1_20220404_130724.h5")

In either case, we analyze the data to get a nice plot:


The qubit starts close to the excited state at zero control-readout delay \(\delta = 0~\mu s\), and exponentially decays towards the ground state for increasing \(\delta\). Data is fitted to an exponentially-decaying function and relaxation time \(T_1\) is extracted. The complex-valued readout signal is rotated using utils.rotate_opt() so that all the information about the qubit state is in the I quadrature.

Code explanation

Here we discuss the main part of the code of the T1 class: the definition of the experiment sequence. The full source is available at presto-measure/


If this is your first measurement in pulsed mode, you might want to first have a look at the Rabi amplitude chapter in this tutorial. There we describe the code more pedagogically and in more detail.

We implement the variable delay in the \(T_1\) measurement with a single for loop:

T = 0.0  # s, start at time zero ...
for delay in self.delay_arr:
    # π pulse
    pls.output_pulse(T, control_pulse)
    T += self.control_duration

    # increasing delay
    T += delay

    # readout
    pls.output_pulse(T, readout_pulse) + self.readout_sample_delay)
    T += self.readout_duration

    # Wait for decay
    T += self.wait_delay

As usual, we first output the qubit-control pulse and then we perform the readout. This time, however, we increase the time T in between the two pulses to achieve a variable delay between control and readout.

run() executes the experiment sequence. We set repeat_count=1 since the whole pulse sequence is already programmed in the for loop., repeat_count=1, num_averages=self.num_averages)