Abstract
Quantum error correcting circuitry is both a resource for correcting errors and a source for generating errors. A balance has to be struck between these two aspects. Perfect quantum gates do not exist in nature. Therefore, it is important to investigate how flaws in the quantum hardware affect quantum computing performance. We do this in two steps. First, in the presence of realistic, faulty quantum hardware, we establish how quantum error correction circuitry achieves reduction in the extent of quantum information corruption. Then, we investigate faulttolerant gate sequence techniques that result in an approximate phase rotation gate, and establish the existence of an optimal length \(L_{\text {opt}}\) of the length L of the decomposition sequence. The existence of \(L_{\text {opt}}\) is due to the competition between the increase in gate accuracy with increasing L, but the decrease in gate performance due to the diffusive proliferation of gate errors due to faulty basis gates. We present an analytical formula for the gate fidelity as a function of L that is in satisfactory agreement with the results of our simulations and allows the determination of \(L_{\text {opt}}\) via the solution of a transcendental equation. Our result is universally applicable since gate sequence approximations also play an important role, e.g., in atomic and molecular physics and in nuclear magnetic resonance.
This is a preview of subscription content, access via your institution.
References
 1.
Shor, P.W.: Algorithms for quantum computation: discrete logarithms and factoring. In: Goldwasser, S. (ed.) Proceedings of the 35th Annual Symposium on the Foundations of Computer Science, pp. 124–134. IEEE, Santa Fe (1994)
 2.
Gaitan, F.: Quantum Error Correction and Fault Tolerant Quantum Computing. CRC Press, Boca Raton (2008)
 3.
Fowler, A.G., Mariantoni, M., Martinis, J.M., Cleland, A.N.: Surface codes: towards practical largescale quantum computation. Phys. Rev. A 86, 032324 (2012)
 4.
Barends, R., Kelly, J., Megrant, A., Veitia, A., Sank, D., Jeffrey, E., Chen, Y., Chiaro, B., Mutus, J., Neill, C., et al.: Superconducting quantum circuits at the surface code threshold for fault tolerance. Nature 508, 500 (2014)
 5.
Muhonen, J.T., Dehollain, J.P., Laucht, A., Hudson, F.E., Karia, R., Sekiguchi, T., Itoh, K.M., Jamieson, D.N., McCallum, J.C., Dzurak, A.S., Morello, A.: Storing quantum information for 30 s in a nanoelectronic device. Nat. Nanotechnol. 9, 986 (2014)
 6.
Coppersmith, D.: An approximate Fourier transform useful in quantum factoring. arXiv:quantph/0201067 (1994)
 7.
Cirac, J.I., Zoller, P.: Quantum computations with cold trapped ions. Phys. Rev. Lett. 74, 4091 (1995)
 8.
Miquel, C., Paz, J.P., Zurek, W.H.: Quantum computation with phase drift errors. Phys. Rev. Lett. 78, 3971 (1997)
 9.
Fowler, A.G., Hollenberg, L.C.L.: Scalability of Shor’s algorithm with a limited set of rotation gates. Phys. Rev. A 70, 032329 (2004)
 10.
GarcíaMata, I., Frahm, K.M., Shepelyansky, D.L.: Shor’s factorization algorithm with a single control qubit and imperfections. Phys. Rev. A 78, 062323 (2008)
 11.
Nam, Y.S., Blümel, R.: Scaling laws for Shor’s algorithm with a banded quantum Fourier transform. Phys. Rev. A 87, 032333 (2013)
 12.
Nam, Y.S., Blümel, R.: Robustness of the quantum Fourier transform with respect to static gate defects. Phys. Rev. A 89, 042337 (2014)
 13.
Nam, Y.S., Blümel, R.: Structural stability of the quantum Fourier transform. Quantum Inf. Process. 14, 1179 (2015)
 14.
Nam, Y.S., Blümel, R.: Performance scaling of the quantum Fourier transform with defective rotation gates. Quantum Inf. Comput. 15, 721 (2015)
 15.
Nam, Y.S., Blümel, R.: Analytical formulas for the performance scaling of quantum processors with a large number of defective gates. Phys. Rev. A 92, 042301 (2015)
 16.
Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000)
 17.
Jin, C.Y., Johne, R., Swinkels, M.Y., Hoang, T.B., Midolo, L., van Veldhoven, P.J.: Ultrafast nonlocal control of spontaneous emission. Nat. Nanotechnol. 9, 886 (2014)
 18.
Popescu, S., Short, A.J., Winter, A.: Entanglement and the foundations of statistical mechanics. Nat. Phys. 2, 754 (2006)
 19.
Dyakonov, M.I.: Revisiting the hopes for scalable quantum computation. JETP Lett. 98, 514 (2013)
 20.
DiVincenzo, D.P., Shor, P.W.: Faulttolerant error correction with efficient quantum codes. Phys. Rev. Lett. 77, 3260 (1996)
 21.
Plenio, M.B., Vedral, V., Knight, P.L.: Conditional generation of error syndromes in faulttolerant error correction. Phys. Rev. A 55, 4593 (1997)
 22.
Contact the author at ynam@wesleyan.edu
 23.
Hogben, L.: Handbook of Linear Algebra. Chapman and Hall/CRC, Boca Raton (2014)
 24.
Selinger, P.: Newsynth: exact and approximate synthesis of quantum circuits. http://www.mathstat.dal.ca/~selinger/newsynth/ (2013)
 25.
Gottesman, D.: An introduction to quantum error correction and faulttolerant quantum computation. In: Lomonaco, S.J. (ed.) Proceedings of Symposia in Applied Mathematics, Volume 68, Quantum Information Science and its Contributions to Mathematics. American Mathematical Society Short Course Lecture Notes (2010)
 26.
Reichardt, B.W., Grover, L.K.: Quantum error correction of systematic errors using a quantum search framework. Phys. Rev. A 72, 042326 (2005)
 27.
Kliuchnikov, V., Maslov, D., Mosca, M.: Asymptotically optimal approximation of single qubit unitaries by Clifford and \(T\) circuits using a constant number of ancillary qubits. Phys. Rev. Lett. 110, 190502 (2013)
 28.
Ross, N.J., Selinger, P.: Optimal ancillafree Clifford+\(T\) approximation of \(z\)rotations. arXiv:1403.2975v1 [quantph] (2014)
 29.
Bocharov, A., Roetteler, M., Svore, K.M.: Efficient synthesis of universal repeatuntilsuccess quantum circuits. Phys. Rev. Lett. 114, 080502 (2015)
 30.
Giles, B., Selinger, P.: Exact synthesis of multiqubit Clifford+\(T\) circuits. Phys. Rev. A 87, 032332 (2013)
 31.
Kliuchnikov, V., Maslov, D., Mosca, M.: Fast and efficient exact synthesis of singlequbit unitaries generated by Clifford and \(T\) gates. Quantum Inf. Comput. 13, 607 (2013)
 32.
Selinger, P.: Quantum circuits of \(T\)depth one. Phys. Rev. A 87, 042302 (2013)
 33.
Buhrman, H., Cleve, R., Laurent, M., Linden, N., Schrijver, A., Unger, F.: New limits on faulttolerant quantum computation. In: Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2006), pp. 411–419, IEEE Computer Society, Los Alamitos (2006)
 34.
Bravyi, S., Kitaev, A.: Universal quantum computation with ideal Clifford gates and noisy ancillas. Phys. Rev. A 71, 022316 (2005)
 35.
Reichardt, B.W.: Quantum universality from magic states distillation applied to CSS codes. Quantum Inf. Process. 4, 251 (2005)
 36.
Bravyi, S., Haah, J.: Magicstate distillation with low overhead. Phys. Rev. A 86, 052329 (2012)
 37.
Raussendorf, R., Harrington, J., Goyal, K.: Topological faulttolerance in cluster state quantum computation. N. J. Phys. 9, 199 (2007)
 38.
Fowler, A.G., Stephens, A.M., Groszkowski, P.: Highthreshold universal quantum computation on the surface code. Phys. Rev. A 80, 052312 (2009)
 39.
Shor, P.W.: Scheme for reducing decoherence in quantum computer memory. Phys. Rev. A 52, R2493 (1995)
 40.
Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes in Fortran 77. Cambridge University Press, Cambridge (1996)
 41.
Papoulis, A.: Probability, Random Variables and Stochastic Processes. McGrawHill, New York (1965)
 42.
Beckmann, P.: Statistical distribution of the amplitude and phase of a multiply scattered field. J. Res. Natl. Bur. Stand. 66D, 231 (1962)
Author information
Affiliations
Corresponding author
Appendices
Appendix 1: Effect of deterministic errors in quantum error correction codes
Bitflip code
A quantum circuit diagram of the bitflip code [16] is shown in Fig. 7. Given the initial qubit state of \( \psi _{\text {in}}\rangle = a_00\rangle + a_11\rangle \) of the datacarrying qubit, where \(a_0^2 + a_1^2 = 1\), the circuit in Fig. 7 encodes the quantum data with the help of two additional qubits (initialized to \(0\rangle \)) according to
where the ordering of the individual qubit states follows that shown in Fig. 7 (top \(\rightarrow \) bottom). Since the circuit is designed for protecting quantum data from a bitflip error, the type of deterministic errors that we introduce here to test for the circuit integrity is of the form
The specific choice of complex phase factors in each of the matrix elements is made to ensure that the final output state carries no phase error, as will be clear by the end of this section.
Introducing the bitflip errors (5) to all three constituent qubits of the bitflip code after an ideal encoding operation, i.e., the errors are introduced in the error protection region in Fig. 7, we obtain the corrupted state of the circuit
where \(\varphi _1\), \(\varphi _2\), and \(\varphi _3\) denote the associated error parameters of the approximate identity gates (5) introduced to the three qubits. It is now straightforward to show that, upon an ideal decoding and recovery operation performed on (6), prescribed by the circuit shown in Fig. 7, the recovered state of the circuit is
Here, we clearly see that (i) if only one of the three \(\varphi \)s is nonzero, i.e., a partial bitflip error occurs such that a linear superposition of noerror and bitflip error states occurs, the bitflip code perfectly restores the corrupted quantum data up to a global phase, (ii) deterministic errors are inherently multiqubit natured, i.e., the irremovable deterministic errors affect all possible outcomes of the quantum computation, and (iii) when the deterministic errors are present in the protected, encoded region only, an effective unitary operator may be written down for the datacarrying qubit that results in an identical resultant output state that would otherwise be obtained from the entire bitflip code circuitry including the auxiliary, syndrome qubit measurements.
As a first attempt to characterize the quality of the circuit, we proceed in the following way. Since the resultant, decoded state (7) is pure upon measuring the syndrome qubits, we take, say, the state \(0\rangle \) of the data qubit as a reference state and compare the probability of obtaining \(0\rangle \) before and after the protection circuitry. In particular, we assume the initial state of the data qubit to be \(0\rangle \), i.e., \(a_0 = 1\), then compare the first diagonal elements of the density matrices of the input and the output data qubit states, which corresponds to \(a_0^2 = 1\) and \(\sum _{s_0,s_1 \in \{0,1\}} p_{s_0,s_1,0} s_0s_1 0\rangle \langle s_0s_1 0\), respectively, where \(s_0\) and \(s_1\) denote the binary basis of the two auxiliary qubits (see Fig. 7) and \(p_{s_0,s_1,0}\) denotes the probability of measuring the state \(s_0s_1 0\rangle \), given the output system state \(\psi _{\text {recovered}}^{(\text {b.f.})}\rangle \). Together with (7) then, we obtain the quality of the circuit
where \(\hat{Q}_{\text {b.f.}} = \psi ^{(\text {b.f.})}_{\text {recovered}}\rangle \langle \psi ^{(\text {b.f.})}_{\text {recovered}}\), showing how much probability, compared to the expected probability 1, is left in the \(0\rangle \) state.
We note in passing that, curiously enough, and fortunately so, the quality factor \(Q_{\text {b.f.}}\) in (8) scales more favorably than the quality factor \(\cos ^2(\varphi )\) that would be obtained when we consider the nonencoded, unprotected data qubit case, i.e., a single operation of the approximate identity gate \(\tilde{I}_{\text {b.f.}}(\varphi )\) on a single data qubit, in the limit that the error parameter approaches 0. This is reminiscent of the threshold theorem [2], which is clearly observed when we Taylor expand the quality factors using \(\cos ^2(x) \approx 1x^2+x^4/3\) and \(\sin ^2(x) \approx x^2x^4/3\), i.e., \(Q_{\text {b.f.}} \approx 1O(\varphi ^4)\) (assuming \(\varphi _1\), \(\varphi _2\), and \(\varphi _3\) follow the same statistics), whereas the unencoded quality factor has the form \(1O(\varphi ^2)\). Based on the density matrix approach, then, we conclude that for small errors the probability flow characteristic is more favorable when the quantum data is encoded according to the bitflip code.
Phaseflip code
In connection with the bitflip code in Sect. 1, in this section, we investigate the phaseflip code [16]. The general structure is identical to the bitflip code; the phaseflip code may be understood as the bitflip code in a Hadamard space, i.e., the error protection region is sandwiched between Hadamard gates (see Fig. 8),
in addition to the bitflip code encoding, decoding, and recovery operations.
Once again, we start with the initial data qubit state \(\psi _{\text {in}}\rangle = a_00\rangle + a_11\rangle \), where \(a_0^2 + a_1^2 = 1\). The circuit then encodes the quantum data with the help of two additional qubits, which are initialized to \(0\rangle \), which results in the encoded state
where \(\otimes \) denotes a tensor product between the different qubit states, in the order of the two auxiliary qubits and the data qubit (top \(\rightarrow \) bottom) as shown in Fig. 8. Since, this time, the circuit is designed for protecting quantum data from a phaseflip error, the type of deterministic errors that we investigate is of the form
Apart from global phases from each qubit, this produces a result that is essentially identical to the result produced by the bitflip code studied in Sect. 1.
It is straightforward to show that, in analogy to the cases investigated in Sect. 1, the analytical result for the phaseflip code follows immediately for \(\varphi \rightarrow \beta \). Assuming all constituent gates of the circuitry are exact, together with the approximate identity gates \(\tilde{I}_{\text {p.f.}}\) applied to the three qubits of the phaseflip code, we obtain, up to a global phase, the decoded state of the phaseflip code
where \(\beta _1\), \(\beta _2\), and \(\beta _3\) denote the three error parameters of \(\tilde{I}_{\text {p.f.}}\) in the order of the auxiliary qubits and the data qubit (see Fig. 8). Thus, once again, we see that (i) the phaseflip code perfectly restores the corrupted quantum data if only one of the qubits is affected, (ii) irremovable deterministic errors affect all possible outcomes, and (iii) provided that the errors occur only in the protected region, the resultant data qubit state after syndrome measurements may be described by an effective unitary operation.
We also note that, as a result of the analogy to the bitflip code, the quality factor of the phaseflip code (defined according to the first diagonal element of the density matrix of the data qubit state after the protection circuitry, given the input state \(\psi _{\text {in}}\rangle =0\rangle \)), in conjunction with (8), reads
where \(\hat{Q}_{\text {p.f.}} = \left \psi ^{(\text {p.f.})}_{\text {recovered}}\rangle \langle \psi ^{(\text {p.f.})}_{\text {recovered}}\right \).
Shor code
Combining the two error correction codes, namely, the bitflip code (see Sect. 1) and the phaseflip code (see Sect. 1), the 9qubit Shor code (see Fig. 9), also known as a [9,1,3] code, is the first ever quantum error correction code that is capable of correcting for an arbitrary singlequbit error [39]. In this section, we investigate the integrity of the Shor code circuitry, closely following the steps performed in the previous sections. Due to the structure of the code, i.e., a combination of the straightforwardly analyzable bitflip and phaseflip codes, while tedious, a fully analytical approach still remains as a viable method, and this forms the central subject of this section.
We start with the initial state of the 9qubit system \(a_00\rangle \otimes 00000000\rangle + a_11\rangle \otimes 00000000\rangle \), where the first, leftmost state denotes the data qubit state, the following 8digit state denotes the auxiliary 8qubit state (bottom \(\rightarrow \) top; see Fig. 9), and \(a_0^2+a_1^2 = 1\). Then, upon encoding the quantum data, we obtain the encoded state
Since the Shor code is capable of correcting an arbitrary singlequbit error [see (1)], the approximate identity gate we introduce here is of the form
where, applied to all 9 qubits of the system, we arrive at the corrupted, encoded state.
Now, continuing with all \(2^9\) different states is messy and, in fact, unnecessary. Taking advantage of the conceptually straightforward structure of the Shor code (see Fig. 9), we can first investigate the bitflip code part, i.e., the qubitgroups of (1, 2, 3), (4, 5, 6), and (7, 8, 9), which have identical circuitry, then proceed with the remaining phaseflip code part, while being fully aware of the repetitive structure of the bitflip code part. In particular, we start by rewriting the encoded state as
where each of the nine qubits are now subjected to the approximate identity gates \(\tilde{I}_{\text {shor}}(\alpha _j,\beta _j,\varphi _j)\), where \(j=1,2,...,9\) corresponds to the qubit numbers. Then, denoting \(A_j \equiv \exp (i\alpha _j)\), \(B_j \equiv \exp (i\beta _j)\), \(C_j \equiv \cos (\varphi _j)\), and \(S_j \equiv \sin (\varphi _j)\), we obtain the (1, 2, 3) group state of the intermediate state of the Shor code \( \psi ^{(\text {1,2,3})}\rangle '_0\) and \( \psi ^{(\text {1,2,3})}\rangle '_1\) immediately after the bitflip code part to be
where
and
where \(\text {Re}(\Phi )\) and \(\text {Im}(\Phi )\) denote the real and imaginary parts of \(\Phi \), respectively.
The entire system, at this point, is in the state
If care is taken, together with (17) and its (4, 5, 6) and (7, 8, 9) corresponding terms, one can show that we can write the recovered state of the corrupted Shor code as
where
where \(\mu \) and \(\nu \), their primes, and doubleprimes are elements of \(\{ 0,1 \}\) and the equivalent expression for \(\psi _{\text {decoded}}\rangle _1\) may be obtained by replacing all \(\phi \)s in (22) with \(\theta \)s with the same ordering of the basis binary states and their associated sub and superscripts in the phases. Once again, the obtained explicit, analytical results allow us to confirm that (i) the Shor code indeed corrects for an arbitrary singlequbit deterministic error, (ii) deterministic errors affect every single outcome, and (iii) as long as the errors are limited to the protected region, upon the syndrome measurements, there exists an effective unitary operation that may be performed directly on a data qubit that results in the same output state as the one obtained from the Shor code prescription.
[5,1,3] Perfect code
When it comes to the singlequbit error correction code, the [5, 1, 3] code takes a special place, as it is known to be the perfect code that uses the minimal number of qubits that still allow for a perfect restoration [2]. However, the [5, 1, 3] stabilizer code uses 16 auxiliary qubits for syndrome measurements [20, 21], which brings the total number of qubits of the circuitry to 21. This is problematic with regard to the brute force analytical approach used in the previous sections, as the total number of states amounts to \(2^{21}\). Hence, in this section, we limit the scope of our investigation to the methodology, in line with that outlined in the previous sections.
We start with the encoding circuit of the [5, 1, 3] quantum stabilizer circuit shown in Fig. 10a, where this circuitry produces the encoded state
given the initial data qubit state of \(a_00\rangle + a_11\rangle \) with \(a_0^2+a_1^2\), where
and
Since the [5, 1, 3] quantum stabilizer code is also capable of correcting an arbitrary singlequbit error, we use \(\tilde{I}_{\text {shor}}\) in (15) as the approximate identity gate to be applied to the five constituent qubits of the error correction code, introduced following the encoding operation in Fig. 10a.
Figure 10b shows the syndrome extraction circuit. Similar to the Hadamard gate in (9), the \(H_y\) gates that appear in Fig. 10 have the diagonal matrix elements of \(1/\sqrt{2}\) and the offdiagonal matrix elements of \(i/\sqrt{2}\). The \(\dagger \)symbol denotes the complex conjugate. Splitting the circuit into four structurally identical parts, grouping (a) two H or \(H_y\) gates operated on two of the five dataencoding qubits, (b) four controlledNOT operations, and (c) the inverses of (a) yield four groups that may be indexed as (1, 5), (2, 5), (3, 5), and (4, 5), which are named after the places of the two qubits of the five dataencoding qubits that are subjected to H or \(H_y\) gates [see Fig. 10b]. This way, the four intermediate states, namely, \(\psi _{[5,1,3],\text {intermediate}}^{(1,5)}\rangle , \psi _{[5,1,3],\text {intermediate}}^{(2,5)}\rangle , \psi _{[5,1,3],\text {intermediate}}^{(3,5)}\rangle ,\) and \(\psi _{[5,1,3],\text {intermediate}}^{(4,5)}\rangle \) after each of the indexed group operations defined above may be written down in a systematic manner, a structure similar to the one shown in Sect. 1; hence, fully analytical expressions may be obtained. Using this methodology, one can show that the [5, 1, 3] quantum stabilizer code also exhibits the recurring theme of (i)–(iii) presented above, namely, (i) an arbitrary singlequbit, unitary error \(\tilde{I}_{\text {shor}}\) may be corrected via the [5, 1, 3] code, provided that no other gates are errorprone, (ii) deterministic errors affect all states, and (iii) there exist effective unitary operators for the data qubit state that are indistinguishable from the erroneous [5, 1, 3]code for any syndrome measurement outcomes. We numerically confirmed (i)–(iii).
Appendix 2: Rotation gate fidelity
In this appendix, we motivate formula (3) for the fidelity of a rotation gate, constructed fault tolerantly via a sequence approximation of flawed basis gates. We are not able to rigorously derive (3). However, we are able to show that (3) has the correct smallL and largeL limits. We then interpret (3) as interpolating between these two limits, which, given the excellent agreement in Fig. 4 displayed between (3) and our numerical simulations, works very well.
We start with the definition of the matrix norm in Eq. (2) of the main text, which we import here for the convenience of the reader:
where \(a_{ij}\) are the matrix elements of the matrix A. As shown in many text books on elementary linear algebra, this is a legitimate matrix norm, equivalent, e.g., to the more familiar Euclidean norm [23]. Our choice of the figure of merit is \(F_R = 1R(\theta )\tilde{U}_L(\varDelta )\), where \(R(\theta )\) is the rotation gate with rotation angle \(\theta \) and \(\tilde{U}_L(\varDelta )\) is the Llong sequenceapproximated, noise \(\sigma \)introduced rotation gate. Explicitly, \(F_R\) reads
where \(r_{ij}\) and \(\tilde{u}_{ij}\) are the matrix elements of \(R(\theta )\) and \(\tilde{U}_L(\varDelta )\), respectively. Adding and subtracting \(u_{ij}\) in (27), we arrive at:
The first term in (28), i.e., \((r_{ij}u_{ij})\), does not depend on the deterministic errors in the basis gates, while the second term, i.e., \((\tilde{u}_{ij}u_{ij})\), depends on the deterministic errors in the basis gates and is independent of the approximation error of the rotation gate due to cutting the approximation sequence at L. This way we isolated the two different sources of fidelity deterioration into two separate terms.
According to [24] we have
while the magnitude of the second term in (28) is determined by the error strength \(\sigma \). While c in (29) is of the order of 0.1 (see main text), the error strength \(\sigma \), realistically, for large quantum information processors, should be of the order of \(\sigma \lesssim 10^{4}\) [14, 15]. Thus, it is clear that under these conditions, the first term in (28) will dominate for small L, while the second term has a chance to dominate the first term only when for sufficiently long sequences the first term in (28) has become exponentially small [see (29)]. Thus, in the limit of small L, where we neglected the second term, we have:
Since for small L the \(\sigma \)dependent term in (3) is negligible with respect to \(\exp (cL)\), we see that (3) is consistent with (30). This shows that (3) has the correct smallL limit.
As L increases, we have \(r_{ij}u_{ij}\rightarrow 0\), exponentially quickly [see (29)], and the second term in (28) starts to dominate. Therefore, in this case, we may write
Also, because of \(r_{ij}u_{ij}\rightarrow 0\), we have \(u_{ij}\rightarrow r_{ij}\), and (31) may be written to an excellent approximation according to
At this point we notice that we have explicit expressions for both \(\tilde{u}_{ij}\) [see (1)] and
where \(\bar{\beta }\) is the desired rotation angle. We also notice that
which does not depend on \(\alpha \), but more importantly, is independent of j. This means we can drop the \(\max _{j}\) operation from (32) and obtain:
This expression for \(F_R\) applies for a particular realization of deterministic gate errors. A more meaningful expression is obtained by averaging over the statistical distributions of \(\beta \) and \(\varphi \). Denoting this average by \(\langle \ldots \rangle \), our goal now is to compute
The computation of \(\langle \sin (\varphi ) \rangle \) is elementary and can be done analytically. The result is
Since \(1/a \sim \sigma ^2 L\) is very small, we can also write
where \(\gamma _1\) is a constant. The computation of the remaining term in (36) is not so straightforward. However, since both probability distributions, G and D, are narrowly concentrated on small \(x=\beta \bar{\beta }\) and \(\varphi \) (see Fig. 5), respectively, we expand the square root in (36) up to second order in x and \(\varphi \) and obtain
where \(\gamma _2\) is a constant. Collecting terms [see (38) and (39)], we now obtain in the largeL limit:
where \(\gamma =\gamma _1+\gamma _2\) is a constant. This shows that in the limit of large L, where the \(\exp (cL)\) term vanishes, (3) is consistent with (40). In summary we showed that (3) has the correct smallL and largeL limits.
Since, under realistic conditions, \(\gamma \sigma \sqrt{L}\) is very small, and since we derived (3) only up to first order in \(\gamma \sigma \sqrt{L}\), (3) may also be written in the two forms
or
We checked explicitly that the difference between (3), (41), and (42) is not visible on the scale of Fig. 4. While (42) would emphasize the physical origin of the deterioration of the fidelity as the result of two independent stochastic processes, namely the approximation error due to finitelength sequences and the deterministic errors in the basis gates, we cannot derive (42) from first principles. In addition, (3) seems more appropriate, since the accumulation of deterministic errors with L is a diffusive process, in which case \(\tilde{u}_{ij}u_{ij}\) is expected to grow like \(\sim \sqrt{L}\) and should not have an exponential behavior as indicated by (42). Based on these two reasons, although all three forms of \(F_R\) are visually indistinguishable, we state our fidelity result in the form (3).
As shown in Fig. 4, \(F_R\) exhibits a maximum in L, which defines the optimal sequence length \(L_{\text {opt}}\). Accordingly, setting the derivative of (3) to zero, we obtain \(L_{\text {opt}}\) as the solution of the transcendental equation
which, taking logarithms on both sides, can also be written as
Equations (43) or (44) may be solved numerically using standard methods [40]. This is how the plot symbols (crosses) in Fig. 6 were generated.
Under realistic conditions, i.e. \(\sigma \lesssim 10^{4}\) [14, 15], \(L_{\text {opt}}\) is of the order of 100, as shown in Fig. 4. In this case we may arrive at an explicit, analytical formula for \(L_{\text {opt}}\) by iterating (44). Iterating once, we arrive at
The green line in Fig. 6 shows (45). We see that, indeed, the explicit formula (45) works very well for predicting \(L_{\text {opt}}\), even for \(\sigma \) much larger than \(10^{4}\).
Appendix 3: Statistical distributions of the unitary parameters of a rotation gate
We demonstrate the origins of the different distribution functions shown in Fig. 5 of the main text for the unitary parameters \(\beta \), \(\alpha \), and \(\varphi \) [see Eq. (1) of the main text] of the resulting, approximate rotation gate \(\tilde{U}_{L}(\varDelta )\). We start with the expression for the first diagonal element \(\tilde{u}^{(L)}_{11}\) of the matrix obtained from multiplying L general \(2\times 2\) matrices
where
is an element of the set \(G_{11,L}\) with size \(2^{L1}\) of Ltuple product terms that appear in the first diagonal element \(\tilde{u}^{(L)}_{11}\), where, denoting \(\beta _i\), \(\alpha _i\), and \(\varphi _i\) as the ith matrix unitary parameters,
While tedious, it can be shown straightforwardly that all Ltuple elements \(g_n^{(11)}\) may be obtained by first writing out all possible Llong product combinations of \(\cos (\varphi _i)\) and \(\sin (\varphi _i)\) with even number of \(\sin (\varphi _i)\) terms, then multiplying \(e^{i\beta _i}\) to \(\cos (\varphi _i)\) if there precedes an even number of \(\sin \)terms, and \(e^{i\beta _i}\) to \(\cos (\varphi _i)\) if there precedes an odd number of \(\sin \)terms, while multiplying \(e^{i\alpha }\sin (\varphi _i)\) to \(\sin (\varphi _i)\) for the odd number of times occurrence of \(\sin (\varphi _i)\), e.g., first, third, fifth, etc. \(\sin (\varphi _i)\), and \(e^{i\alpha }\sin (\varphi _i)\) to the even number of times occurrence of \(\sin (\varphi _i)\). In order to illustrate this point more clearly, we show in Eq. (49) the first four cases, namely,
We also note that the corresponding offdiagonal elements \(\tilde{u}^{(L)}_{12}\) read
The general rule remains identical to the case of the diagonal element; all we need to change is the even number of \(\sin \)terms to the odd number.

1.
\(\beta \)statistics
Assuming that the Llong sequence of elementary gates consists of the aforementioned many different basis gates, it is straightforward to show that the resulting \(\beta \) parameter of the approximate rotation gate is Gaussiandistributed, with mean \(\delta = \theta /2\) and standard deviation \(\epsilon \sim \sigma \sqrt{L}\), where \(\sigma \) is the standard deviation of the elementary error parameters \(\beta _i\), \(\alpha _i\), and \(\varphi _i\). First, since the noisy approximate gate \(\tilde{U}_{L}(\varDelta )\), in the limit that the noise strength approaches 0, i.e., \(\sigma \rightarrow 0\), should be nearly identical to the desired \(R(\theta )\), up to a global phase, for a sufficiently large L, the mean of the resulting \(\beta \)distribution, with appropriate measures taken for the global phase, is expected to be \(\delta = \theta /2\). Then, since the form of \(\tilde{u}^{(L)}_{11}\) [see, e.g., Eq. (49)] is the sum of randomly perturbed complex vectors, including their directions, assuming the central limit theorem [41] holds for the erroneous phase angles of the dominant terms that are otherwise aligned in the noisefree case, we obtain, for the individual constituent basis gates’ error level \(\sigma \) and an Llong sequence, the variance of the resulting Gaussian distribution function to be \(\epsilon ^2 \sim \sigma ^2 L\).

2.
\(\alpha \)statistics
As in the case of the \(\beta \)statistics, the \(\alpha \)statistics of \(\tilde{U}_{L}(\varDelta )\) is also determined according to the way the elementary error parameters determine the accumulated error. Instead of looking at the diagonal element \(\tilde{u}^{(L)}_{11}\), this time, we focus on the offdiagonal element \(\tilde{u}^{(L)}_{12}\). Implied by the form of the equations in Eq. (50), together with the fact that the approximate rotation gate yields a near zero term for the offdiagonal term, we see that the dominant terms in Eq. (50), for instance, must cancel each other out, as expected in the case where the noise \(\sigma \rightarrow 0\). This means that the resulting offdiagonal term \(\tilde{u}^{(L)}_{12}\) should be a small, randomly directed vector. To show this more quantitatively, we write
$$\begin{aligned} \tan (\alpha ) = \frac{\text {Im}(\tilde{u}^{(L)}_{12})}{\text {Re}(\tilde{u}^{(L)}_{12})} = \frac{\displaystyle \sum _{n=1}^{2^{L1}}g_n^{(12)}\text {Im}\left( \frac{g_n^{(12)}}{g_n^{(12)}}\right) }{\displaystyle \sum _{n'=1}^{2^{L1}}g_{n'}^{(12)}\text {Re}\left( \frac{g_{n'}^{(12)}}{g_{n'}^{(12)}}\right) }, \end{aligned}$$(51)where \(\text {Im}(...)\) and \(\text {Re}(...)\) denote imaginary and real parts of their respective arguments and \(g_{n}^{(12)}\) are the analogous terms to \(g_{n}^{(11)}\) of \(\tilde{u}^{(L)}_{11}\), the diagonal element case [see Eq. (46)]. First expanding the individual terms of the sums in Eq. (51) about their individual parameters’ noisefree case, i.e., \(\bar{\beta }_i\), \(\bar{\alpha }_i\), and \(\bar{\varphi }_i\) for the unitary parameters \(\beta _i\), \(\alpha _i\), and \(\varphi _i\) of the ith matrix, then keeping the erroneous terms to the first order, we may write
$$\begin{aligned} \tan (\alpha ) \approx \frac{C+\sum _{j}w_{j}R_{\sigma }(j)}{C'+\sum _{j'}w'_{j'}R'_{\sigma }(j')}, \end{aligned}$$(52)where C and \(C'\) are constants and \(w_j\) and \(w'_{j'}\) are the weights of the random numbers \(R_{\sigma }(j)\) and \(R'_{\sigma }(j')\) with standard deviation \(\sigma \) that appear in the numerator and denominator in Eq. (52). For instance, for the case \(L=2\), we obtain
$$\begin{aligned} \tan (\alpha ) \approx \frac{\begin{aligned}&\left\{ \left[ 2\cos (\bar{\varphi }_1)\sin (\bar{\varphi }_2) +\cos (\bar{\varphi }_1+\bar{\varphi }_2)(\varphi _1+\varphi _2) \cos (\bar{\varphi }_1\bar{\varphi }_2)(\varphi _1\varphi _2)\right] \right. \\&\times \left. [\sin (\bar{\beta }_1+\bar{\alpha }_2)+\cos (\bar{\beta }_1+\bar{\alpha }_2)(\beta _1+\alpha _2)]\right\} + \\&\left\{ [2\sin (\bar{\varphi }_1)\cos (\bar{\varphi }_2) +\cos (\bar{\varphi }_1+\bar{\varphi }_2)(\varphi _1+\varphi _2) +\cos (\bar{\varphi }_1\bar{\varphi }_2)(\varphi _1\varphi _2)] \right. \\&\times \left. [\sin (\bar{\alpha }_1\bar{\beta }_2)+\cos (\bar{\alpha }_1\bar{\beta }_2)(\alpha _1\beta _2)] \right\} \end{aligned}}{\begin{aligned}&\left\{ [2\cos (\bar{\varphi }_1)\sin (\bar{\varphi }_2) +\cos (\bar{\varphi }_1+\bar{\varphi }_2)(\varphi _1+\varphi _2) \cos (\bar{\varphi }_1\bar{\varphi }_2)(\varphi _1\varphi _2)]\right. \\&\,\times \left. [\cos (\bar{\beta }_1+\bar{\alpha }_2)\sin (\bar{\beta }_1+\bar{\alpha }_2)(\beta _1+\alpha _2)]\right\} + \\&\left\{ [2\sin (\bar{\varphi }_1)\cos (\bar{\varphi }_2) +\cos (\bar{\varphi }_1+\bar{\varphi }_2)(\varphi _1+\varphi _2) +\cos (\bar{\varphi }_1\bar{\varphi }_2)(\varphi _1\varphi _2)] \right. \\&\,\times \left. [\cos (\bar{\alpha }_1\bar{\beta }_2)\sin (\bar{\alpha }_1\bar{\beta }_2)(\alpha _1\beta _2)] \right\} \end{aligned}}, \end{aligned}$$(53)where \(\beta _i\), \(\alpha _i\), and \(\varphi _i\) are now the perturbation angles. Assuming, say, a Gaussian distribution with standard deviation \(\sigma \) for the statistical distribution functions of all error parameters, we see that \(\tan (\alpha )\) in Eq. (53) is now distributed according to a Cauchy distribution function [41]. In particular, since the halfmax fullwidth of a Cauchy distribution function derived from the ratio of two Gaussian distributions with standard deviations \(\sigma _{N}\) and \(\sigma _{D}\) for numerator and denominator, respectively, is \(2\sigma _{N}/\sigma _{D}\), one can see that even with \(L=2\), the width of the distribution function may be of the order of 1, explaining the origin of the uniform distribution of \(\alpha \) of the noisy, approximate rotation gate with \(L \gg 2\). We note that a NOT gate, which may be written with the noisefree unitary parameters \(\bar{\varphi }= \pi /2\) and \(\bar{\alpha }= \pi /2\), leaving \(\bar{\beta }\) free, for instance, may result in a different \(\alpha \)statistics when multiplied an even number of times depending on the particular choice of \(\bar{\beta }\). In particular, we find that for \(\bar{\beta }= \pi /2\), for instance, the resulting \(\alpha \)statistics of the multiplication of a series of NOT gates results in a much narrower distribution around 0 than the uniform distribution one obtains for \(\bar{\beta }= \pi /4\). We do not observe this phenomenon for any other constituent gates of the sequence method in [24], however, and, together with the fact that our sample of sequences ranging from \(L=116, ..., 1021\) has a maximum of one NOT gate in the entire sequence [22], we conclude that the \(\alpha \) parameter of \(\tilde{U}_{L}(\varDelta )\) is uniformly distributed.

3.
\(\varphi \)statistics
Here we show that the \(\varphi \)statistics of \(\tilde{U}_L(\varDelta )\) indeed follows a Rayleigh distribution. First, we see that, for small \(\varphi \), the matrix element \(\tilde{u}^{(L)}_{12}\) of \(\tilde{U}_L(\varDelta )\) will have an absolute value \(\sin (\varphi ) \approx \varphi \). Now, for a given sequence, as shown by the form of the equations in Eq. (50), we obtain the amplitude \(\varphi \) of \(\tilde{u}^{(L)}_{12}\) from the sum of small complex vectors around the origin. In particular, the small complex vectors, to a good approximation, have statistical characteristics of some arbitrary even distribution function, tightly distributed around 0, in their signed amplitudes, and some even distribution function with variance \(\gg \pi ^2\), spanning the entire modulo \(2\pi \) space of phase angle for sufficiently large L, where the ith gate phase angle parameters \(\alpha _i\) and \(\beta _i\) are of the order of \(\pi \). In this case, the resulting probability distribution function \(D_{\varphi }(\varphi )\) of the resulting amplitude \(\varphi \) is Rayleigh (see [42] and references therein), i.e., \(D_{\varphi }(\varphi ) = 2a\varphi  \exp (a\varphi ^2)\), where a is real. This corroborates our numerical findings. If care is taken, one can show that, according to [42], \(a \sim \sigma ^2L^{1}\), a result consistent with our numerical results presented in the main text. One may also take an alternative route: Since the secondorder term in the erroneous part of \(\varphi \) of the diagonal element \(\tilde{u}_{11}^{(L)}\) [see, e.g., Eq. (49)] reads \(\sim \sum _i^L \varphi _i^2/2\), where \(\varphi _i\) stands for the Gaussian errors in the \(\varphi \) parameter of the ith gate, using the fact that the sum of squares of Gaussians is a \(\chi ^2\)distribution function with degree L and mean \(\sigma ^2L/2\), we obtain \(a \sim \sigma ^{2}L^{1}\). We note that, according to Eq. (27) of [42], the resulting \(\alpha \)statistics in this case should be a uniform distribution function over modulo\(2\pi \) space, consistent with the results presented above.
Rights and permissions
About this article
Cite this article
Nam, Y.S., Blümel, R. Optimal length of decomposition sequences composed of imperfect gates. Quantum Inf Process 16, 123 (2017). https://doi.org/10.1007/s1112801715715
Received:
Accepted:
Published:
Keywords
 Quantum computing
 Quantum information processing
 Qubit
 Quantum gates
 Decomposition sequences
 Quantum error correction
 Fault tolerance