Autonomous calibration of single spin qubit operations

Fully autonomous precise control of qubits is crucial for quantum information processing, quantum communication, and quantum sensing applications. It requires minimal human intervention on the ability to model, to predict, and to anticipate the quantum dynamics, as well as to precisely control and calibrate single qubit operations. Here, we demonstrate single qubit autonomous calibrations via closed-loop optimisations of electron spin quantum operations in diamond. The operations are examined by quantum state and process tomographic measurements at room temperature, and their performances against systematic errors are iteratively rectified by an optimal pulse engineering algorithm. We achieve an autonomous calibrated fidelity up to 1.00 on a time scale of minutes for a spin population inversion and up to 0.98 on a time scale of hours for a single qubit π2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\frac{\pi }{2}$$\end{document}-rotation within the experimental error of 2%. These results manifest a full potential for versatile quantum technologies. A new approach autonomously controls and calibrates single qubit quantum operations in diamond, with minimal human intervention. Delicate operations on quantum systems require continuous optimisation to remain efficient in presence of experimental limitations or noise. Florian Frank and a team led by Fedor Jelezko and colleagues at the Universities of Ulm, of Padova, and of the Saarlandes have now reported a closed-loop feedback approach that, without requiring constant external information, successfully and autonomously controlled operations at room temperature on a single nitrogen–vacancy colour centre in diamond—a single spin qubit. The researchers reported high-fidelity spin population inversion, and π/2 rotation over timescales from minutes to hours, but explain that their technique could be extended to multi-qubit operations. Improved control methods for quantum operations will be of great help for the development of future quantum technologies.


INTRODUCTION
The ability to precisely control and calibrate single qubit operations in solids is a key element for reliable and scalable high-performance quantum technologies, for instance quantumenhanced sensors and metrological devices. It is also the backbone of many quantum information processing tasks, which paves the way for the future realisation of quantum computation and communication. Together with efficient quantum system characterisations and dynamical predictions, 1,2 where human intervention is minimised, autonomous calibration of a single spin qubit is necessary for the realisation of such advanced quantum technologies. We report here experimental demonstrations of the autonomous calibration of a single spin qubit in diamond using closed-loop optimisation. Our spin qubit implementation is a single nitrogen-vacancy (NV) colour centre in diamond. It provides a suitable platform for a precise qubit manipulation to be realised. 3,4 Its remarkable features, such as optical initialisation and readout, and the ability to be manipulated by microwave fields at room temperature, make this physical system extremely attractive for many quantum technologies. 5 We have witnessed a vast array of demonstrations of the NV centres showing a great potential for future technologies, ranging from sub pico-Tesla magnetometry, 6 electric field and temperature sensing, 7,8 to probing molecular dynamics, 9 and single-cell magnetic imaging. 10 Furthermore, intertwinements between quantum information and metrology using NV centre-based systems yield novel and effective techniques towards the realisation of high-performance technologies, e.g. applying quantum error correction 11 and phase estimation 12 to improve magnetic field sensitivity. One way to reach such technology is to apply the closed-loop optimisation method for auto-calibrating the controls required to drive the system in the presence of experimental limitations and noise. Closed-loop optimal control has been already applied to quantum information processing. 13,14 However, to date no realisation of such autonomous calibration in room-temperature solids has been reported. Here, we apply a technique derived from optimal control theory, namely the dressed chopped random basis (DCRAB) algorithm, 15,16 to perform real-time closed-loop optimisations of two fundamental single qubit operations, a spin-1/2 population inversion and a π 2 -rotation gate, against frequency detuning. The algorithm is adapted for use in the NV centre-based experiment and directly embedded in the experimental apparatus, allowing the autonomous spin qubit calibrations to be fully performed as illustrated by Fig. 1. In contrast to a simple feedback circuit where usually only a single degree of freedom is adjusted at a time based on continuous measurement, our framework considers the whole quantum dynamics and is capable of addressing multiple degrees of freedom at every instance in time.
Optimal control methods have been applied to several quantum information processing tasks with NV centres, [17][18][19][20][21][22] affirming their necessity and significance for quantum technology. However, the previously reported experiments, [17][18][19][20][21][22] utilise openloop optimisation techniques where the optimisation is performed before the actual experiment by separate computer simulations. The technique requires system-environment coupling information as detailed as possible to provide a robust solution. In contrast, the closed-loop technique requires no explicit system-environment information. Hence, it is utmost practical for the realisation of versatile quantum devices. One significant feature of the DCRAB algorithm is that it makes such closed-loop optimisation viable since the only quantity required from the experiment is a single figure of merit (e.g. state or gate fidelity). No further information, such as a gradient or a Hessian, is necessary. Moreover, recent theoretical work, 23,24 points out that the relevant number of degrees of freedom in the control is rather small for few qubit systems. A reasonable number of degrees of freedom can be addressed through a suitable parametrisation. [25][26][27] The DCRAB algorithm makes use of this foundation. It shapes high accuracy pulses with few iterations (or superiteration that is required for avoiding local optimisation traps), and maintains the robustness against noise and errors potentially occurred at any stage of experiments. 16 The key ideas are to expand the pulses in a reasonable function basis and subsequent basis function changes to avoid local traps. We provide more detailed discussions of the algorithm and its implementations in the "Methods" section and in Section A in the Supplementary Material.

High fidelity population inversion via closed-loop control
In this experiment, we search for an optimal microwave pulse to transfer the NV spin state m s ¼ 0 j ito m s ¼ À1 j iwith high fidelity. Therefore, we performed a state tomography after applying a parametrised microwave pulse. Subsequent measurement of the state transfer fidelity is then used as a figure of merit. To estimate the particular fidelity F cl ex we utilised quantum state tomography (see Sections B and C of the Supplementary Information). For convention, the subscripts of the fidelity F j i indicate either experimental (ex) or theoretical (th) data. The superscripts (cl) and (ol) refer to closed-loop and open-loop control, respectively. In Fig. 2 we show the results of our state transfer optimisation. In part (a), we first identify via an open-loop simulation the expected performance of the employed optimisation method in presence of limited transfer time T and static detuning Δ. For relative process times T/T π exceeding~1.5, our simulations identify robust solutions even up to a relative detuning of about Δ Ω ¼ 10. Here the maximal Rabi frequency is determined by Ω ¼ 1 2Tπ , which is connected to the maximal amplitude of the applied microwave pulse. We studied transfer times in the regime T/T π > 1 because the maximum speed of a quantum system evolution is bound in general by the quantum speed limit. 28,29 Numerical simulations support this fact when a rectangular microwave pulse shape is assumed (see Supplementary Material Section G). In part (b), we show our experimental results achieved via closed loop optimisation, which support these results for small detuning, when T/T π = 1.5. For comparison, we show the corresponding cross-section of the numerical results of part (a) in (c). Each optimisation, performed for a certain gate time and a certain detuning, bases on a DCRAB algorithm with six superiterations. Exemplarily, we show in Fig. 2d, e the full closed-loop optimisation process in the case of no detuning, and when a small detuning is applied. The blue curve shows the currently best found solution, while the red line is an internal algorithmic figure of merit quantity (for details see Supplementary Material Section A). The necessary time for achieving optimal fidelities depends on the accuracy of the tomography measurements F cl ex À Á and on the initial optimisation parameters. In our case, a randomly chosen configuration (startsimplex) of the search algorithm was used. We achieve the maximal fidelity of 1.00 with an accuracy of 10 −2 on a reliable timescale of about 2000 s in the case of no detuning and on a timescale of about 100 s with detuning. A faster optimisation with an off-resonant pulse is here possible due to a fortunate choice of the initial search-configuration (optimal solution was already part of start-simplex). It is interesting to note, that all optimised pulses of the open-loop simulation were not able to beat the results of our closed-loop strategy in the case of moderate detuning. The best fidelity achieved via open-loop techniques F ol th À Á is marked in Fig. 2b and is only on the order of 0.6.
Auto-calibration of a single qubit π 2 -rotation A π 2 -rotation is the basic block of generating coherent quantum processes-like quantum metrology and quantum computing. To show the capabilities of our concept, we subsequently optimised the quantum gate which is a typical experimental implementation of a Hadamard gate. Here, S x identifies the spin-1 2 x-operator. In accordance to the previous experiment, we first performed the experiment with no detuning and second, when a detuning of 8.125 MHz (relative detuning Δ Ω ¼ 0:7) was applied. The results are shown in Fig. 3. To quantify the performance of the evaluated microwave pulse with respect to the defined quantum gate G, quantum process tomography was used (for details see Supplementary Material Sections D and E). We observe after 99 evaluations a fidelity of 0.99 ± 0.01 and after 58 evaluations a fidelity of 0.98 ± 0.02 when the static microwave detuning was applied. The initial fidelity of the guess pulse was in both cases about 0.50. Compared to the previous experiment, the time needed for optimal results is about four times longer due to additional measurements, which are necessary for complete process tomography.

DISCUSSIONS
Our experimental results demonstrate that the closed-loop feedback control overcomes static and unknown system errors to achieve the high-fidelity autonomous calibration of single quantum gates that is necessary for future quantum technologies with room temperature solids. Our approach of the closed-loop Fig. 1 Schematics of the experiment. The closed-loop optimisation of electron spin qubit operations interfaced to a nitrogen-vacancy (NV) centre in diamond (nitrogen atom in yellow) a is performed on a homebuilt confocal microscope c. The spin state is initialised and readout optically, and microwave pulses are applied to manipulate the state and can be used to create gates. To start an optimisation process, a guess pulse is applied to the sample through a microwave antenna and the figure of merit is evaluated by state tomography on the spin state. This fidelity estimate is then fed to an DCRAB based algorithm and a new test-pulse is generated. The spin trajectory (blue arrow) corresponding to an optimised pulse is shown on the Bloch sphere b. As sketched, these steps are iteratively repeated until a previously definded fidelity is reached Autonomous calibration of single spin qubit operations F Frank et al. optimisation uses minimal control resources and experimental knowledge that are accessible for users. The total time, required for autonomous calibration, is mainly determined by the duration of quantum tomography measurement and not by the optimisation algorithm. Hence, a significant speed up in the total time of calibration and its fidelity precision may potentially be achieved by employing fast and simplified tomography methods, for instance randomised benchmarking. 30 In addition to the autonomous calibration, our demonstrated closed-loop optimisation features stabilisation mechanism against experimental drifts, for instance due to fluctuations of the magnetic field strength and the resulting frequency detuning. Our procedure presented in this letter is not limited for application to single-qubit operations only. Further experimental implementations towards multi-pulse and multi-qubit gate autonomous calibrations are in principle feasible using our closed-loop optimisation method. Two qubit gates are often experimentally implemented with multiple pulses. In this case, each pulse could be parametrised individually or the overall pulse sequence can be parametrised by a proper basis function choice. The complexity will in general increase due to a more complex quantum process tomography or due to a larger parameter space. But the protocol itself, evaluation of a pulse sequence gate fidelity followed by a systematic pulse sequence update, can readily be extended as the algorithm does not require any a priori system knowledge and is therefore flexible in its use.

METHODS
The two-level quantum system considered in this work is composed of the NV ground spin states m s ¼ 0 j iand m s ¼ À1 j i . Electron spin initialisation and readout are performed on a home built confocal microscopy setup at room temperature. To perform quantum operations on the NV spin with high fidelity, the microwave field source is controlled by an arbitrary waveform generator (AWG, Keysight M8195A), with a timing resolution of 65 GS/s and an amplitude resolution of 8 bit. In combination, we used a 50 W amplifier with a frequency bandwidth of about 4 GHz. The microwave field was created with a copper wire close to the NV. By controlling the amplitude and the phase of the microwave, we are able to rotate the system spin around arbitrary axis on the Bloch sphere. The timedependent control Hamiltonian is given by while the system Hamiltonian in the rotating frame is H 0 ¼ 2πΔŜ z ; wherê S x ,Ŝ y , andŜ z are the spin operator of a two-level system. The functions X(t) and Y(t) define the corresponding microwave pulse, where Ω is the Rabi frequency and Δ is the microwave frequency detuning. In our experiments the following conditions were fulfilled: XðtÞ þ YðtÞ 2 À11 ½ ; Ω 2 010 ½ ðin MHzÞ: The two functions X(t) and Y(t) are optimised simultaneously using the DCRAB algorithm, where both start off from an initial guess (randomly chosen start-simplex). At the core of the algorithm there is the use of superiterations, which are composed again of an iterative update scheme that maps the time dynamics of all control input variables to a parameter variational problem via a suitable basis expansion. A brief introduction along with more general explanations can be found in SI/A. In this work, X (t) and Y(t) were expanded in (sub-) iteration denoted by j of each superiteration denoted by k as XðtÞ Ã;k ¼ a j;k n¼1 sin ω j;k n¼1 t þb j;k n¼1 cos ω j;k n¼1 t þ XðtÞ Ã;kÀ1 ; (4) YðtÞ Ã;k ¼ c j;k n¼1 sin Ω j;k n¼1 t þd j;k n¼1 cos Ω j;k n¼1 t þ YðtÞ Ã;kÀ1 : The two frequencies ω j;k n¼1 2 ½0:54:5 and Ω j;k n¼1 2 ½0:54:5 are randomly chosen at the beginning of each superiteration k and only updated after all the containing j = 1,...,N s (sub-) iterations were proceeded. This is where, in our case, the four coefficients a j;k n¼1 ; b j;k n¼1 ; c j;k n¼1 ; d j;k n¼1 are optimised using a direct search method (here Nelder-Mead, see Supplementary Material Section A). When j = N s and thus a (sub-) iteration terminates, a basis update is done by updating (re-drawing of random numbers) ω j;k n¼1 and Ω j;k n¼1 and hence facilitating further improvement (see also Supplementary Material/ Fig. 2). The subsequent super-iteration (k + 1) search bases on the previous superiteration by calculating X(t)/Y(t) *,k−1 with the optimised (denoted by *) coefficients a Ã;k n¼1 ; b Ã;k n¼1 ; c Ã;k n¼1 ; d Ã;k n¼1 from the previous kth superiteration. The algorithm terminates once the maximum number of superiterations set is reached.

Data availability
The authors declare that the main data supporting the finding of this study are available within the article and its Supplementary Information files. Additional data can be provided upon request.

Code availability
The code that contributed to the results of this study is available on request from the authors. Fig. 3 Optimisation of a single qubit π/2-rotation when the control pulse is applied on resonance with the NV transition a and when a detuning on the order of the Rabi frequency is artificially applied b. For each scenario we show the measured fidelity F cl ex with increasing number of function evaluations and the experimentally obtained process matrix for the real (left) and the imaginary part (right) in case of the highest evaluated fidelity Autonomous calibration of single spin qubit operations F Frank et al.