Hahn echo
This tutorial presents a practical use of QUA to run a well known experiment known as the Hahn echo sequence.
#
Description of experiment#
Introduction" Electron spin resonance (ESR) and nuclear magnetic resonance (NMR) are used in diverse branches of science, ranging from spectroscopic studies in biochemistry and materials science to imaging of internal organs in medicine. In NMR and ESR, an ensemble of spins is typically placed within a resonator, controlled by the application of resonant pulses, and measured via emission of signals into a resonator mode. As the spin ensembles are typically inhomogeneous, a common solution is to use control pulses which refocus inhomogeneous interactions, reversing the time evolution of different spin packets to produce a spin echo or ‘Hahn echo’. "
Source : Mølmer et al., Self-stimulated pulse echo trains from inhomogeneously broadened spin ensembles(https://arxiv.org/pdf/2004.01116.pdf)
#
Hahn echo sequence
Source: Gavin Morley, Wikipedia page "Spin echo" (https://en.wikipedia.org/wiki/Spin_echo)
The Hahn echo sequence can be summarized as follows (when working in the rotating frame of the qubit):
- Apply a -pulse
- Wait a certain time duration (echo time)
- Apply a -pulse
- Wait again for echo, the relaxation time gives a good indication of the relaxation
- Optional: Apply again a -pulse to come back to the z-axis of the Bloch sphere for deduction of
- Readout of the qubit
#
Describing the QUA program#
The configuration fileThe configuration file is composed of the following items :
- controllers : We define the outputs and inputs of the OPX device, which will be of use for the experiment. In this case, we have two analog outputs for the qubit, and two others for its coupled readout resonator. We add an analog input which is the channel where will be sampled out the analog results of the readout operation.
- elements : This defines the set of essential components of the quantum system interacting with the OPX. In this case, the two elements are the qubit and the coupled readout resonator. Here are specified the main characteristics of the element, such as its resonant frequency, its associated operations (i.e the operations the OPX can apply on the element).
- pulses : A description of the doable pulses introduced in the elements. Here is provided a description of the default pulse duration (length parameter), the associated waveform (which can be taken from an arbitrary array), the type of operation (e.g control or measurement)
- waveforms : Specification of the pulse shape based on pre-built arrays (either by the user in case the shape is arbitrary, or constant pulse otherwise)
- Integration weights : Describe the demodulation process of the data
#
The QUA programThe goal of the program is to find the echo time for which the qubit's relaxation process is complete. We then perform a for_ iteration over a set of possible times (within an interval named as t_vec) and perform the Hahn echo sequence. We then retrieve the results using measurement features of QUA (here embedded into the function readout_QUA) and use plot tools to determine the echo time.