See also

A Jupyter notebook version of this tutorial can be downloaded here.

image0

\(T_1\)#

To analyze how quickly a qubit relaxes to the ground state from the excited state, a \(T_1\) experiment is performed. For this type of measurement, the qubit is initialized in the |0⟩ state and driven to the |1⟩ state using a \(\pi\)-pulse. By performing measurements at different times \(\tau\) after the \(\pi\)-pulse the decay constant \(T_1\) can be measured.

[1]:
from qblox_applications.qblox_scheduler.analysis import T1Analysis
from qblox_applications.qblox_scheduler.superconducting.transmon import (
    BasicTransmonElement,  # noqa: F401
)
from xarray import open_dataset

from qblox_scheduler import DType, HardwareAgent, Measure, Reset, Schedule, X, arange

Setup#

The hardware agent manages the connection to the instrument and ensures that pulses and acquisitions happen over the appropriate input and output channels of the Cluster. The cell below creates an instance of the HardwareAgent based on the hardware- and device-under-test configuration files in the ./dependencies/configs folder, allowing us to start doing measurements. We also define some convenient aliases to use throughout our measurements. For a more thorough discussion of the hardware- and device-under-test configuration files, check out this tutorial.

[2]:
# Set up hardware agent, this automatically connects to the instrument
hw_agent = HardwareAgent(
    hardware_configuration="./dependencies/configs/hw_config.json",
    quantum_device_configuration="./dependencies/configs/dut_config.json",
)

# convenience aliases
q0 = hw_agent.quantum_device.get_element("q0")  # Qubits 0 and 2 are measured using QRM-RF + QCM-RF
q2 = hw_agent.quantum_device.get_element("q2")
q3 = hw_agent.quantum_device.get_element("q3")  # Qubit 3 is measured using QRC

cluster = hw_agent.get_clusters()["cluster"]
hw_options = hw_agent.hardware_configuration.hardware_options
qubit = q0
/.venv/lib/python3.14/site-packages/qblox_scheduler/qblox/hardware_agent.py:603: UserWarning: cluster: Trying to instantiate cluster with ip 'None'.Creating a dummy cluster.
  warnings.warn(

Experiment settings#

[3]:
# Tau settings in seconds
tau_start = 1e-6  # s
tau_stop = 500e-6  # s
tau_step = 10e-6  # s

repetitions = 1000

Experiment schedule#

[4]:
t1_sched = Schedule(name="t1_experiment")

with (
    t1_sched.loop(arange(0, repetitions, 1, DType.NUMBER)),
    t1_sched.loop(arange(start=tau_start, stop=tau_stop, step=tau_step, dtype=DType.TIME)) as tau,
):
    t1_sched.add(Reset(qubit.name))
    # Prepare |1>
    t1_sched.add(X(qubit=qubit.name))
    # Measure after time tau
    t1_sched.add(Measure(qubit.name, coords={"tau": tau}, acq_label="S_21"), rel_time=tau)

# Execute the experiment
t1_data = hw_agent.run(t1_sched)
if cluster.is_dummy:
    example_data = open_dataset("./dependencies/datasets/t1.hdf5", engine="h5netcdf")
    t1_data.update({"S_21": example_data.S_21})

Analyze the experiment#

[5]:
t1_analysis = T1Analysis(t1_data).run()
t1_analysis.display_figs_mpl()
findfont: Failed to find font weight 300 for STIXGeneral, now using 400.
findfont: Failed to find font weight 300 for STIXGeneral, now using 400.
findfont: Failed to find font weight 300 for STIXNonUnicode, now using 400.
findfont: Failed to find font weight 300 for STIXNonUnicode, now using 400.
findfont: Failed to find font weight 300 for STIXSizeOneSym, now using 400.
findfont: Failed to find font weight 300 for STIXSizeTwoSym, now using 400.
findfont: Failed to find font weight 300 for STIXSizeThreeSym, now using 400.
findfont: Failed to find font weight 300 for STIXSizeFourSym, now using 400.
findfont: Failed to find font weight 300 for STIXSizeFiveSym, now using 400.
findfont: Failed to find font weight 300 for cmmi10, now using 400.
findfont: Failed to find font weight 300 for cmsy10, now using 400.
findfont: Failed to find font weight 300 for cmr10, now using 400.
findfont: Failed to find font weight 300 for cmtt10, now using 400.
findfont: Failed to find font weight 300 for cmti10, now using 400.
findfont: Failed to find font weight 300 for cmb10, now using 400.
findfont: Failed to find font weight 300 for cmss10, now using 400.
findfont: Failed to find font weight 300 for cmex10, now using 400.
findfont: Failed to find font weight 300 for DejaVu Sans, now using 400.
findfont: Failed to find font weight 300 for DejaVu Sans, now using 400.
findfont: Failed to find font weight 300 for DejaVu Sans Mono, now using 400.
findfont: Failed to find font weight 300 for DejaVu Sans Display, now using 400.
../../../_images/applications_superconducting_flux_tunable_transmon_080_t1_10_1.png

Update the device configuration file#

After measurement, we may store the measured device properties inside a new file to use in future experiments. The time-unique identifier ensures that it is easy to find back previously found measurement results.

[6]:
hw_agent.quantum_device.to_json_file("./dependencies/configs", add_timestamp=True)
[6]:
'./dependencies/configs/two_flux_tunable_transmons_2026-10-15_13-58-22_UTC.json'