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

In summary, the conversation discusses the various proposed implementations of Shor's algorithm for factoring numbers of size <2^n. Most of these implementations require a number of qubits, q, that is linear in n. The 'naive' circuit, which is used in the wiki article and a paper, requires 3n qubits in general, while the QFT and U functions require 2n and n qubits respectively. However, in practice, the best construction for factoring large numbers uses 3n + O(log n) logical qubits, taking into account the overhead of error correction. This is more efficient than the previously mentioned 2n+3 logical qubit construction. The conversation also mentions the limitations of using
  • #1
tomdodd4598
138
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
  • #2
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.
 
  • #3
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.
 

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

How many qubits are needed for Shor's algorithm to factor a number less than 2^n?

The minimum number of qubits required for Shor's algorithm to factor a number less than 2^n is approximately 2n + 3. This means that for a 256-bit number, 515 qubits would be needed.

Why is a large number of qubits needed for Shor's algorithm?

Shor's algorithm relies on the use of quantum Fourier transforms, which require a large number of qubits to accurately represent the input number. Additionally, the algorithm requires a large number of qubits to perform multiple iterations and calculations.

Is there a way to reduce the number of qubits needed for Shor's algorithm?

There are ongoing research efforts to find ways to reduce the number of qubits needed for Shor's algorithm. One approach is to use error correction techniques to improve the accuracy of the quantum Fourier transform and reduce the number of qubits needed.

Can Shor's algorithm factor numbers with fewer qubits than the minimum requirement?

No, the minimum number of qubits is necessary for Shor's algorithm to work effectively. Without enough qubits, the algorithm will not be able to accurately represent the input number and perform the necessary calculations.

Are there any practical limitations to the number of qubits that can be used for Shor's algorithm?

Yes, currently there are practical limitations on the number of qubits that can be used for Shor's algorithm. This is due to challenges in building and maintaining a large number of qubits, as well as the need for error correction to ensure accurate results.

Similar threads

Replies
2
Views
2K
Replies
1
Views
983
Replies
5
Views
2K
Replies
3
Views
1K
Replies
11
Views
2K
Replies
1
Views
2K
Replies
2
Views
2K
Back
Top