# Learning robust pulses for generating universal quantum gates

## Abstract

Constructing a set of universal quantum gates is a fundamental task for quantum computation. The existence of noises, disturbances and fluctuations is unavoidable during the process of implementing quantum gates for most practical quantum systems. This paper employs a sampling-based learning method to find robust control pulses for generating a set of universal quantum gates. Numerical results show that the learned robust control fields are insensitive to disturbances, uncertainties and fluctuations during the process of realizing universal quantum gates.

## Introduction

Quantum information technology has witnessed rapid development in the last twenty years1. An important task to implement quantum computation is the realization of quantum gates. It is well known that a suitable set of single-qubit and two-qubit quantum gates can accomplish universal quantum computation. A universal gate set may consist of a quantum phase gate (S gate), a Hadamard gate (H gate), a π/8 gate , and a CNOT gate2. Realizing such a universal gate set is a fundamental objective in quantum computation.

In practical applications, it is inevitable that there exist different uncertainties, inaccuracies and disturbances in external fields, or system Hamiltonians3,4,5,6. Many cases of unknown information and errors, such as imprecise Hamiltonian modeling and inaccurate control pulses, can also be treated as uncertainties. Hence, the requirement of a certain degree of robustness against possible uncertainties and noises has been recognized as one of the key properties for a reliable quantum information processor. Several methods have been developed to enhance robustness and reliability in quantum information processing7,8,9,10,11. Feedback control theory12, including measurement-based feedback and coherent feedback7, has been developed to achieve improved performance of robustness in quantum manipulation problems. From the perspective of experimental implementation, open-loop control is usually more feasible and practical. Dynamical decoupling13,14,15 and noise filtering16 have been developed for enhancing robustness performance in manipulating quantum states or quantum gates. Optimal control methods such as sequential convex programming17 and gradient-based optimal algorithms (e.g., GRAPE18) can also be used to design robust control fields for manipulating quantum systems.

In this paper, we apply a learning-based open-loop control method19 to guide the design of robust control fields for construction of universal quantum gates. In particular, we aim to generate the set of universal quantum gates .The results show that the learning control method can efficiently find optimal control fields and the designed control fields are insensitive to different fluctuations and uncertainties in the process of generating quantum gates. The quantum gates with the designed control fields can have improved robustness and reliability.

## Results

### Optimal control results of one-qubit quantum gates

In this section, we consider optimal control of the one-qubit gates . Denote the Pauli matrices as σ = (σx, σy, σz) and let the free Hamiltonian be H0 = ω0σz, with constant ω0. To construct a one-qubit quantum gate we use the control Hamiltonian of Hc = ωx(t)σx, with time-varying control ωx(t). Now we use the gradient-based learning method (see the Methods section) to construct the quantum gates H, S, and . The index of infidelity (1 minus the fidelity F) is used to characterize the error, and atomic units are adopted. We assume ω0 = 1, ωx(t)  [−5, 5], and the terminal time T = 8. We use piece-wise constant pulses to approximate the learned control field. We divide the time T into 200 intervals, where a constant pulse is used within each interval. The initial control field is set as ωx(t) = sin t and the step-size is set as 0.5.

As shown in Fig. 1, the H, S and quantum gates can achieve a precision (fidelity) of around 1–10−15, after 70 iterations. The algorithm quickly converges and we can easily find optimal control pulses to generate the H, S and gates. We further consider the relationship between the infidelity and the terminal time T. For example, the relationship of the infidelity (here we use the logarithm of , i.e., or ) versus time T for the H gate is shown in Fig. 2. If we fix a bound on the control amplitude, the algorithm cannot achieve good performance if the time T is too short, because it may not guarantee the controllability within T. For a smaller bound on the control amplitude, we may need a longer terminal time T to achieve the required fidelity.

### Robust control results of one-qubit quantum gates

Considering the existence of uncertainties, we assume that the Hamiltonian can be described as

For simplicity, we assume and , and both uncertain parameters and have uniform distributions with the same bound on the uncertainties E = 0.2 (i.e., 40% fluctuations, and ). Using the SLC method19 (see the Methods section), an augmented system is constructed by selecting N0 = 5 values for , and N1 = 5 values for . The samples are selected as . Figure 3 shows the results for three classes of quantum gates: S, H and , respectively. After 100,000 iterations, the precision reaches 0.9979 for the H gate, 0.9976 for the S gate, and 0.9991 for the gate, respectively. The corresponding control fields are shown in Fig. 3(b,d,f). Then the learned fields are applied to 2000 additional samples that are generated randomly by selecting values of the uncertainty parameters according to a uniform distribution. The average fidelity reaches 0.9976 for the H gate, 0.9973 for the S gate, and 0.9989 for the gate, respectively.

In the laboratory, it may be easier for some quantum systems to generate discrete control pulses with constant amplitudes. Here, we consider the performance using different numbers of control pulses to approximate the fields. For the S gate, the relationship of the number of pulses versus the average fidelity is shown in Fig. 4. From Fig. 4, it is clear that excellent performance can be achieved even if we only use 20~40 control pulses to realize the approximation of the continuous control fields. Hence, we use 40 pulses to implement the control field in the following numerical calculations.

We further consider the effect of the uncertainty bounds on the robustness performance. Figure 5 shows the performance of the system when the parameter fluctuations have different bounds for the S gate. Here, we assume E0 = E1 = E and N0 = N1 = 5. Although the performance decreases when the bounds on the fluctuations increase, the control fields still can drive the system to the target gate with a high average fidelity of above 0.9950, even with 60% fluctuations (E = 0.3). It is clear that the bounds on the fluctuations cannot be too large if we expect to achieve a very high fidelity (e.g., 0.999). For a given fluctuation bound, it is possible to further enhance the performance by using more pulses and employing more samples in the training step.

### Open dissipative systems for one-qubit quantum gates

Many quantum systems can be used to realize quantum gates. In particular, superconducting quantum systems20,21,22,23,24,25,26,27,28 are one of the most promising systems for the implementation of quantum computation due to their advantages, such as design flexibility, tunability and scalability. For superconducting quantum circuits, it is convenient to control the systems by adjusting external parameters such as voltages, currents, and microwave photons, and it is also possible to turn on and off the coupling between two qubits at will29,30. In practical applications, the existence of fluctuations (e.g., fluctuations in magnetic and electric fields), inaccuracies (e.g., inaccurate operation in the coupling between qubits), and decoherence, may degrade the performance of reliability and robustness in quantum computation31. In ref. 32, the robustness problem for steering quantum states in superconducting quantum circuits has been investigated using the SLC method. Here, we apply the SLC method19,32 to design control fields that are robust against different inaccuracies and fluctuations for implementing quantum gates. Now, we consider a flux qubit subject to decoherence to generate the S, H, and quantum gates. We assume that the dynamics of the flux qubit can be described as

where

Here, Γ1 and Γφ are the relaxation rate and dephasing rate of the system, respectively. Considering the experiment described in ref. 31, we choose Γ1 = 105 s−1 and Γφ = 106 s−1. Let T = 5 ns and assume that the control Hamiltonian is described as

We assume that there exist fluctuations (with the fluctuation bound 0.2) in the relaxation rate and dephasing rate. Using the OPEN GRAPE algorithm33 (see the Methods section), we can learn robust control fields for generating the three classes of quantum gates. The results are shown in Fig. 6. After 80 iterations, the fidelity of all three gates reaches 0.9948 using 40 control pulses for each class of quantum gates.

### Quantum CNOT gate

In this section, we consider the problem of finding robust control pulses for generating quantum CNOT gates. In particular, we consider the example based on the two coupled superconducting phase qubits in ref. 34, which has also been discussed for the robust control of quantum states in ref. 32. Each phase qubit is a nonlinear resonator built from an Al/AlOx/Al Josephson junction, and two qubits are coupled via a modular four-terminal device (for details, see Fig. 1 in ref. 34). We assume that the Hamiltonian has the following form (due to possible fluctuations and uncertainties):

with (j = 1, 2, 3). Here, we assume that the frequencies ω1(t), ω2(t)  [−5, 5] GHz can be adjusted by changing the bias currents of the two phase qubits, and Ωc(t)  [−500, 500] MHz can be adjusted by changing the bias current in the coupler. Let ω3 = ω4 = 2 GHz, the operation time T = 20 ns is divided into 40 smaller time intervals, and the step-size is 0.1. The initial control fields are ω1(t) = ω2(t) = sin t GHz, Ωc(t) = 0.05 sin t GHz. Without fluctuations (i.e., ), the fidelity of the CNOT gate can reach 1–10−15 after 550 iterations, as shown in Fig. 7. When the uncertainty bounds are 0.2, the results are shown in Fig. 8. In the training step, the precision of the CNOT gate can reach 0.9965. Then the average fidelity of 0.9961 can be reached for 2000 additional samples in the testing step.

## Discussion

In conclusion, we applied a learning-based open-loop method to find robust control fields for constructing a set of universal quantum gates. All of the quantum gates we considered show good robustness and the method used is easy to implement. Although a uniform distribution is used for the uncertainty parameters, the method is also applicable to other distributions (e.g., a Gaussian distribution). Several specific examples have been considered in this paper, while the method can be applied to other systems for constructing any quantum gates35. Also, it is straightforward to extend the method to achieving robust control tasks for general quantum operations. In practical applications, one may need to determine the fluctuation bounds from prior information or by employing a parameter-identification method. The learned control fields would work well as long as the noise is within the fluctuation bounds. If the noise becomes large enough to be out of the bounds, it is necessary to re-train the control fields. During practical implementation for specific systems, some constraints (e.g., laser energy, positive control magnitude) may need to be considered. For such situations, we may combine the SLC method with optimal control algorithms under multiple constraints36 to achieve good performance.

## Methods

### Gradient-based learning for quantum optimal control

We first consider the unitary dynamics. The evolution of a quantum gate U(t) satisfies

Now the objective is to design the Hamiltonian H(t) to robustly steer the unitary U(t) from U(0) = I to the desired target , with high fidelity. The fidelity is defined as:

where q (q = 1 or 2 in this paper) is the number of qubits involved in the quantum gate and .

Gradient-based optimization algorithms have proven to be one of the most efficient methods to solve optimization problems in quantum control. By applying a gradient-based optimization algorithm, we now consider the problem of generating a high-fidelity quantum gate in a given time T. Assume that the Hamiltonian has the following form

where H0 is the free Hamiltonian, Hm(m = 1, 2, … M) are related to the control Hamiltonian with the corresponding control pulses .

The performance function of the transfer process can be defined as

In practical applications, considering the possible existence of an arbitrary global phase factor e, we minimize

which is equivalent to maximize . In order to eliminate the influence of the global phase factor, we maximize the performance function

Let Uj denote the unitary transformation when the jth pulse uj is applied. We can decompose U(T) as U(T) = UNU1. With operators Aj and Bj being defined as and , we have the following relationship

The gradient Φ/∂um(j) to the first order in Δt is given by

The optimal control field can be searched by following the gradient.

### Open GRAPE

For an open dissipative system, its dynamics can be described by a master equation. We will use an OPEN GRAPE algorithm to calculate the gradient (see refs 33, 37, 38, 39). We assume that the state of the system is described by a master equation

with the Hamiltonian superoperator , and the decoherence superoperator Λ(u(t)). The solution to the master equation is a linear map, according to . Hence, follows the operator equation

with . The objective is to find a control field u(t) to maximize the fidelity with a given final time T

The gradient of can be calculated using the method in ref. 37 and the control field can be updated using the gradient.

### Sampling-based learning control for robust design

The sampling-based learning control (SLC) method19 involves two steps of training and testing. In the training step, we select N samples to train the control fields. These samples are selected according to the distribution of uncertain parameters (e.g., uniform distribution). For example,

when

an augmented system can be constructed as follows

where the Hamiltonian of the nth sample , with n = 1, 2, …, N. The performance function of the augmented system is defined as FN(u)

The task of the training step is to find an optimal control u* which maximizes the performance function above. The representative samples for these uncertain parameters can be selected according to the method in ref. 32. In the testing step, we apply the control field u* we obtained in the training step to a large number of other additional samples, which are randomly selected according to the uncertainty parameters. If the average fidelity of all the tested samples is satisfactory, we accept the designed control, which means the quantum gate we constructed is robust. In this paper, we use 2000 additional samples to test our designed control in this step. When the quantum system under consideration is an open system, uncertainties can exist in the decoherence parameters. For these uncertainty parameters, we can use a similar method for sampling these parameters to find robust control pulses.

How to cite this article: Dong, D. et al. Learning robust pulses for generating universal quantum gates. Sci. Rep. 6, 36090; doi: 10.1038/srep36090 (2016).

Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## References

1. Buluta, I., Ashhab, S. & Nori, F. Natural and artificial atoms for quantum computation. Reports on Progress in Physics 74, 104401 (2011).

2. Nielsen, M. A. & Chuang, I. L. Quantum Computation and Quantum Information (Cambridge University Press, Cambridge, England, 2010).

3. Pravia, M. A. et al. Robust control of quantum information. J. Chem. Phys. 119, 9993–10001 (2003)

4. Carignan-Dugas, A., Wallman, J. J. & Emerson, J. Characterizing universal gate sets via dihedral benchmarking. Phys. Rev. A 92, 060302 (2015).

5. Wu, R. B. et al. Spectral analysis and identification of noises in quantum systems. Phys. Rev. A 87, 022324 (2013).

6. Dong D. & Petersen, I. R. Sliding mode control of quantum systems. New J. Phys. 11, 105033 (2009).

7. James, M. R., Nurdin, H. I. & Petersen, I. R. H control of linear quantum stochastic systems. IEEE Trans. Automat. Control 53, 1787–1803 (2008).

8. Qi, B. A two-step strategy for stabilizing control of quantum systems with uncertainties. Automatica 49, 834–839 (2013).

9. Brif, C., Chakrabarti, R. & Rabitz, H. Control of quantum phenomena: past, present and future. New J. Phys. 12, 075008 (2010).

10. Theis, L. S., Motzoi, F. & Wilhelm, F. K. Simultaneous gates in frequency-crowded multilevel systems using fast, robust, analytic control shapes. Phys. Rev. A 93, 012324 (2016).

11. Kimmel, S., Low, G. H. & Yoder, T. J. Robust calibration of a universal single-qubit gate set via robust phase estimation. Phys. Rev. A 92, 062315 (2015).

12. Wiseman H. M. & Milburn, G. J. Quantum Measurement and Control (Cambridge University Press, Cambridge, England, 2010).

13. Viola, L., Knill, E. & Lloyd, S. Dynamical decoupling of open quantum systems. Phys. Rev. Lett. 82, 2417–2421 (1999).

14. Khodjasteh, K., Lidar, D. A. & Viola, L. Arbitrarily accurate dynamical control in open quantum systems. Phys. Rev. Lett. 104, 090501 (2010).

15. Bermudez, A., Schmidt, P. O., Plenio, M. B. & Retzker, A. Robust trapped-ion quantum logic gates by continuous dynamical decoupling. Phys. Rev. A 85, 040302 (2012).

16. Soare A. et al. Experimental noise filtering by quantum control. Nat. Phys. 10, 825–829 (2014).

17. Kosut, R. L., Grace, M. D. & Brif, C. Robust control of quantum gates via sequential convex programming. Phys. Rev. A 88, 052326 (2013).

18. Skinner, T. E., Reiss, T. O., Luy, B., Khaneja, N. & Glaser, S. J. Application of optimal control theory to the design of broadband excitation pulses for high-resolution NMR. J. Magn. Reson. 163, 8–15 (2003).

19. Chen, C., Dong, D., Long, R., Petersen, I. R. & Rabitz, H. Sampling-based learning control of inhomogeneous quantum ensembles. Phys. Rev. A 89, 023402 (2014).

20. You, J. Q. & Nori, F. Atomic physics and quantum optics using superconducting circuits. Nature 474, 589–597 (2011).

21. Xiang, Z. L., Ashhab, S., You, J. Q. & Nori, F. Hybrid quantum circuits: Superconducting circuits interacting with other quantum systems. Rev. Mod. Phys. 85, 623–653 (2013).

22. Steffen, M., Kumar, S., DiVincenzo, D. P., Rozen, J. R., Keefe, G. A., Rothwell, M. B. & Ketchen, M. B. High-coherence hybrid superconducting qubit. Phys. Rev. Lett. 105, 100502 (2010).

23. You, J. Q., Hu, X., Ashhab, S. & Nori, F. Low-decoherence flux qubit. Phys. Rev. B 75, 140515 (2007).

24. Yan, F. et al. The flux qubit revisited. quant-ph, arXiv:1508.06299 (2016).

25. Lü, X. Y., Ashhab, S., Cui, W., Wu, R. & Nori, F. Two-qubit gate operations in superconducting circuits with strong coupling and weak anharmonicity. New J. Phys. 14, 073041 (2012).

26. Barends, R., Kelly, J., Megrant, A., Veitia, A., Sank, D., Jeffrey, E. et al. Superconducting quantum circuits at the surface code threshold for fault tolerance. Nature 508, 500–503 (2014).

27. Chen, Z., Kelly, J., Quintana, C., Barends, R., Campbell, B., Chen, Y. et al. Measuring and suppressing quantum state leakage in a superconducting qubit. Phys. Rev. Lett. 116, 020501 (2016).

28. Friis, N., Melnikov, A. A., Kirchmair, G. & Briegel, H. J. Coherent controlization using superconducting qubits. Sci. Rep. 5, 18036 (2015).

29. Clarke, J. & Wilhelm, F. K. Superconducting quantum bits. Nature 453, 1031–1042 (2008).

30. You, J. Q. & Nori, F. Superconducting circuits and quantum information. Physics Today 58, 42–47 (2005).

31. Bylander, J., Gustavsson, S., Yan, F., Yoshihara, F., Harrabi, K., Fitch, G. et al. Noise spectroscopy through dynamical decoupling with a superconducting flux qubit. Nat. Phys. 7, 565–570 (2011).

32. Dong, D., Chen, C., Qi, B., Petersen, I. R. & Nori, F. Robust manipulation of superconducting qubits in the presence of fluctuations. Sci. Rep. 5, 7873 (2015).

33. Schulte-Herbrüggen, T., Spörl, A., Khaneja, N. & Glaser, S. J. Optimal control for generating quantum gates in open dissipative systems. J. Phys. B: At. Mol. Opt. Phys. 44, 154013 (2009).

34. Bialczak, R. C. et al. Fast tunable coupler for superconducting qubits. Phys. Rev. Lett. 106, 060501 (2011).

35. Ashhab, S., de Groot, P. C. & Nori, F. Speed limits for quantum gates in multiqubit systems. Phys. Rev. A 85, 052327 (2012).

36. Shu, C.-C., Ho, T.-S., Xing, X. & Rabitz, H. Frequency domain quantum optimal control under multiple constraints. Phys. Rev. A 93, 033417 (2016).

37. Rebentrost, P., Serban, I., Schulte-Herbrüggen, T. & Wilhelm, F. K. Optimal control of a qubit coupled to a non-Markovian environment. Phys. Rev. Lett. 102, 090401 (2009).

38. Hwang, B. & Goan, H.-S. Optimal control for non-Marknovian open quantum systems. Phys. Rev. A 85, 032321 (2012).

39. Huang, S.-Y. & Goan, H.-S. Optimal control for fast and high-fidelity quantum gates in coupled superconducting flux qubits. Phys. Rev. A 90, 012318 (2014).

## Acknowledgements

This work was supported by the Australian Research Council (DP130101658, FL110100020) and was supported in part by the National Natural Science Foundation of China (Nos 61273327 and 61374092). F.N. was supported by a grant from the John Templeton Foundation, the RIKEN iTHES Project, MURI Center for Dynamic Magneto-Optics, CREST, and a Grant-in-Aid for Scientific Research (A).

## Author information

Authors

### Contributions

D.D., C.C., B.Q. and I.R.P. developed the scheme of robust sampling-based learning control for quantum gates, D.D. and F.N. designed the illustrative examples. C.W. performed the numerical simulations under the supervision of C.C. All authors discussed the results and contributed to the writing of the paper.

## Ethics declarations

### Competing interests

The authors declare no competing financial interests.

## Rights and permissions

Reprints and Permissions

Dong, D., Wu, C., Chen, C. et al. Learning robust pulses for generating universal quantum gates. Sci Rep 6, 36090 (2016). https://doi.org/10.1038/srep36090

• Accepted:

• Published: