Undergrad Number of qubits required for Shor's algorithm to factor a number < 2^n

Click For Summary
The discussion focuses on the qubit requirements for implementing Shor's algorithm to factor numbers less than 2^n. Various implementations suggest that the number of qubits, q, generally scales linearly with n, with some estimates around 3n qubits for the naive circuit. However, practical implementations may require around 2n+1 qubits, factoring in error correction and the need for additional registers. The conversation emphasizes that while theoretical qubit counts are important, practical considerations like runtime and qubit quality significantly impact the efficiency of the algorithm. Ultimately, the most efficient construction currently proposed uses approximately 3n + O(log n) logical qubits to optimize physical qubit usage.
tomdodd4598
Messages
137
Reaction score
13
Hey there,

There are plenty of proposed implementations of Shor's algorithm which require different numbers of qubits, ##q##, to be able to factor a number ##N## of size ##<2^n##, i.e. a number of length at most ##n## bits. Most of these require ##q## linear in ##n##; for example, this implementation requires ##q=5n+1##, while this one requires ##q=2n+3##.

However, I've mainly been looking at the 'naive' circuit, which I'm pretty sure the wiki article and this paper (in a special case, reduced form) uses. Am I right in thinking this circuit requires ##3n## qubits in general (##n## for ##N## and ##2n## for the values of ##x## in the period-finding subroutine), or is there something I'm missing?
 
Last edited:
Physics news on Phys.org
Based on the diagram in the wiki article, it should be 3n qubits.
The QFT will only require 2n and those U functions require n.
I've read through carefully (especially those U functions) and cannot find any "intermediate" bits.
Of course, in practice there could always be more - for example, for error correction.
 
If you have arbitrarily good qubits, then the current best qubit count to run Shor's factoring algorithm is 2n+1 (https://arxiv.org/abs/1706.07884 "Factoring with n+2 clean qubits and n-1 dirty qubits"). n of the qubits are for an accumulator register storing the state of the ongoing modular exponentiation, n are for a workspace register needed during modular multiplications, and the last 1 is for holding the state of the semi-classical quantum Fourier transform (done using qubit recycling). It's possible that there might be some way to do a modular multiplication without the workspace register, but no one has found a way yet. It seems very unlikely that the accumulator register can ever be removed.

All that being said, I should caution you to not focus on this qubit count. In practice, you don't have arbitrarily good qubits and you don't just care about space but also runtime. The time sacrifices made in the contortions needed to go from ~3n qubits to ~2n qubits are enormous. And when you consider the overhead of error correction needed to protect noisy qubits, more time means more computation to protect means bigger code distance means more physical qubits per logical qubit.

When accounting for the overhead of error correction, the most efficient construction so far uses 3n + O(log n) logical qubits ( https://arxiv.org/abs/1905.09749 "How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits" slides https://docs.google.com/presentatio...NRsEoOZojIrq8NfGsRYbvmWr8hBhdinihhlZpRHQq/pub ) to such good effect that the final physical qubit count is lower than you get when using the 2n+3 logical qubit construction you mentioned.
 
Time reversal invariant Hamiltonians must satisfy ##[H,\Theta]=0## where ##\Theta## is time reversal operator. However, in some texts (for example see Many-body Quantum Theory in Condensed Matter Physics an introduction, HENRIK BRUUS and KARSTEN FLENSBERG, Corrected version: 14 January 2016, section 7.1.4) the time reversal invariant condition is introduced as ##H=H^*##. How these two conditions are identical?

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
43
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K