Skip to main content
Log in

Optimal length of decomposition sequences composed of imperfect gates

Quantum Information Processing Aims and scope Submit manuscript


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 fault-tolerant 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, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6


  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)

    Book  MATH  Google Scholar 

  3. Fowler, A.G., Mariantoni, M., Martinis, J.M., Cleland, A.N.: Surface codes: towards practical large-scale quantum computation. Phys. Rev. A 86, 032324 (2012)

    Article  ADS  Google Scholar 

  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)

    Article  ADS  Google Scholar 

  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)

    Article  ADS  Google Scholar 

  6. Coppersmith, D.: An approximate Fourier transform useful in quantum factoring. arXiv:quant-ph/0201067 (1994)

  7. Cirac, J.I., Zoller, P.: Quantum computations with cold trapped ions. Phys. Rev. Lett. 74, 4091 (1995)

    Article  ADS  Google Scholar 

  8. Miquel, C., Paz, J.P., Zurek, W.H.: Quantum computation with phase drift errors. Phys. Rev. Lett. 78, 3971 (1997)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  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)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  10. García-Mata, I., Frahm, K.M., Shepelyansky, D.L.: Shor’s factorization algorithm with a single control qubit and imperfections. Phys. Rev. A 78, 062323 (2008)

    Article  ADS  Google Scholar 

  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)

    Article  ADS  Google Scholar 

  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)

    Article  ADS  Google Scholar 

  13. Nam, Y.S., Blümel, R.: Structural stability of the quantum Fourier transform. Quantum Inf. Process. 14, 1179 (2015)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  14. Nam, Y.S., Blümel, R.: Performance scaling of the quantum Fourier transform with defective rotation gates. Quantum Inf. Comput. 15, 721 (2015)

    MathSciNet  Google Scholar 

  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)

    Article  ADS  Google Scholar 

  16. Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information. Cambridge University Press, Cambridge (2000)

    MATH  Google Scholar 

  17. Jin, C.Y., Johne, R., Swinkels, M.Y., Hoang, T.B., Midolo, L., van Veldhoven, P.J.: Ultrafast non-local control of spontaneous emission. Nat. Nanotechnol. 9, 886 (2014)

    Article  ADS  Google Scholar 

  18. Popescu, S., Short, A.J., Winter, A.: Entanglement and the foundations of statistical mechanics. Nat. Phys. 2, 754 (2006)

    Article  Google Scholar 

  19. Dyakonov, M.I.: Revisiting the hopes for scalable quantum computation. JETP Lett. 98, 514 (2013)

    Article  ADS  Google Scholar 

  20. DiVincenzo, D.P., Shor, P.W.: Fault-tolerant error correction with efficient quantum codes. Phys. Rev. Lett. 77, 3260 (1996)

    Article  ADS  Google Scholar 

  21. Plenio, M.B., Vedral, V., Knight, P.L.: Conditional generation of error syndromes in fault-tolerant error correction. Phys. Rev. A 55, 4593 (1997)

    Article  ADS  Google Scholar 

  22. Contact the author at

  23. Hogben, L.: Handbook of Linear Algebra. Chapman and Hall/CRC, Boca Raton (2014)

    MATH  Google Scholar 

  24. Selinger, P.: Newsynth: exact and approximate synthesis of quantum circuits. (2013)

  25. Gottesman, D.: An introduction to quantum error correction and fault-tolerant 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)

    Article  ADS  MathSciNet  Google Scholar 

  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)

    Article  ADS  Google Scholar 

  28. Ross, N.J., Selinger, P.: Optimal ancilla-free Clifford+\(T\) approximation of \(z\)-rotations. arXiv:1403.2975v1 [quant-ph] (2014)

  29. Bocharov, A., Roetteler, M., Svore, K.M.: Efficient synthesis of universal repeat-until-success quantum circuits. Phys. Rev. Lett. 114, 080502 (2015)

    Article  ADS  Google Scholar 

  30. Giles, B., Selinger, P.: Exact synthesis of multiqubit Clifford+\(T\) circuits. Phys. Rev. A 87, 032332 (2013)

    Article  ADS  Google Scholar 

  31. Kliuchnikov, V., Maslov, D., Mosca, M.: Fast and efficient exact synthesis of single-qubit unitaries generated by Clifford and \(T\) gates. Quantum Inf. Comput. 13, 607 (2013)

    MathSciNet  Google Scholar 

  32. Selinger, P.: Quantum circuits of \(T\)-depth one. Phys. Rev. A 87, 042302 (2013)

    Article  ADS  Google Scholar 

  33. Buhrman, H., Cleve, R., Laurent, M., Linden, N., Schrijver, A., Unger, F.: New limits on fault-tolerant 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)

    Article  ADS  MathSciNet  MATH  Google Scholar 

  35. Reichardt, B.W.: Quantum universality from magic states distillation applied to CSS codes. Quantum Inf. Process. 4, 251 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  36. Bravyi, S., Haah, J.: Magic-state distillation with low overhead. Phys. Rev. A 86, 052329 (2012)

    Article  ADS  Google Scholar 

  37. Raussendorf, R., Harrington, J., Goyal, K.: Topological fault-tolerance in cluster state quantum computation. N. J. Phys. 9, 199 (2007)

    Article  MathSciNet  Google Scholar 

  38. Fowler, A.G., Stephens, A.M., Groszkowski, P.: High-threshold universal quantum computation on the surface code. Phys. Rev. A 80, 052312 (2009)

    Article  ADS  Google Scholar 

  39. Shor, P.W.: Scheme for reducing decoherence in quantum computer memory. Phys. Rev. A 52, R2493 (1995)

    Article  ADS  Google Scholar 

  40. Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: Numerical Recipes in Fortran 77. Cambridge University Press, Cambridge (1996)

    MATH  Google Scholar 

  41. Papoulis, A.: Probability, Random Variables and Stochastic Processes. McGraw-Hill, New York (1965)

    MATH  Google Scholar 

  42. Beckmann, P.: Statistical distribution of the amplitude and phase of a multiply scattered field. J. Res. Natl. Bur. Stand. 66D, 231 (1962)

    MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Y. S. Nam.


Appendix 1: Effect of deterministic errors in quantum error correction codes

1.1 Bit-flip code

A quantum circuit diagram of the bit-flip code [16] is shown in Fig. 7. Given the initial qubit state of \( |\psi _{\text {in}}\rangle = a_0|0\rangle + a_1|1\rangle \) of the data-carrying 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

$$\begin{aligned} |\psi _{\text {encoded}}^{(\text {b.f.})}\rangle = a_0 |000\rangle + a_1|111\rangle , \end{aligned}$$
Fig. 7
figure 7

(Color online) Circuit diagram of the bit-flip code. A red square connected to a green cross denotes a controlled-NOT gate. M denotes a measurement operation. The shaded region, labeled BIT FLIP ERROR, is the region where a single-qubit bit-flip error may occur against which the circuitry protects. Encoding and decoding operations precede and follow the error protection region. Two red squares connected to a single green cross denote a controlled-controlled-NOT gate, which implements the recovery operation of the bit-flip code

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 bit-flip error, the type of deterministic errors that we introduce here to test for the circuit integrity is of the form

$$\begin{aligned} \tilde{I}_{\text {b.f.}}(\varphi ) = \left( \begin{matrix} \cos {\left( \varphi \right) } \,\,&{} i\sin {\left( \varphi \right) } \\ i\sin {\left( \varphi \right) } \,\,&{} \cos {\left( \varphi \right) } \\ \end{matrix} \right) . \end{aligned}$$

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 bit-flip errors (5) to all three constituent qubits of the bit-flip 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

$$\begin{aligned}&\left| \psi _{\text {corrupted}}\right\rangle \nonumber \\&\quad =a_0\left[ \cos (\varphi _1)|0\rangle +i\sin (\varphi _1)|1\rangle \right] \otimes \left[ \cos (\varphi _2)|0\rangle +i\sin (\varphi _2)|1\rangle \right] \nonumber \\&\qquad \otimes \left[ \cos (\varphi _3)|0\rangle +i\sin (\varphi _3)|1\rangle \right] \nonumber \\&\qquad +a_1\left[ i\sin (\varphi _1)|0\rangle +\cos (\varphi _1)|1\rangle \right] \otimes \left[ i\sin (\varphi _2)|0\rangle +\cos (\varphi _2)|1\rangle \right] \nonumber \\&\qquad \otimes \left[ i\sin (\varphi _3)|0\rangle +\cos (\varphi _3)|1\rangle \right] , \end{aligned}$$

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

$$\begin{aligned}&\left| \psi ^{(\text {b.f.})}_{\text {recovered}}(\varphi _1,\varphi _2,\varphi _3)\right\rangle \nonumber \\&\quad = \left[ +a_0\cos \left( \varphi _1\right) \cos \left( \varphi _2\right) \cos \left( \varphi _3\right) \right. -\left. ia_1\sin \left( \varphi _1\right) \sin \left( \varphi _2\right) \sin \left( \varphi _3\right) \right]&|000\rangle \nonumber \\&\qquad \times \left[ -ia_0\sin \left( \varphi _1\right) \sin \left( \varphi _2\right) \sin \left( \varphi _3\right) \right. +\left. a_1\cos \left( \varphi _1\right) \cos \left( \varphi _2\right) \cos \left( \varphi _3\right) \right]&|001\rangle \nonumber \\&\qquad \times \left[ +ia_0\cos \left( \varphi _1\right) \sin \left( \varphi _2\right) \cos \left( \varphi _3\right) \right. -\left. a_1\sin \left( \varphi _1\right) \cos \left( \varphi _2\right) \sin \left( \varphi _3\right) \right]&|010\rangle \nonumber \\&\qquad \times \left[ -a_0\sin \left( \varphi _1\right) \cos \left( \varphi _2\right) \sin \left( \varphi _3\right) \right. +\left. ia_1\cos \left( \varphi _1\right) \sin \left( \varphi _2\right) \cos \left( \varphi _3\right) \right]&|011\rangle \nonumber \\&\qquad \times \left[ +ia_0\sin \left( \varphi _1\right) \cos \left( \varphi _2\right) \cos \left( \varphi _3\right) \right. -\left. a_1\cos \left( \varphi _1\right) \sin \left( \varphi _2\right) \sin \left( \varphi _3\right) \right]&|100\rangle \nonumber \\&\qquad \times \left[ -a_0\cos \left( \varphi _1\right) \sin \left( \varphi _2\right) \sin \left( \varphi _3\right) \right. +\left. ia_1\sin \left( \varphi _1\right) \cos \left( \varphi _2\right) \cos \left( \varphi _3\right) \right]&|101\rangle \nonumber \\&\qquad \times \left[ +ia_0\cos \left( \varphi _1\right) \cos \left( \varphi _2\right) \sin \left( \varphi _3\right) \right. -\left. a_1\sin \left( \varphi _1\right) \sin \left( \varphi _2\right) \cos \left( \varphi _3\right) \right]&|110\rangle \nonumber \\&\qquad \times \left[ -a_0\sin \left( \varphi _1\right) \sin \left( \varphi _2\right) \cos \left( \varphi _3\right) \right. +\left. ia_1\cos \left( \varphi _1\right) \cos \left( \varphi _2\right) \sin \left( \varphi _3\right) \right]&|111\rangle . \end{aligned}$$

Here, we clearly see that (i) if only one of the three \(\varphi \)s is nonzero, i.e., a partial bit-flip error occurs such that a linear superposition of no-error and bit-flip error states occurs, the bit-flip code perfectly restores the corrupted quantum data up to a global phase, (ii) deterministic errors are inherently multi-qubit 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 data-carrying qubit that results in an identical resultant output state that would otherwise be obtained from the entire bit-flip 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

$$\begin{aligned} Q_{\text {b.f.}}(\varphi _1,\varphi _2,\varphi _3) =&\langle 0 | \hat{Q}_{\text {b.f.}} | 0\rangle \nonumber \\ =&\cos ^2(\varphi _1)\cos ^2(\varphi _2)\cos ^2(\varphi _3)+ \cos ^2(\varphi _1)\cos ^2(\varphi _2)\sin ^2(\varphi _3) \nonumber \\ +&\cos ^2(\varphi _1)\sin ^2(\varphi _2)\cos ^2(\varphi _3)+ \sin ^2(\varphi _1)\cos ^2(\varphi _2)\cos ^2(\varphi _3), \end{aligned}$$

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 non-encoded, 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 1-x^2+x^4/3\) and \(\sin ^2(x) \approx x^2-x^4/3\), i.e., \(Q_{\text {b.f.}} \approx 1-O(\varphi ^4)\) (assuming \(\varphi _1\), \(\varphi _2\), and \(\varphi _3\) follow the same statistics), whereas the unencoded quality factor has the form \(1-O(\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 bit-flip code.

Fig. 8
figure 8

(Color online) Circuit diagram of the phase-flip code. As in the case of the bit-flip code in Fig. 7, a red square connected to a green cross denotes a controlled-NOT gate and M denotes a measurement operation. Hgates denote Hadamard gates. The shaded region labeled PHASE FLIP ERROR is the region that is protected from a single-qubit phase-flip error. In analogy to the bit-flip code, encoding and decoding operations precede and follow the error protection region, respectively. A controlled-controlled-NOT gate, denoted by two red squares connected to a single green cross, implements the recovery operation of the phase-flip code

1.2 Phase-flip code

In connection with the bit-flip code in Sect. 1, in this section, we investigate the phase-flip code [16]. The general structure is identical to the bit-flip code; the phase-flip code may be understood as the bit-flip code in a Hadamard space, i.e., the error protection region is sandwiched between Hadamard gates (see Fig. 8),

$$\begin{aligned} H = \left( \begin{array}{cc} \frac{1}{\sqrt{2}}\,\,\, &{} \,\,\,\,\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \,\,\, &{} -\frac{1}{\sqrt{2}} \\ \end{array} \right) , \end{aligned}$$

in addition to the bit-flip code encoding, decoding, and recovery operations.

Once again, we start with the initial data qubit state \(|\psi _{\text {in}}\rangle = a_0|0\rangle + a_1|1\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

$$\begin{aligned} |\psi _{\text {encoded}}^{(\text {p.f.})}\rangle= & {} a_0\left[ \frac{|0\rangle +|1\rangle }{\sqrt{2}} \otimes \frac{|0\rangle +|1\rangle }{\sqrt{2}} \otimes \frac{|0\rangle +|1\rangle }{\sqrt{2}} \right] \nonumber \\&+\, a_1\left[ \frac{|0\rangle -|1\rangle }{\sqrt{2}} \otimes \frac{|0\rangle -|1\rangle }{\sqrt{2}} \otimes \frac{|0\rangle -|1\rangle }{\sqrt{2}} \right] , \end{aligned}$$

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 phase-flip error, the type of deterministic errors that we investigate is of the form

$$\begin{aligned} \tilde{I}_{\text {p.f.}}(\beta ) = \left( \begin{matrix} e^{i\beta } &{} 0 \\ 0 &{} e^{-i\beta } \\ \end{matrix} \right) . \end{aligned}$$

Apart from global phases from each qubit, this produces a result that is essentially identical to the result produced by the bit-flip 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 phase-flip 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 phase-flip code, we obtain, up to a global phase, the decoded state of the phase-flip code

$$\begin{aligned} |\psi ^{(\text {p.f.})}_{\text {recovered}}(\beta _1,\beta _2,\beta _3)\rangle = |\psi ^{(\text {b.f.})}_{\text {recovered}}\left( \varphi _1=\beta _1, \varphi _2=\beta _2,\varphi _3=\beta _3\right) \rangle , \end{aligned}$$

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 phase-flip 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 bit-flip code, the quality factor of the phase-flip 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

$$\begin{aligned} Q_{\text {p.f.}}(\beta _1,\beta _2,\beta _3) = \langle 0 | \hat{Q}_{\text {p.f.}} | 0\rangle = Q_{\text {b.f.}}\left( \varphi _1=\beta _1, \varphi _2=\beta _2,\varphi _3=\beta _3\right) , \end{aligned}$$

where \(\hat{Q}_{\text {p.f.}} = \left| \psi ^{(\text {p.f.})}_{\text {recovered}}\rangle \langle \psi ^{(\text {p.f.})}_{\text {recovered}}\right| \).

Fig. 9
figure 9

(Color online) Circuit diagram of the 9-qubit Shor code. Descriptions of the gates are the same as in Fig. 8. The shaded region labeled SINGLE QUBIT ERROR is the region that is protected from an arbitrary single-qubit error. Both the encoding and decoding operations that precede and follow the error protection region, respectively, contain the phase-flip and bit-flip parts as demarcated by the labeled dashed boxes. The numbers \(1 \ldots 9\) right after the bit-flip part of the encoding region denote the number scheme used in the text for dividing the qubit-groups as in (16) and thereafter

1.3 Shor code

Combining the two error correction codes, namely, the bit-flip code (see Sect. 1) and the phase-flip code (see Sect. 1), the 9-qubit 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 single-qubit 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 bit-flip and phase-flip 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 9-qubit system \(a_0|0\rangle \otimes |00000000\rangle + a_1|1\rangle \otimes |00000000\rangle \), where the first, left-most state denotes the data qubit state, the following 8-digit state denotes the auxiliary 8-qubit 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

$$\begin{aligned} |\psi _{\text {encoded}}^{(\text {Shor})}\rangle =&\frac{a_0}{2\sqrt{2}}(|000\rangle + |111\rangle ) \otimes (|000\rangle + |111\rangle ) \otimes (|000\rangle + |111\rangle ) \nonumber \\ +&\frac{a_1}{2\sqrt{2}}(|000\rangle - |111\rangle ) \otimes (|000\rangle - |111\rangle ) \otimes (|000\rangle - |111\rangle ). \end{aligned}$$

Since the Shor code is capable of correcting an arbitrary single-qubit error [see (1)], the approximate identity gate we introduce here is of the form

$$\begin{aligned} \tilde{I}_{\text {shor}}(\alpha ,\beta ,\varphi ) = \hat{{\mathcal U}}_{2\times 2} = \left( \begin{matrix} e^{i\beta }\cos (\varphi )\,\,\,\, &{} e^{-i\alpha }\sin (\varphi ) \\ -e^{i\alpha }\sin (\varphi )\,\,\,\, &{} e^{-i\beta }\cos (\varphi ) \\ \end{matrix} \right) , \end{aligned}$$

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 bit-flip code part, i.e., the qubit-groups of (1, 2, 3), (4, 5, 6), and (7, 8, 9), which have identical circuitry, then proceed with the remaining phase-flip code part, while being fully aware of the repetitive structure of the bit-flip code part. In particular, we start by rewriting the encoded state as

$$\begin{aligned} |\psi _{\text {encoded}}^{(\text {Shor})}\rangle =&a_0|\psi _{\text {encoded}}^{(1,2,3)}\rangle _{0} \otimes |\psi _{\text {encoded}}^{(4,5,6)}\rangle _{0} \otimes |\psi _{\text {encoded}}^{(7,8,9)}\rangle _{0} \nonumber \\ +&a_1|\psi _{\text {encoded}}^{(1,2,3)}\rangle _{1} \otimes |\psi _{\text {encoded}}^{(4,5,6)}\rangle _{1} \otimes |\psi _{\text {encoded}}^{(7,8,9)}\rangle _{1}, \end{aligned}$$

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 bit-flip code part to be

$$\begin{aligned} |\psi ^{(\text {1,2,3})}\rangle _0 \rightarrow |\psi ^{(\text {1,2,3})}\rangle '_0 = \frac{1}{2} \bigg \{&\left[ \phi ^{(1,2,3)}_{000}|0\rangle + \phi ^{(1,2,3)}_{100}|1\rangle \right] |00\rangle \nonumber \\&\quad +\,\left[ \phi ^{(1,2,3)}_{001}|0\rangle + \phi ^{(1,2,3)}_{101}|1\rangle \right] |01\rangle \nonumber \\&\quad +\,\left[ \phi ^{(1,2,3)}_{010}|0\rangle + \phi ^{(1,2,3)}_{110}|1\rangle \right] |10\rangle \nonumber \\&\quad +\,\left[ \phi ^{(1,2,3)}_{011}|0\rangle + \phi ^{(1,2,3)}_{111}|1\rangle \right] |11\rangle \bigg \}, \nonumber \\ |\psi ^{(\text {1,2,3})}\rangle _1 \rightarrow |\psi ^{(\text {1,2,3})}\rangle '_1 = \frac{1}{2}\bigg \{&\left[ \theta ^{(1,2,3)}_{000}|0\rangle + \theta ^{(1,2,3)}_{100}|1\rangle \right] |00\rangle \nonumber \\&\quad +\,\left[ \theta ^{(1,2,3)}_{001}|0\rangle + \theta ^{(1,2,3)}_{101}|1\rangle \right] |01\rangle \nonumber \\&\quad +\,\left[ \theta ^{(1,2,3)}_{010}|0\rangle + \theta ^{(1,2,3)}_{110}|1\rangle \right] |10\rangle \nonumber \\&\quad +\,\left[ \theta ^{(1,2,3)}_{011}|0\rangle + \theta ^{(1,2,3)}_{111}|1\rangle \right] |11\rangle \bigg \}, \end{aligned}$$


$$\begin{aligned} \phi ^{(l,m,n)}_{000}&= C_lC_mC_n[2\text {Re}(B_lB_mB_n)] -iS_lS_mS_n[2\text {Im}(A_lA_mA_n)] \nonumber \\ \phi ^{(l,m,n)}_{100}&= iC_lC_mC_n[2\text {Im}(B_lB_mB_n)] +S_lS_mS_n[2\text {Re}(A_lA_mA_n)] \nonumber \\ \phi ^{(l,m,n)}_{001}&= -iC_lC_mS_n[2\text {Im}(B_lB_mA_n)] +S_lS_mC_n[2\text {Re}(A_lA_mB_n)] \nonumber \\ \phi ^{(l,m,n)}_{101}&= -C_lC_mS_n[2\text {Re}(B_lB_mA_n)] -iS_lS_mC_n[2\text {Im}(A_lA_mB_n)] \nonumber \\ \phi ^{(l,m,n)}_{010}&= -iC_lS_mC_n[2\text {Im}(B_lA_mB_n)] +S_lC_mS_n[2\text {Re}(A_lB_mA_n)] \nonumber \\ \phi ^{(l,m,n)}_{110}&= -C_lS_mC_n[2\text {Re}(B_lA_mB_n)] -iS_lC_mS_n[2\text {Im}(A_lB_mA_n)] \nonumber \\ \phi ^{(l,m,n)}_{011}&= C_lS_mS_n[2\text {Re}(B_lA_mA_n)] -iS_lC_mC_n[2\text {Im}(A_lB_mB_n)] \nonumber \\ \phi ^{(l,m,n)}_{111}&= -iC_lS_mS_n[2\text {Im}(B_lA_mA_n)] -S_lC_mC_n[2\text {Re}(A_lB_mB_n)] \end{aligned}$$


$$\begin{aligned} \theta ^{(l,m,n)}_{000}&= iC_1C_2C_3[2\text {Im}(B_1B_2B_3)] -S_1S_2S_3[2\text {Re}(A_1A_2A_3)] \nonumber \\ \theta ^{(l,m,n)}_{100}&= C_1C_2C_3[2\text {Re}(B_1B_2B_3)]+iS_1S_2S_3[2\text {Im}(A_1A_2A_3)] \nonumber \\ \theta ^{(l,m,n)}_{001}&= -C_1C_2S_3[2\text {Re}(B_1B_2A_3)]+iS_1S_2C_3[2\text {Im}(A_1A_2B_3)] \nonumber \\ \theta ^{(l,m,n)}_{101}&=-iC_1C_2S_3[2\text {Im}(B_1B_2A_3)] -S_1S_2C_3[2\text {Re}(A_1A_2B_3)] \nonumber \\ \theta ^{(l,m,n)}_{010}&=-C_1S_2C_3[2\text {Re}(B_1A_2B_3)] +iS_1C_2S_3[2\text {Im}(A_1B_2A_3)] \nonumber \\ \theta ^{(l,m,n)}_{110}&=-iC_1S_2C_3[2\text {Im}(B_1A_2B_3)] -S_1C_2S_3[2\text {Re}(A_1B_2A_3)] \nonumber \\ \theta ^{(l,m,n)}_{011}&= iC_1S_2S_3[2\text {Im}(B_1A_2A_3)] -S_1C_2C_3[2\text {Re}(A_1B_2B_3)] \nonumber \\ \theta ^{(l,m,n)}_{111}&=-C_1S_2S_3[2\text {Re}(B_1A_2A_3)] -iS_1C_2C_3[2\text {Im}(A_1B_2B_3)], \end{aligned}$$

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

$$\begin{aligned} |\psi _{\text {intermediate}}\rangle&= a_0|\psi ^{(1,2,3)}\rangle '_0 \otimes |\psi ^{(4,5,6)}\rangle '_0 \otimes |\psi ^{(7,8,9)}\rangle '_0 \nonumber \\&\quad +\,a_1|\psi ^{(1,2,3)}\rangle '_1 \otimes |\psi ^{(4,5,6)}\rangle '_1 \otimes |\psi ^{(7,8,9)}\rangle '_1. \end{aligned}$$

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

$$\begin{aligned} |\psi _{\text {recovered}}\rangle = a_0|\psi _{\text {recovered}}\rangle _0 + a_1|\psi _{\text {recovered}}\rangle _1, \end{aligned}$$


$$\begin{aligned} |\psi _{\text {recovered}}\rangle _0 = \frac{1}{8}\left\{ \left( \sum _{\mu ,\nu } \phi ^{(1,2,3)}_{0\mu \nu }|0\mu \nu \rangle \right) \right. \otimes \left[ \left( \sum _{\mu ',\nu '}\phi ^{(4,5,6)}_{0\mu '\nu '}|0\mu '\nu '\rangle \right) \right. \otimes&\left( \sum _{\mu '',\nu ''}\phi ^{(7,8,9)}_{0\mu ''\nu ''}|0\mu ''\nu ''\rangle \right) \nonumber \\ +\,\left( \sum _{\mu ',\nu '}\phi ^{(4,5,6)}_{0\mu '\nu '}|0\mu '\nu '\rangle \right) \otimes&\left( \sum _{\mu '',\nu ''}\phi ^{(7,8,9)}_{1\mu ''\nu ''}|1\mu ''\nu ''\rangle \right) \nonumber \\ +\,\left( \sum _{\mu ',\nu '}\phi ^{(4,5,6)}_{1\mu '\nu '}|1\mu '\nu '\rangle \right) \otimes&\left. \left( \sum _{\mu '',\nu ''}\phi ^{(7,8,9)}_{0\mu ''\nu ''}|0\mu ''\nu ''\rangle \right) \right] \nonumber \\ +\,\left( \sum _{\mu ,\nu } \phi ^{(1,2,3)}_{0\mu \nu }|1\mu \nu \rangle \right) \otimes \left[ \left( \sum _{\mu ',\nu '}\phi ^{(4,5,6)}_{1\mu '\nu '}|1\mu '\nu '\rangle \right) \right. \otimes&\left. \left( \sum _{\mu '',\nu ''}\phi ^{(7,8,9)}_{1\mu ''\nu ''}|1\mu ''\nu ''\rangle \right) \right] \nonumber \\ +\,\left( \sum _{\mu ,\nu } \phi ^{(1,2,3)}_{1\mu \nu }|1\mu \nu \rangle \right) \otimes \left[ \left( \sum _{\mu ',\nu '}\phi ^{(4,5,6)}_{1\mu '\nu '}|0\mu '\nu '\rangle \right) \right. \otimes&\left( \sum _{\mu '',\nu ''}\phi ^{(7,8,9)}_{1\mu ''\nu ''}|0\mu ''\nu ''\rangle \right) \nonumber \\ +\,\left( \sum _{\mu ',\nu '}\phi ^{(4,5,6)}_{1\mu '\nu '}|0\mu '\nu '\rangle \right) \otimes&\left( \sum _{\mu '',\nu ''}\phi ^{(7,8,9)}_{0\mu ''\nu ''}|1\mu ''\nu ''\rangle \right) \nonumber \\ +\,\left( \sum _{\mu ',\nu '}\phi ^{(4,5,6)}_{0\mu '\nu '}|1\mu '\nu '\rangle \right) \otimes&\left. \left( \sum _{\mu '',\nu ''}\phi ^{(7,8,9)}_{1\mu ''\nu ''}|0\mu ''\nu ''\rangle \right) \right] \nonumber \\ +\,\left( \sum _{\mu ,\nu } \phi ^{(1,2,3)}_{1\mu \nu }|0\mu \nu \rangle \right) \otimes \left[ \left( \sum _{\mu ',\nu '}\phi ^{(4,5,6)}_{0\mu '\nu '}|1\mu '\nu '\rangle \right) \right. \otimes&\left. \left. \left( \sum _{\mu '',\nu ''}\phi ^{(7,8,9)}_{0\mu ''\nu ''}|1\mu ''\nu ''\rangle \right) \right] \right\} , \end{aligned}$$

where \(\mu \) and \(\nu \), their primes, and double-primes 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 single-qubit 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.

1.4 [5,1,3] Perfect code

When it comes to the single-qubit 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.

Fig. 10
figure 10

(Color online) Partial circuit diagrams of the [5, 1, 3] stabilizer error correction code. a Encoding circuit. b Syndrome extraction circuit. Y and Z gates connected to red squares indicate controlled-Pauli-Y and controlled-Pauli-Z gates, respectively. \(H_y\) gates are the y-Hadamard gates, as described in the text. Demarcation (dashed) lines in b denote the four structurally similar groups addressed in the text

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

$$\begin{aligned} |\psi _{\text {encoded}}^{(\text {[5,1,3]})}\rangle = a_0|0\rangle _{\text {L}}+a_1|1\rangle _{\text {L}}, \end{aligned}$$

given the initial data qubit state of \(a_0|0\rangle + a_1|1\rangle \) with \(|a_0|^2+|a_1|^2\), where

$$\begin{aligned} |0\rangle _{\text {L}} = \frac{1}{4} (&|00000\rangle -|00011\rangle +|00101\rangle -|00110\rangle \nonumber \\&\quad +\,|01001\rangle +|01010\rangle -|01100\rangle -|01111\rangle \nonumber \\&\quad -\,|10001\rangle +|10010\rangle +|10100\rangle -|10111\rangle \nonumber \\&\quad -\,|11000\rangle -|11011\rangle -|11101\rangle -|11110\rangle ), \end{aligned}$$


$$\begin{aligned} |1\rangle _{\text {L}} = \frac{1}{4} (&|00001\rangle +|00010\rangle -|00100\rangle +|00111\rangle \nonumber \\&\quad +\,|01000\rangle -|01011\rangle -|01101\rangle +|01110\rangle \nonumber \\&\quad +\,|10000\rangle +|10011\rangle -|10101\rangle -|10110\rangle \nonumber \\&\quad +\,|11001\rangle -|11010\rangle +|11100\rangle -|11111\rangle ). \end{aligned}$$

Since the [5, 1, 3] quantum stabilizer code is also capable of correcting an arbitrary single-qubit 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 off-diagonal 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 data-encoding qubits, (b) four controlled-NOT 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 data-encoding 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 single-qubit, unitary error \(\tilde{I}_{\text {shor}}\) may be corrected via the [5, 1, 3] code, provided that no other gates are error-prone, (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 small-L and large-L 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:

$$\begin{aligned} || A || = \max _j \sum _i |a_{ij}|, \end{aligned}$$

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 = 1-||R(\theta )-\tilde{U}_L(\varDelta )||\), where \(R(\theta )\) is the rotation gate with rotation angle \(\theta \) and \(\tilde{U}_L(\varDelta )\) is the L-long sequence-approximated, noise \(\sigma \)-introduced rotation gate. Explicitly, \(F_R\) reads

$$\begin{aligned} F_R = 1- \max _{j}\sum _i |r_{ij}-\tilde{u}_{ij}|, \end{aligned}$$

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:

$$\begin{aligned} F_R = 1- \max _{j}\sum _i |(r_{ij}-u_{ij})-(\tilde{u}_{ij}-u_{ij})|. \end{aligned}$$

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

$$\begin{aligned} \max _{j}\sum _i |r_{ij}-u_{ij}| = \exp (-cL), \end{aligned}$$

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:

$$\begin{aligned} F_R \approx 1-\max _{j}\sum _i |r_{ij}-u_{ij}| = 1- \exp (-cL). \end{aligned}$$

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 small-L 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

$$\begin{aligned} F_R \approx 1-\max _{j}\sum _i |\tilde{u}_{ij}-u_{ij}|. \end{aligned}$$

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

$$\begin{aligned} F_R \approx 1- \max _{j}\sum _i |\tilde{u}_{ij}-r_{ij}|. \end{aligned}$$

At this point we notice that we have explicit expressions for both \(\tilde{u}_{ij}\) [see (1)] and

$$\begin{aligned} r = \left( \begin{matrix} e^{i\bar{\beta }} \,\,&{} 0 \\ 0 \,\,&{} e^{-i\bar{\beta }} \\ \end{matrix} \right) , \end{aligned}$$

where \(\bar{\beta }\) is the desired rotation angle. We also notice that

$$\begin{aligned} \sum _i |\tilde{u}_{ij}-r_{ij}| = [1-2\cos (\beta -\bar{\beta })\cos (\varphi )+\cos ^2(\varphi )]^{1/2} + |\sin (\varphi )|, \end{aligned}$$

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:

$$\begin{aligned} F_R \approx 1- [1-2\cos (\beta -\bar{\beta })\cos (\varphi )+\cos ^2(\varphi )]^{1/2} - |\sin (\varphi )|. \end{aligned}$$

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

$$\begin{aligned} F_R \approx 1 - \langle [1-2\cos (\beta -\bar{\beta })\cos (\varphi )+\cos ^2(\varphi )]^{1/2} \rangle - \langle |\sin (\varphi )| \rangle . \end{aligned}$$

The computation of \(\langle |\sin (\varphi )| \rangle \) is elementary and can be done analytically. The result is

$$\begin{aligned} \langle |\sin (\varphi )| \rangle&= \int _0^{\infty } \sin (\varphi ) D(\varphi ) \mathrm{d}\varphi = \int _0^{\infty } \sin (\varphi ) 2a\varphi \exp (-a\varphi ^2) \mathrm{d}\varphi \nonumber \\&= \sqrt{\frac{\pi }{4a}} \exp [-1/(4a)]. \end{aligned}$$

Since \(1/a \sim \sigma ^2 L\) is very small, we can also write

$$\begin{aligned} \langle |\sin (\varphi )| \rangle \approx \sqrt{\frac{\pi }{4a}} = \gamma _1\sigma \sqrt{L}, \end{aligned}$$

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

$$\begin{aligned}&\langle [1-2\cos (x)\cos (\varphi )+\cos ^2(\varphi )]^{1/2} \rangle \approx \langle |x| \rangle \nonumber \\&= 2 \int _0^{\infty } x G_{0,\epsilon }(x) \mathrm{d}x = 2 \int _0^{\infty } x \frac{1}{\sqrt{2\pi }\epsilon } \exp [-x^2/(2\epsilon ^2)] \mathrm{d}x \nonumber \\&= \sqrt{\frac{2}{\pi }}\,\epsilon = \gamma _2\sigma \sqrt{L}, \end{aligned}$$

where \(\gamma _2\) is a constant. Collecting terms [see (38) and (39)], we now obtain in the large-L limit:

$$\begin{aligned} F_R \approx 1-\gamma \sigma \sqrt{L}, \end{aligned}$$

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 small-L and large-L 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

$$\begin{aligned} F_R \approx e^{-\gamma \sigma \sqrt{L}} - e^{-cL} \end{aligned}$$


$$\begin{aligned} F_R \approx e^{-\gamma \sigma \sqrt{L}} \left( 1 - e^{-cL} \right) . \end{aligned}$$

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 finite-length 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

$$\begin{aligned} e^{-cL} = \left( \frac{\gamma \sigma }{2c}\right) \, \frac{1}{\sqrt{L}}, \end{aligned}$$

which, taking logarithms on both sides, can also be written as

$$\begin{aligned} L = \frac{1}{c} \ln \left( \frac{2c}{\gamma \sigma }\right) + \frac{1}{2c} \ln (L). \end{aligned}$$

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

$$\begin{aligned} L_{\text {opt}} = \frac{1}{c} \ln \left( \frac{2\sqrt{c}}{\gamma \sigma }\right) + \frac{1}{2c} \ln \ln \left( \frac{2c}{\gamma \sigma }\right) . \end{aligned}$$

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

$$\begin{aligned} \tilde{u}^{(L)}_{11} = \sum _{n=1}^{2^{L-1}} g_n^{(11)}, \end{aligned}$$


$$\begin{aligned} g_n^{(11)} = \prod _{i=1}^{L} f_{i} \end{aligned}$$

is an element of the set \(G_{11,L}\) with size \(2^{L-1}\) of L-tuple 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,

$$\begin{aligned} f_{i} \in \{e^{i\beta _i}\cos (\varphi _i), e^{-i\beta _i}\cos (\varphi _i), e^{i\alpha _i}\sin (\varphi _i), -e^{-i\alpha _i}\sin (\varphi _i)\}. \end{aligned}$$

While tedious, it can be shown straightforwardly that all L-tuple elements \(g_n^{(11)}\) may be obtained by first writing out all possible L-long 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,

$$\begin{aligned} \tilde{u}^{(1)}_{11}&=e^{i\beta _1}\cos (\varphi _1), \nonumber \\ \tilde{u}^{(2)}_{11}&=e^{i\beta _1}e^{i\beta _2}\cos (\varphi _1)\cos (\varphi _2) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\alpha _2}\sin (\varphi _1)\sin (\varphi _2), \nonumber \\ \tilde{u}^{(3)}_{11}&= e^{i\beta _1}e^{i\beta _2}e^{i\beta _3}\cos (\varphi _1)\cos (\varphi _2)\cos (\varphi _3) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\alpha _2}e^{i\beta _3}\sin (\varphi _1)\sin (\varphi _2)\cos (\varphi _3) \nonumber \\&\quad -\,e^{i\beta _1}e^{i\alpha _2}e^{-i\alpha _3}\cos (\varphi _1)\sin (\varphi _2)\sin (\varphi _3) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\beta _2}e^{-i\alpha _3}\sin (\varphi _1)\cos (\varphi _2)\sin (\varphi _3), \nonumber \\ \tilde{u}^{(4)}_{11}&=e^{i\beta _1}e^{i\beta _2}e^{i\beta _3}e^{i\beta _4} \cos (\varphi _1)\cos (\varphi _2)\cos (\varphi _3)\cos (\varphi _4) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\alpha _2}e^{i\beta _3}e^{i\beta _4} \sin (\varphi _1)\sin (\varphi _2)\cos (\varphi _3)\cos (\varphi _4) \nonumber \\&\quad -\,e^{i\beta _1}e^{i\alpha _2}e^{-i\alpha _3}e^{i\beta _4} \cos (\varphi _1)\sin (\varphi _2)\sin (\varphi _3)\cos (\varphi _4) \nonumber \\&\quad -\,e^{i\beta _1}e^{i\beta _2}e^{i\alpha _3}e^{-i\alpha _4} \cos (\varphi _1)\cos (\varphi _2)\sin (\varphi _3)\sin (\varphi _4) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\beta _2}e^{-i\alpha _3}e^{i\beta _4} \sin (\varphi _1)\cos (\varphi _2)\sin (\varphi _3)\cos (\varphi _4) \nonumber \\&\quad -\,e^{i\beta _1}e^{i\alpha _2}e^{-i\beta _3}e^{-i\alpha _4} \cos (\varphi _1)\sin (\varphi _2)\cos (\varphi _3)\sin (\varphi _4) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\beta _2}e^{-i\beta _3}e^{-i\alpha _4} \sin (\varphi _1)\cos (\varphi _2)\cos (\varphi _3)\sin (\varphi _4) \nonumber \\&\quad +\,e^{i\alpha _1}e^{-i\alpha _2}e^{i\alpha _3}e^{-i\alpha _4} \sin (\varphi _1)\sin (\varphi _2)\sin (\varphi _3)\sin (\varphi _4). \end{aligned}$$

We also note that the corresponding off-diagonal elements \(\tilde{u}^{(L)}_{12}\) read

$$\begin{aligned} \tilde{u}^{(1)}_{12}&=e^{i\alpha _1}\sin (\varphi _1), \nonumber \\ \tilde{u}^{(2)}_{12}&=e^{i\beta _1}e^{i\alpha _2}\cos (\varphi _1)\sin (\varphi _2) \nonumber \\&\quad +\,e^{i\alpha _1}e^{-i\beta _2}\sin (\varphi _1)\cos (\varphi _2), \nonumber \\ \tilde{u}^{(3)}_{12}&= e^{i\beta _1}e^{i\beta _2}e^{i\alpha _3}\cos (\varphi _1)\cos (\varphi _2)\sin (\varphi _3) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\alpha _2}e^{i\alpha _3}\sin (\varphi _1)\sin (\varphi _2)\sin (\varphi _3) \nonumber \\&\quad +e^{i\beta _1}e^{i\alpha _2}e^{-i\beta _3}\cos (\varphi _1)\sin (\varphi _2)\cos (\varphi _3) \nonumber \\&\quad +\,e^{i\alpha _1}e^{-i\beta _2}e^{-i\beta _3}\sin (\varphi _1)\cos (\varphi _2)\cos (\varphi _3), \nonumber \\ \tilde{u}^{(4)}_{12}&= e^{i\beta _1}e^{i\beta _2}e^{i\beta _3}e^{i\alpha _4} \cos (\varphi _1)\cos (\varphi _2)\cos (\varphi _3)\sin (\varphi _4) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\alpha _2}e^{i\beta _3}e^{i\alpha _4} \sin (\varphi _1)\sin (\varphi _2)\cos (\varphi _3)\sin (\varphi _4) \nonumber \\&\quad -\,e^{i\beta _1}e^{i\alpha _2}e^{-i\alpha _3}e^{i\alpha _4} \cos (\varphi _1)\sin (\varphi _2)\sin (\varphi _3)\sin (\varphi _4) \nonumber \\&\quad +\,e^{i\beta _1}e^{i\beta _2}e^{i\alpha _3}e^{-i\beta _4} \cos (\varphi _1)\cos (\varphi _2)\sin (\varphi _3)\cos (\varphi _4) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\beta _2}e^{-i\alpha _3}e^{i\alpha _4} \sin (\varphi _1)\cos (\varphi _2)\sin (\varphi _3)\sin (\varphi _4) \nonumber \\&\quad +\,e^{i\beta _1}e^{i\alpha _2}e^{-i\beta _3}e^{-i\beta _4} \cos (\varphi _1)\sin (\varphi _2)\cos (\varphi _3)\cos (\varphi _4) \nonumber \\&\quad +\,e^{i\alpha _1}e^{-i\beta _2}e^{-i\beta _3}e^{-i\beta _4} \sin (\varphi _1)\cos (\varphi _2)\cos (\varphi _3)\cos (\varphi _4) \nonumber \\&\quad -\,e^{i\alpha _1}e^{-i\alpha _2}e^{i\alpha _3}e^{-i\beta _4} \sin (\varphi _1)\sin (\varphi _2)\sin (\varphi _3)\cos (\varphi _4). \end{aligned}$$

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. 1.

    \(\beta \)-statistics

    Assuming that the L-long 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 Gaussian-distributed, 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 noise-free case, we obtain, for the individual constituent basis gates’ error level \(\sigma \) and an L-long sequence, the variance of the resulting Gaussian distribution function to be \(\epsilon ^2 \sim \sigma ^2 L\).

  2. 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 off-diagonal 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 off-diagonal 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 off-diagonal 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^{L-1}}|g_n^{(12)}|\text {Im}\left( \frac{g_n^{(12)}}{|g_n^{(12)}|}\right) }{\displaystyle \sum _{n'=1}^{2^{L-1}}|g_{n'}^{(12)}|\text {Re}\left( \frac{g_{n'}^{(12)}}{|g_{n'}^{(12)}|}\right) }, \end{aligned}$$

    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’ noise-free 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}$$

    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}$$

    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 half-max full-width 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 noise-free 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. 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 second-order 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

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Nam, Y.S., Blümel, R. Optimal length of decomposition sequences composed of imperfect gates. Quantum Inf Process 16, 123 (2017).

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: