Approximate quantum gates compiling with self-navigation algorithm
Abstract
The compiling of quantum gates is crucial for the successful quantum algorithm implementations. The environmental noise as well as the bandwidth of control pulses pose a challenge to precise and fast qubit control, especially in a weakly anharmonic system. In this work, we propose an algorithm to approximately compile single-qubit gates with arbitrary accuracy. Evaluation results show that the overall rotation distance generated by our algorithm is significantly shorter than the commonly used gate, then the gate time can be effectively shortened. The requisite number of pulses and the runtime of scheme design scale up as with very small prefactors, indicating low overhead costs. Moreover, we explore the trade-off between effectiveness and cost, and find a balance point. In short, our work opens a new avenue for efficient quantum algorithm implementations with contemporary quantum technology.
I Introduction
Owing to the intrinsic properties afforded by quantum mechanics, the quantum algorithms permit superpolynomial or even exponential speedups relative to their classical counterparts in solving some important problems as the input size scales up [1, 2, 3]. The global race to build quantum computing prototypes is in full swing now, which is evident by several impressive demonstrations of this quantum computational advantage successively during the past few years [4, 5, 6, 7, 8, 9]. The full power of quantum computation is supposed to be based on the universal quantum computer with large scale and error corrected logical qubits, such as the surface code [10].
Nevertheless, before the extravagant hardware resources for quantum error corrected technology within reach, it would take years or even decades in the noisy intermediate-scale quantum (NISQ) era [11], in which the actual qubits are not immune to noises and the size of quantum processor could be faithfully controlled is also relatively limited. The various sources of noise will impose deleterious impact to the delicate qubits, then the quantum device fails to produce results with sufficient fidelity [12]. Normally the effects of these noises become worse over time [13].
To achieve an improved performance in NISQ device, except for the effort to eliminate the sources of noise and the endeavor to advance qubit with reduced noise susceptibility, the optimal control search is also an active topic [14, 15]. In particular, the emergence of circuit-approximation schemes has attracted a lot of attention. These schemes do not aim to faithfully execute a given algorithm circuit, but explore an approximated version with fewer gates and shorter circuit depth, such as in Refs. [13, 16]. These works prove that the approximate circuits could be possible to outperform the theoretically ideal but deeper circuits on contemporary devices.
However, with too much attention being paid to the circuits optimization, the approximation to arbitrary unitary gate has been neglected, which may bring new surprises for further improvement. This provide a promising approach for exploiting the potential of NISQ devices, especially in the control over qubit made from a weakly anharmonic oscillator, where the unwanted leakage transitions to higher states pose another threat to the implementation of fast and precise quantum gate. For example, in transmon-type qubit carried by superconducting circuits, spectroscopically, the non-zero overlaps between the drive and the leakage transition frequencies arising from finite pulse duration will drive the qubit out of the Hilbert subspace spanned by the and . The scheme of derivative reduction by adiabatic gate (DRAG) [17, 18] is proposed as a typically approach to reduce this population leakage by modifying the quadrature amplitudes of the microwave drive. While, in practice, the crucial optimal value of the scaling parameter in DRAG is sensitive to the pulse distortions and has to be identified and calibrated repeatedly in the experiments [19, 20].
Considering the spectral content of the leakage frequency decays exponentially with respect to the pulse duration, a naturally alternative to the DRAG for the prevention of the leakage is using a slower operation with more gentle control pulses, resulting in the control bandwidth being much less than the anharmonicity. Generally speaking, this strategy will extend gate execution time and hence limit the reliable circuit depth due to the given decoherence time. While, if the unitary transform is compiled cute enough, it is possible to reduce the overall gate time by finding a short path to compensate the extended time spent in unit rotation distance. In this paper, we provide a feasible route, namely the self-navigation () algorithm, to access the approximated gate compiling. We show that any accuracy can be obtained relative to the desired precise gate, and the overall distance of the rotation route is shorter than the commonly used today, such as the gate [21, 22, 23]. The algorithm delivers the number of elementary-rotations and the run time both in . This is a significant enhancement compared to the polylogarithmic in Solovay-Kitaev algorithm [24], which outputs a sequence of elementary-rotations and runs in time with the specified accuracy to the target gate.
II Model
The transmon qubit [25] is one of the most common qubit modalities formed by weakly anharmonic oscillators, whose effective Hamiltonian in the rotating frame reads [12, 26]
(1) |
where denotes the qubit detuning from the frame frequency. When the qubit resonates with the frame, i.e., , the rotation around the axis in the -plane can be realized by adding microwave drive to the qubit for a certain amount of time. The corresponding Hamiltonian under the rotating wave approximation reads
(2) |
where refers to the drive amplitude, and is the Pauli matrice. The phase of the microwave determines the rotation axis. For simplicity, we set and take as the time-scale throughout.
The shift of the qubit frequency in Eq. (1) leads to a rotation rate around the -axis and can be tailored by modulating the flux bias of the SQUID (superconducting quantum interference device) [27]. However, this is not necessary in the experiments and can be accessed alternatively by leveraging the so-called “virtual gate” technique [21]. This technique can be done by simply applying a specific phase offset to the microwave signals for subsequent rotation about axis in the - plane. For example,
(3) |
(4) |
Note that they leave an extra which does not change the outcome of measurement along . The implemented virtual gate is “perfect”, because it requires no additional control pulse and therefore taking zero-time and having unity gate fidelity nominally. By leveraging the virtual gate technology, one could effectively reduce the number of overall pulses for the implementation of a quantum gate.
A generic single-qubit gate (ignoring the overall phase) can be realized by three successive rotations around the - and -axes. These are both native operation in superconducting circuits model [21, 28, 23]
(5) |
where , and represent Euler angles. Combined with the identity,
(6) |
Eq. (5) can be reexpressed as
(7) |
The above is the so-called gate technology, a commonly used strategy to compile single-qubit logical operations in the experiments [23, 22]. As mentioned above, the rotations around -axis can be included into the microwaves used for the as an additional phase. That is to say, the requisite total time is always that used to implement two pulse. Can we find a short rotation path, thereby reduce the gate time and suppress the debilitating decoherence effects over time? In this paper, by using the algorithm a shorter rotation distance has been obtained compared to the gate.
III The algorithm
Arbitrary single-qubit gate can be represented by a rotation around a particular axis with a certain angle ,
(8) |
We firstly consider the rotations around a fixed axis . Assume the target rotation angle is and the current angle is . Here the pulse amplitude and duration are included into the rotation angle. To determine the appropriate next rotation angle, we define the fidelity between the two unitaries using the Hilbert-Schmidt distance [29, 30]
(9) |
Here . Apparently, we can get the following relation
(10) |
Then we can obtain the required subsequent rotation angle via the current fidelity in the coaxial case.

However, the presumed rotations around the axis in Eq. (8) may not be experimentally accessible in the underlying platform. Our strategy for this problem is to substitute an experimentally permitted approximate axis for this theoretical one, where the approximation behaves with the best fidelity among rotations about all possible axes with the same angle . Then with the corresponding unitary obtained, a new rotation angle and approximate axis can be performed again in the same way, until the gate error is smaller than a desired target value . All of these approximate rotation operations eventually form a sequence in order. Then the adjacent and commutable rotations in the sequence can be merged together to reduce the redundant pulses. At last, the rotations are absorbed into the subsequent - operations by taking advantage of the virtual technology. The workflow of this algorithm is shown in Fig. 1. We point out that the appropriate rotation axes and angles can be determined by this algorithm, then arbitrary single-qubit unitary operator is compiled dynamically and automatically. We call it the self-navigation () algorithm.




To evaluate our algorithm, as an example we explore its performance in the context of superconducting transmon. We exemplarily take -axes and several axes located in the -plane as the approximate rotation axes. All these axes are accessible on the platform. And they can be parameterized by modifying the phase offset in Eq. (2). As we can take any rotation around the and axes in -plane as the approximate operations by use of Eqs. (1) and (2), we study the performance of the algorithm with different number of allowed rotation axes. Specifically, we take , , or as an example. In each case, the axes which is distributed uniformly on the -plane and the axes are embraced. The axes are characterized by the phase offset in Eq. (2). Then the rotation axes and will always exist. It is easy to see that the algorithm can easily compile typical single-rotation gates around these axes, i.e., , and . The evaluation dataset consisting of 128 single-qubit target gates is formed by two successive rotations around the - and -axes with and angles respectively. and . 8 and 16 angles are uniformly sampled from their respective domains.
In Fig. 2 (a)-(d), we plot the average actual accuracies , overall rotation distances , numbers of pulses , and runtime as functions of the desired target accuracy for different allowed axes. The evaluations are all obtained by our algorithm. The dashed line indicates the threshold in Fig. 2 (a). Obviously, Fig. 2 (a) shows that any given approximate accuracy can be achieved when the algorithm terminates for all cases. From Fig. 2 (b) we can easily conclude that varies with different and tends to converge to certain values as decreases, e.g., 2.2 for . This value is significantly smaller than the fixed obtained by the gates [23, 22, 21]. In addition, we find that the performance of the algorithm is enhanced with increasing , and this trend gradually weakens and disappears when . Thus it is enough to use 18 allowed axes in this compiling task, and more axes yield only negligible returns. Fig. 2 (c) clearly shows that scales up with as decreases. In addition, as expected the more allowed axes can be performed, the less pulses is required. Notably, is sufficient for the implementation. The efficiency is also an important metric to evaluate an algorithm. Fig. 2 (d) shows that more axes will result in longer average runtime . roughly scales up with with very small prefactors (about ) as decreases for all cases. In short, comparing the polylogarithmic () overhead cost with Solovay-Kitaev algorithm [24], our algorithm can approximate arbitrary single-qubit gate to any accuracy with logarithmic cost both in terms of the required pulse number and the total design time.
Given the limitations of quantum computing hardware presently accessible, we simulate quantum computing on a classical computer and generate the corresponding data. Our algorithms are implemented with PYTHON 3.7.9 and run on a computer with four-core 1.80 GHz CPU and 8 GB memory. The source code and detailed data supporting this work can be found in Ref. [31].
IV Conclusions and discussions
In practical quantum computing, the physical qubits will inevitalbly suffer from external noises, causing the population leakage and limiting the coherence time. One strategy to protect the qubit is utilizing gentle pulses, whose spectrum components on leakage are highly suppressed. Simultaneously, the gate time is shortened by taking a short rotation path. The approximate quantum gate compiling is a promising approach to get a better performance with contemporary NISQ device. In this work, we propose a algorithm to approximately compile arbitrary single-qubit gate with rotations all natively available in the experiments. The evaluation results show that the overall rotation distance generated by our algorithm is significantly shorter than the commonly used gate. In addtion, any accuracy to the target gate can be achieved by our algorithm at the expense of the increasement of the pulse number and design time of the scheme. Combined with the virtual Z gate technology, we find that both the two above values are modest and only logarithmic in with very small prefactors, denoting low overhead costs. We also show that, with 18 allowed rotation axes, the algorithm is “just enough” to balance the gate performance and the control cost. We emphasize that although our discussions focus mainly on the superconducting transmon qubit, the techniques introduced here can be applicable to a wide array of physical systems.
We only consider the single qubit gate compiling in this paper. We expect our work could promote the further research of multi-qubit gates. For example, in error correction coding of taking the factoring a large number into its primes, a faster gate operation offered by the shortened control path means smaller qubit overhead. This demanded to generate and purify the special ancilla states which are used to construct the Toffoli gate. In addition, due to the highly sensitivity to the error rate in physical qubits, the improved quantum control over the physical qubit will further significantly reduce the size of the circuit.
Acknowlegment
This work was supported by the Natural Science Foundation of Shandong Province (Grant No. ZR2021LLZ004), and the Natural Science Foundation of China (Grant No. 11475160). RHH would also like to thank Sheng-Bin Wang, Zhi-Min Wang, and Guo-Long Cui for fruitful discussions.
References
- Nielsen and Chuang [2010] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information 10th Anniversary Edition (Cambridge University Press, 2010).
- Bishnoi [2021] B. Bishnoi, Quantum computation (2021), arXiv:2006.02799 [quant-ph] .
- Preskill [2012] J. Preskill, Quantum computing and the entanglement frontier, arXiv preprint arXiv:1203.5813 (2012).
- Arute et al. [2019] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F. G. Brandao, D. A. Buell, et al., Quantum supremacy using a programmable superconducting processor, Nature 574, 505 (2019).
- Gong et al. [2021] M. Gong, S. Wang, C. Zha, M.-C. Chen, H.-L. Huang, Y. Wu, Q. Zhu, Y. Zhao, S. Li, S. Guo, et al., Quantum walks on a programmable two-dimensional 62-qubit superconducting processor, Science 372, 948 (2021).
- Zhong et al. [2020] H.-S. Zhong, H. Wang, Y.-H. Deng, M.-C. Chen, L.-C. Peng, Y.-H. Luo, J. Qin, D. Wu, X. Ding, Y. Hu, and et al., Quantum computational advantage using photons, Science 370, 1460–1463 (2020).
- Wu et al. [2021] Y. Wu, W.-S. Bao, S. Cao, F. Chen, M.-C. Chen, X. Chen, T.-H. Chung, H. Deng, Y. Du, D. Fan, M. Gong, C. Guo, C. Guo, S. Guo, L. Han, L. Hong, H.-L. Huang, Y.-H. Huo, L. Li, N. Li, S. Li, Y. Li, F. Liang, C. Lin, J. Lin, H. Qian, D. Qiao, H. Rong, H. Su, L. Sun, L. Wang, S. Wang, D. Wu, Y. Xu, K. Yan, W. Yang, Y. Yang, Y. Ye, J. Yin, C. Ying, J. Yu, C. Zha, C. Zhang, H. Zhang, K. Zhang, Y. Zhang, H. Zhao, Y. Zhao, L. Zhou, Q. Zhu, C.-Y. Lu, C.-Z. Peng, X. Zhu, and J.-W. Pan, Strong quantum computational advantage using a superconducting quantum processor, Phys. Rev. Lett. 127, 180501 (2021).
- Zhong et al. [2021] H.-S. Zhong, Y.-H. Deng, J. Qin, H. Wang, M.-C. Chen, L.-C. Peng, Y.-H. Luo, D. Wu, S.-Q. Gong, H. Su, and et al., Phase-programmable gaussian boson sampling using stimulated squeezed light, Physical Review Letters 127, 10.1103/physrevlett.127.180502 (2021).
- Zhu et al. [2022] Q. Zhu, S. Cao, F. Chen, M.-C. Chen, X. Chen, T.-H. Chung, H. Deng, Y. Du, D. Fan, M. Gong, C. Guo, C. Guo, S. Guo, L. Han, L. Hong, H.-L. Huang, Y.-H. Huo, L. Li, N. Li, S. Li, Y. Li, F. Liang, C. Lin, J. Lin, H. Qian, D. Qiao, H. Rong, H. Su, L. Sun, L. Wang, S. Wang, D. Wu, Y. Wu, Y. Xu, K. Yan, W. Yang, Y. Yang, Y. Ye, J. Yin, C. Ying, J. Yu, C. Zha, C. Zhang, H. Zhang, K. Zhang, Y. Zhang, H. Zhao, Y. Zhao, L. Zhou, C.-Y. Lu, C.-Z. Peng, X. Zhu, and J.-W. Pan, Quantum computational advantage via 60-qubit 24-cycle random circuit sampling, Science Bulletin 67, 240 (2022).
- Fowler et al. [2012] A. G. Fowler, M. Mariantoni, J. M. Martinis, and A. N. Cleland, Surface codes: Towards practical large-scale quantum computation, Phys. Rev. A 86, 032324 (2012).
- Preskill [2018] J. Preskill, Quantum computing in the nisq era and beyond, Quantum 2, 79 (2018).
- Krantz et al. [2019] P. Krantz, M. Kjaergaard, F. Yan, T. P. Orlando, S. Gustavsson, and W. D. Oliver, A quantum engineer’s guide to superconducting qubits, Applied Physics Reviews 6, 021318 (2019).
- Wilson et al. [2021] E. Wilson, F. Mueller, L. Bassman, and C. Iancu, Empirical evaluation of circuit approximations on noisy quantum devices, in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, SC ’21 (Association for Computing Machinery, New York, NY, USA, 2021).
- He et al. [2021a] R.-H. He, H.-D. Liu, S.-B. Wang, J. Wu, S.-S. Nie, and Z.-M. Wang, Universal quantum state preparation via revised greedy algorithm, Quantum Science and Technology 6, 045021 (2021a).
- He et al. [2021b] R.-H. He, R. Wang, J. Wu, S.-S. Nie, J.-H. Zhang, and Z.-M. Wang, Deep reinforcement learning for universal quantum state preparation via dynamic pulse control (2021b).
- [16] E. Younis, Bqskit-qfactor, https://github.com/bqskit/qfactor .
- Motzoi et al. [2009] F. Motzoi, J. M. Gambetta, P. Rebentrost, and F. K. Wilhelm, Simple pulses for elimination of leakage in weakly nonlinear qubits, Phys. Rev. Lett. 103, 110501 (2009).
- Gambetta et al. [2011] J. M. Gambetta, F. Motzoi, S. T. Merkel, and F. K. Wilhelm, Analytic control methods for high-fidelity unitary operations in a weakly nonlinear oscillator, Phys. Rev. A 83, 012308 (2011).
- De [2015] A. De, Fast quantum control for weakly nonlinear qubits: On two-quadrature adiabatic gates, arXiv preprint arXiv:1509.07905 (2015).
- Motzoi and Wilhelm [2013] F. Motzoi and F. K. Wilhelm, Improving frequency selection of driven pulses using derivative-based transition suppression, Phys. Rev. A 88, 062318 (2013).
- McKay et al. [2017] D. C. McKay, C. J. Wood, S. Sheldon, J. M. Chow, and J. M. Gambetta, Efficient gates for quantum computing, Phys. Rev. A 96, 022330 (2017).
- [22] M. Quantum, Mind quantum api: U3 gate, https://www.mindspore.cn/mindquantum/api .
- [23] Qiskit, Ibm quantum experience glossaries: U gate, https://qiskit.org/documentation .
- Dawson and Nielsen [2005] C. M. Dawson and M. A. Nielsen, The solovay-kitaev algorithm, arXiv preprint quant-ph/0505030 (2005).
- Koch et al. [2007] J. Koch, T. M. Yu, J. Gambetta, A. A. Houck, D. I. Schuster, J. Majer, A. Blais, M. H. Devoret, S. M. Girvin, and R. J. Schoelkopf, Charge-insensitive qubit design derived from the cooper pair box, Phys. Rev. A 76, 042319 (2007).
- Huang et al. [2020] H.-L. Huang, D. Wu, D. Fan, and X. Zhu, Superconducting quantum computing: a review, Science China Information Sciences 63, 1 (2020).
- Tinkham and Emery [1996] M. Tinkham and V. Emery, Introduction to superconductivity, Physics Today 49, 74 (1996).
- Adedoyin et al. [2018] A. Adedoyin, J. Ambrosiano, P. Anisimov, A. Bärtschi, W. Casper, G. Chennupati, C. Coffrin, H. Djidjev, D. Gunter, S. Karra, et al., Quantum algorithm implementations for beginners, arXiv preprint arXiv:1804.03719 (2018).
- Gilchrist et al. [2005] A. Gilchrist, N. K. Langford, and M. A. Nielsen, Distance measures to compare real and ideal quantum processes, Physical Review A 71, 062310 (2005).
- An and Zhou [2019] Z. An and D. L. Zhou, Deep reinforcement learning for quantum gate control, EPL (Europhysics Letters) 126, 60002 (2019).
- [31] R.-H. He, The source code and detailed data supporting this work, Gitee https://gitee.com/herunhong/GC-via-SN-algorithm.