Manuscript Offprint
arXiv:2609.37636Resonance Breaking in Noisy Shor's Algorithm
Abstract
We argue that the exponential quantum advantage in Shor’s algorithm is broken under one-layer depolarizing noise of arbitrary small error rate, by analyzing a resonance breaking phenomenon in noisy quantum circuits. First, we express the distribution of measurements on n-qubit strings as the superposition of the wave functions in the Pauli path integral. In the noiseless case, the bit-strings achieving resonant peaks guaranteed a constant rate of successful measurements to factor a large number. Secondly, when the middle layer of the quantum circuit has independent depolarizing noise of rate , for any Hamming weight , we obtain corresponding measurement rate bounded by for higher frequency terms and by for low frequency terms. The rate approaches to zero as and approaches to infinity. Resonance breaking destroys the exponential quantum advantage. Furthermore, we design a classical factoring algorithm in polynomial time to substitute the low frequency contribution.
1 Introduction
Shor's factoring algorithm sparked widespread interest in quantum computing. By establishing polynomial-time integer factorization on an ideal quantum computer [1], it offered a concrete prospect of an exponential computational advantage for a problem of direct cryptographic significance [2]. Realizing this advantage in practice has become a major goal of quantum computing research [3–7]. Shor's algorithm relies on quantum amplitudes adding constructively to produce peaks in the measurement distribution that encode the order. Noise can disrupt the relative phases of these amplitudes, weakening their constructive interference, and reducing the probability of obtaining outcomes near the peaks. Recently, Cai proved that random angular errors in Fourier gates can make the probability of useful order-finding results negligible, preventing efficient factorization even when noise strength decreases with input size [8]. Early studies investigated how decoherence and dissipation affect the performance of Shor's algorithm [9–11].
Inspired by the Quon classical simulation framework, where the number of remaining “Magic holes” governs the cost of its classical simulation algorithm [12], we observed that quantum advantage comes from composing different types of quantum circuits, such as Clifford circuits [13] or matchgate circuits [14, 15]. In contrast, if the composition boundary of different types of circuits has noise, then the noise can severely degrade the exponential quantum advantage of the quantum circuit.
We analyze this phenomenon in Shor’s algorithm to factor a large number N for a given number a with order . More precisely, we apply independent single-qubit depolarizing noise of rate to the n-qubit control register between modular exponentiation and the inverse Fourier transform, with all other operations ideal. First, we present the resonance effect of exponentially many wave functions in the Pauli path integral [16–22] for Shor’s quantum circuit. The probability of measuring a bit-string x is
*Email: liuzhengwei@mail.tsinghua.edu.cn where and is the Hamming distance between the binary expansions of and . For the case without noise, namely , the phases , for , achieves resonance peaks at in the following set
Then applying the continued fraction theorem to such one can find the order and then a non-trivial factor of the large number . The successful measurement rate is guaranteed by the crucial lower bound
Secondly, we show that the resonance breaks when the noise rate . For any Hamming weight , the high frequency terms will diminish exponentially proportion to , and the low frequency terms have a bound .
As and , it approaches to zero. The successful measurement rate is no longer guaranteed. The resonance breaking phenomenon destroys the exponential quantum advantage.
For a fixed , we further present a classical algorithm in polynomial time to substitute the low frequency contributions. To keep the same exponential factor , when the noise rate decreases, the degree increases. Quantum error correction [23–25] may help improve performance, and the threshold theorem allows arbitrarily small logical error rates below the threshold under suitable noise assumptions [26–28], achieving this suppression requires additional physical qubits and repeated correction operations [29–31]. In practice, the polynomial degree may grow too high to be achieved by a classical computer, while reducing the noisy rate using quantum error corrections on a quantum computer remains challenging as well [32].
We hope that our analysis of the frequency decomposition of resonant wave functions in the Pauli path integral will shed light on the theoretical understanding of exponential quantum advantage in quantum circuits. The resonance breaking phenomenon allows us to analyze a polynomial time classical simulation to a single noisy circuit, instead of the average behavior of random noisy circuits. Resonance seems essential to achieve a reasonable measurement rate, as every path only contributes to an exponentially small rate in the path integral. The higher frequency contribution may be compressed exponentially by noise and the lower frequency contribution may be substituted by a corresponding classical algorithm in polynomial time.
which can be implemented by a quantum circuit of elementary gates.
Suppose N is a large number, e.g., for a pair of prime numbers in RSA cryptography. Take the qubit number n, such that
Choose a number , e.g. , and first compute . If this gcd is nontrivial, it already gives a factor of . Otherwise, assume . Shor established a quantum circuit to find the multiplicative order of a modulo . The order is called good, if is even and and . For a good ,
and both and are non-trivial factors of . When is odd and has at least two distinct prime factors, repeated independent trials with uniformly random yield a good order with high probability [1].
Shor applied the following quantum circuit to find the order r.

The controlled transformation apply to bottom line as the multiplication by . We simplify the quantum circuit presentation as follows:

Considering as a superposition of all , the state after is
After tracing out the second register, the probability of measuring is
(9)
where the second equality follows by exchanging u and v.
When for some integer , Eq. (6) and give
Then the continued fraction theorem implies that the reduced form of appears among the convergents of , which can be computed in time polynomial in [1, 33]. The denominator is , where is the greatest common divisor. The order can be tested through the condition . If , then we obtain the order . Otherwise, one can sample different measurement , and choose multiple for different , and then test their least common multiple (lcm) as a candidate for the order [1].
Note that
When approaches , the phase approaches 1. Then as their resonant sum approaches approximately to . When increases from 0 to , the probability decreases from to up to a small error as shown in [1, 33]. Summing these peak bounds yields the crucial constant bound for the effective measurements
Combined with repeated sampling, classical post-processing and random choices of a, this gives a constant overall success probability using polynomial time [1, 34].
In Shor’s factoring algorithm, the quantum circuit is to find the order r of a through measurements, in addition to the classical algorithm of the continued fraction theorem.
3 Resonance breaking under one layer noise
Now let us analyze noisy Shor’s algorithm. The depolarizing noise of a single qubit is a quantum channel with noise rate , defined by
for every single-qubit density matrix . Thus is the noiseless case, while every traceless Pauli operator is contracted by the coherence factor . We add a one-layer depolarizing noise to the most fragile part of Shor's quantum circuit, which acts on the qubits between the controlled unitary and . Let be the probability of -qubit measuring , which is presented as follows:

Here, we applied that .
Proposition 3.1. For the Shor circuit with single-qubit depolarizing noise rate , the probability of measuring x is
where is the Hamming distance between the binary expansions of u and v.
Proof. We analyze through the Pauli path expansion. We represent the depolarizing channel in terms of the Pauli basis:
and
The sum is over all -qubit Pauli words , where , and . The expansion follows from
For a formal evaluation of the diagram, let
The Fourier state factors as
and hence
On each tensor factor, the diagonal matrix elements are unchanged by , while the off-diagonal elements are multiplied by . Therefore
The channel is self-adjoint with respect to the Hilbert–Schmidt inner product. Using the control-register state from the previous section, we obtain
where the last line follows by exchanging u and v.
Each matching Pauli word gives a path contributing to . In the ideal circuit all compatible paths retain their full weight resonance at an effective . The factor shows that depolarizing noise contracts a path once for every non-identity Pauli factor, which makes this resonance fragile.
Note that , for the Hamming weight of and in binary. There is a unique pair such that
The bit strings of and are different at positions, and zero elsewhere. We call the Minimal Weight Representative of . There are exactly pairs with the same minimal weight representative for all possible choices of bit strings at the rest positions. Therefore
Denote the set of minimal weight representatives with Hamming weight at most d by
with cardinality .
Theorem 3.2. For the Shor circuit with single-qubit depolarizing noise rate and any integer , the probability of outcome is bounded as
Here is the number of minimal representative pairs such that , with Hamming weight .
Proof. In Eq. (22), there are terms in the sum with low weight and each term is bounded by . So the sum of these low weight terms is bounded by . In Eq. (14), every term with high weight is bounded in absolute value by . The total number of terms is bounded by . Hence the absolute value of the sum of the high-weight terms is bounded by . Therefore, is bounded by the sum of the two bounds.
There is also a simple bound independent of r:
(25) for every fixed . Indeed, a minimal representative of weight is specified by choosing its nonzero positions and, at every such position, choosing whether the nonzero bit belongs to or to . The additional condition can only reduce this count.
To state the consequence for the usual resonance peaks precisely, define
There are at most 2r outcomes in . Hence the theorem, , and imply
(27)
For every fixed noise rate , Eq. (25) and Eq. (27) give
Indeed, for each fixed the first term vanishes as grows, and then can be chosen large enough to make arbitrarily small. Thus the constant lower bound in Eq. (12) is destroyed by any fixed positive noise rate in this one-layer model.
Now for a fixed n, let us discuss what the bound of lower frequency terms says about Shor's factoring algorithm. For a fixed d, denote the set of binary numbers with Hamming weight at most d by
The set has elements. For each , the residue can be computed by repeated squaring. In this way all elements of can be listed in polynomial time . They will produce all pairs of in . For each pair in , denote their difference as . Then
If the quotients behaved like independent random positive integers, the asymptotic probability that their gcd is one would be
which equals for and approaches one exponentially in . This is only a heuristic argument which does not guarantee that the gcd is exactly the order .
In summary, the measurement distribution under one layer of independent depolarizing noise splits into a low-Hamming-weight sector whose modular relations can be enumerated classically for fixed and a high-weight sector suppressed by . This result is specific to the near-resonant event and to the stated single-layer noise model. It does not prove an efficient classical simulation of the full noisy circuit, exclude other successful post-processing events, or rule out a fault-tolerant quantum advantage. With quantum error correction the effective logical noise rate may depend on and approach zero; that scaling and its overhead must be analyzed separately.
Acknowledgments
Z.L. acknowledges support from the Beijing Natural Science Foundation (Grant No. Z220002).
References
[1] P. W. Shor, SIAM Journal on Computing 26, 1484 (1997).
[2] R. L. Rivest, A. Shamir, and L. Adleman, Communications of the ACM 21, 120 (1978).
[3] C. Gidney and M. Ekerå, Quantum 5, 433 (2021).
[4] É. Gouzien and N. Sangouard, Physical Review Letters 127, 140503 (2021).
[5] C. Gidney, arXiv preprint arXiv:2505.15917 10.48550/arXiv.2505.15917 (2025), arXiv:2505.15917 [quant-ph].
[6] P. Webster, L. Berent, O. Chandra, E. T. Hockings, N. Baspin, F. Thomsen, S. C. Smith, and L. Z. Cohen, The Pinnacle architecture: Reducing the cost of breaking RSA-2048 to 100 000 physical qubits using quantum LDPC codes (2026), arXiv:2602.11457 [quant-ph].
[7] M. Cain, Q. Xu, R. King, L. R. B. Picard, H. Levine, M. Endres, J. Preskill, H.-Y. Huang, and D. Bluvstein, Shor's algorithm is possible with as few as 10,000 reconfigurable atomic qubits (2026), arXiv:2603.28627 [quant-ph].
[8] J.-Y. Cai, Science China Information Sciences 67, 173501 (2024).
[9] I. L. Chuang, R. Laflamme, P. W. Shor, and W. H. Zurek, Science 270, 1633 (1995).
[10] C. Miquel, J. P. Paz, and R. Perazzo, Physical Review A 54, 2605 (1996).
[11] A. Barenco, A. Ekert, K.-A. Suominen, and P. Törmä, Physical Review A 54, 139 (1996).
[12] Z. Feng, Z. Liu, F. Lu, and N. Wang, arXiv preprint arXiv:2505.07804 (2025).
[13] S. Aaronson and D. Gottesman, Physical Review A 70, 052328 (2004).
[14] L. G. Valiant, SIAM Journal on Computing 31, 1229 (2002).
[15] R. Jozsa and A. Miyake, Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences 464, 3089 (2008).
[16] X. Gao and L. Duan, Efficient classical simulation of noisy quantum computation (2018), arXiv:1810.03176 [quant-ph].
[17] D. Aharonov, X. Gao, Z. Landau, Y. Liu, and U. V. Vazirani, in Proceedings of the 55th Annual ACM Symposium on Theory of Computing (Association for Computing Machinery, 2023) pp. 945–957.
[18] Y. Shao, F. Wei, S. Cheng, and Z. Liu, Physical Review Letters 133, 120603 (2024).
[19] E. Fontana, M. S. Rudolph, R. Duncan, I. Rungger, and C. Cirstoiu, npj Quantum Information 11, 84 (2025).
[20] G. González-García, J. I. Cirac, and R. Trivedi, Quantum 9, 1730 (2025).
[21] V. Martinez, A. Angrisani, E. Pankovets, O. Fawzi, and D. Stilck França, Physical Review Letters 134, 250602 (2025).
[22] Y. Shao, Z. Chen, Z. Wei, and Z. Liu, Diagnosing quantum circuits: Noise robustness, trainability, and expressibility (2025), arXiv:2509.11307 [quant-ph].
[23] P. W. Shor, Physical Review A 52, R2493 (1995).
[24] A. M. Steane, Physical Review Letters 77, 793 (1996).
[25] E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Journal of Mathematical Physics 43, 4452 (2002).
[26] D. Aharonov and M. Ben-Or, SIAM Journal on Computing 38, 1207 (2008).
[27] E. Knill, R. Laflamme, and W. H. Zurek, Science 279, 342 (1998).
[28] P. Aliferis, D. Gottesman, and J. Preskill, Quantum Information and Computation 6, 97 (2006).
[29] A. G. Fowler, M. Mariantoni, J. M. Martinis, and A. N. Cleland, Physical Review A 86, 032324 (2012).
[30] Google Quantum AI and Collaborators, Nature 638, 920 (2025).
[31] S. Bravyi, A. W. Cross, J. M. Gambetta, D. Maslov, P. Rall, and T. J. Yoder, Nature 627, 778 (2024).
[32] B. M. Terhal, Reviews of Modern Physics 87, 307 (2015).
[33] M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th ed. (Cambridge University Press, 2010).
[34] M. Ekerå, ACM Transactions on Quantum Computing 5, 11 (2024).