8
Stack Exchange
votes

Time-memory tradeoffs in Shor's algorithm

Posted on 3/9/2019
UQ ID:6
Technology
Cryptography
Original

Can a quantum computer with insufficient qubits to factor an integer of a given size make any progress in factoring it? For example, what if a quantum computer is only one qubit short of what is necessary to attack a specific integer? Is it capable of making any progress in factoring it, or would it be just as useless as a 2 qubit machine? Assume qubits refer to logical qubits in a general-purpose cryptanalytic quantum computer with sufficient quantum error correction to solve the problem of decoherence.

Given that qubits can be thought of as the memory for quantum computers, I am essentially asking if time-memory tradeoffs are possible with Shor's algorithm when too few qubits are available.

Keywords & Tags
factoring
quantum-cryptanalysis
shors-algorithm
Model Answers (9)
Submitted answers from various AI models
Unsolved
No reviews yet

K2-Think

Pending UQ Validation
Needs Human Verification
MBZUAI-IFM
Qwen2.5-32B
Sep 18, 2025, 01:50 PM

To address whether a quantum computer with one fewer logical qubit than required can make progress in factoring an integer using Shor's algorithm, we analyze the qubit requirements and the algorithm's structure:

Qubit Requirements in Shor's Algorithm

Shor's algorithm requires logical qubits for three main components:

  1. Control Register (A): Stores the exponent ( a ), typically chos...
0 model reviews
0 human reviews
No reviews yet

GPT-5

UQ Validated
Needs Human Verification
OpenAI
Sep 2, 2025, 06:56 AM

Short answer Yes. Shor’s algorithm admits substantial time–memory (depth–qubit) tradeoffs. There isn’t a single hard qubit threshold beyond which you suddenly can factor and below which you can’t. If you are “one qubit short” of a particular circuit layout, you can often recompile to save that qubit at the cost of longer runtime. However, there is a fundamental floor: you need on the order of n lo...

0 model reviews
0 human reviews
No reviews yet

o3 Pro

Failed UQ Validation
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

Short answer
• Below about n logical qubits, where n = ⌈log₂N⌉ is the bit-length of the integer N you want to factor, Shor’s algorithm cannot even be started.
• Once you have those n qubits (plus 1 or 2 extra for control), you can reduce the additional work space arbitrarily far by paying with more and more run-time; this gives a family of time–memory trade-offs above the n-qubit threshold...

0 model reviews
0 human reviews
No reviews yet

o4 mini

Failed UQ Validation
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

In classical cryptanalysis one is so used to “I’m 1 GB short so I spill half of my state to disk and pay a factor‐of‐2 slowdown” that it is tempting to ask the same about a quantum computer: “If I’m just one logical qubit shy of the textbook Shor–machine for an n‐bit modulus, am I dead in the water, or can I somehow trade time for that missing piece of memory?”

The short answers are:

  1. You ca...
0 model reviews
0 human reviews
No reviews yet

o3

Failed UQ Validation
Needs Human Verification
OpenAI
Aug 1, 2025, 12:00 AM

Short answer
Yes, you can trade time for memory in Shor’s algorithm, but only down to a very sharp limit.
• If you still have at least n + O(1) logical qubits (where n ≈ log2 N is the bit-length of the integer you want to factor) you can always re-write the circuit so that it works; it just runs slower.
• If you have even one qubit less than that lower bound you cannot make any further progr...

0 model reviews
0 human reviews
No reviews yet

Gemini 2.5 Pro

Failed UQ Validation
Needs Human Verification
Google
Aug 1, 2025, 12:00 AM

Excellent question. You've hit on a crucial point in the practical application of quantum algorithms. The answer is a resounding yes, a quantum computer with insufficient qubits can still make progress, and there are direct time-memory tradeoffs available for Shor's algorithm.

A machine that is one qubit short is far from useless; it can still factor the integer, but it will take longer. Let'...

0 model reviews
0 human reviews
No reviews yet

Claude Opus 4

Failed UQ Validation
Needs Human Verification
Anthropic
Aug 1, 2025, 12:00 AM

This is an excellent question about the fundamental nature of quantum algorithms and their resource requirements. The short answer is that Shor's algorithm is quite rigid in its qubit requirements, and having "almost enough" qubits doesn't help much - but there are some nuances worth exploring.

Why Shor's Algorithm is Inflexible

Shor's algorithm requires approximately 2n qubits to factor an n...

0 model reviews
0 human reviews
No reviews yet

DeepSeek R1

Failed UQ Validation
Needs Human Verification
DeepSeek
deepseek-ai/DeepSeek-R1
Aug 1, 2025, 12:00 AM
<think> We are considering Shor's algorithm for factoring integers and what happens when we have insufficient qubits to run the full algorithm for a given integer size. Specifically, we are one qubit short. The question is whether any progress can be made in factoring the integer, or if the machine is as useless as having only 2 qubits.

Background on Shor's Algorithm

Shor's algorithm factors ...

0 model reviews
0 human reviews
No reviews yet

Claude 3.7 Sonnet

Failed UQ Validation
Needs Human Verification
Anthropic
Aug 1, 2025, 12:00 AM

Time-Memory Tradeoffs in Shor's Algorithm

Yes, time-memory tradeoffs are possible in Shor's algorithm, allowing factorization with fewer qubits than the standard implementation requires, though at the cost of increased runtime or classical processing.

Standard Qubit Requirements

For factoring an n-bit integer N, the standard implementation of Shor's algorithm requires:

  • 2n qubits for the ...
0 model reviews
0 human reviews
Submit Your Model's Answer
Your submission will be validated by our LLM validator and then by human experts

You need to be logged in to submit an answer