# Questions tagged [shors-algorithm]

Shor's algorithm, named after American mathematician Peter Shor, is a quantum algorithm for integer factorization, formulated in 1994. Informally, it solves the following problem: given an integer N, find its prime factors.

110 questions
Filter by
Sorted by
Tagged with
1answer
44 views

### Difference between semiclassical QFT and QFT

In papers, one of them being An Experimental Study of Shor's Factoring Algorithm on IBM Q is stated that replacing QFT with the semiclassical QFT (Kitaev's approach) reduces the needed number of ...
1answer
42 views

### Measurement of the second quantum register in the Shor's algorithm [duplicate]

I've read that the measurement of the ancilla qubits is not fundamental for Shor's algorithm, but I don't understand how the algorithm works if I remove it. Without those measurements, do I have $r$ ...
0answers
60 views

### Implementation of Unitary in Shor's Algorithm in PennyLane

I've been working on implementing Shor's Algorithm in PennyLane, but am struggling to understand how the circuit for 'U' has been constructed according to Qiskit. In the Qiskit textbook, they seek to ...
0answers
35 views

### How to create this feature map?

In this paper, the following feature map is used: $$x \to \vert\phi(x)\rangle = \frac{1}{\sqrt{2^k}}\sum_{i=0}^{2^k-1}\vert x\cdot g^i\rangle$$ But no circuit is provided. A theoretical description of ...
1answer
98 views

### Register size in factoring 15 using Shor's algorithm

In Nielsen and Chuang's book: Quantum computation and quantum information (2016), there is an example in Box 5.4 which shows how to factor $15$ using Shor's algorithm. I am confused about a ...
0answers
30 views

### What will be the most useful quantum algorithms in the fault-tolerant quantum computers era?

When we'll have fault tolerant quantum computers with a lot of qubits, what will be the most useful algorithms (studied so far)? I know about Shor, Grover and quantum phase estimation but I'm pretty ...
0answers
16 views

### State of the art values for Shor algorithm depth and number of qubits on Clifford+T basis with arbitrary connectivity

I am trying to find the state of the art results in term of number of logical qubits and depth for the Shor factoring algorithm on the Clifford+T basis. I don't want to assume anything about the error ...
1answer
60 views

### Integer factorization using Shor's Alorithm

I have question about Shor's algorithm, from I know it's for factorize an integer and can factorize big number with ease. I using Qiskit to try make a simple factorization program (with local ...
1answer
32 views

### Where is the extra qubit after QFT$^{-1}$ coming from in Shor’s algorithm?

Hello sorry if this is a stupid question arising from my ignorance but I have been looking at the modular adder for Shor's algorithm according to this website. Here is what the gate looks like: The ...
1answer
115 views

### "Classical" phase estimation versus iterative phase estimation

In the article Arbitrary accuracy iterative phase estimation algorithm as a two qubit benchmark, the authors introduced implementation of phase estimation with two qubits only. The trick that bits ...
1answer
135 views

### Question about the Result Analysis of Ekera's Method in Short DLP

In section 4.4 of the paper "Quantum algorithms for computing short discrete logarithms and factoring RSA integers", for an arbitrary set $\left\{ (j_i, k_i):1\le i\le s \right\}$ chosen ...
1answer
67 views

1answer
127 views

### What is the largest number factored by the IBM Quantum simulators?

Though a lot of papers talk about the largest factored number by Shor's Algorithm, I want to know the largest one factored by the IBM Quantum, for example, the simulator_mps. I am able to use it to ...
1answer
97 views

### Continued fractions with Shor's algorithm: which convergent?

Suppose I am using Shor's order finding algorithm to calculate the order $r$ of $x\leq N$ with respect to $N$. After some run of the QPE subroutine, I obtain a good, $L$-bit approximation to $s/r$ for ...
1answer
91 views

### Quantum Fourier Transform in the Period Finding Problem

I am trying to prove that when applying the inverse QFT to the following state: we get the following result: However, I get a wrong prefactor. Can anyone tell me where I went wrong? Here my ...
0answers
49 views

### Shor vs Schnorr: A classical algorithm for breaking RSA? [duplicate]

I am not sure why I haven't heard much chatter about this paper by Dr. Claus Peter Schnorr where he claims to have come up with a classical algorithm to break the RSA protocol. The construction is ...
1answer
409 views

### Classical algorithm with complexity similar to Shor's discovered: Are there more efficient quantum algorithms than Shor's?

In the article Fast Factoring Integers by SVP Algorithms the author claims that he discovered classical algorithm for factoring integers in polynomial time. The Quantum Report mentioned here that it ...
1answer
90 views

### Can I have access to break my Windows BitLocker key [closed]

Is it possible to have access to a quantum computer to break a BitLocker key (maybe with Shor's algorithm) and have access to my data? Here what happened to me: after I've changed my LENOVO X270 ...
1answer
61 views

### How does the subtraction gate work in Fourier space

I am currently reading Shor's algorithm on my own and I come across a paper via this link. It shows the circuit for implementing Shor's alogrithm. Here it depicts that taking a QFT circuit on the ...
1answer
180 views

### Shor's algorithm - modular exponentiation and Quantum Fourier transform and quantum phase estimation method

I have a question about Shor's algorithm with respect to the eigenvector representation of the second (lower) register. In the following I use the notation of Nielsen, M., Chuang, I., 2016, Quantum ...
1answer
170 views

### Why is the superposition of all states an eigenvector, with eigenvalue 1, of the QFT?

In many descriptions of order finding, but also in this answer here, it is shown that the superposition of all states is an eigenvector for eigenvalue 1.0. To cite: Having found the eigenvalues, we ...
1answer
198 views

### Can I access device specifications of IBMQ paying devices?

I need to perform some tests for my thesis in real quantum computers, however, I only have access to IBM's free quantum devices (the maximum number of qubits I can use is 15, in ...
1answer
62 views

### Unitary Operator impact on both - the Control Qubit and the Target Register in Shor's Algorithm

I read the details of Shor's algorithm implementation at the link https://qiskit.org/textbook/ch-algorithms/shor.html#2.-The-Solution and had a question. As a concept, when Unitary is applied with a ...
1answer
96 views

### Braket and Q# Simulators

I have implemented Shor's algorithm in Qiskit, and everything works as expected within the IBM Q experience for both the IBM qasm_simulator and real hardware. However, after I've implemented Shors in ...
0answers
171 views

### What is stopping FACTORING from being BQP-complete?

Classical complexity theory makes much of the study of so-called intermediate problems - that is, problems that are in $\mathsf{NP}$ but are nonetheless not known to be in $\mathsf{P}$ and further not ...
1answer
147 views

### How does this represent modular multiplication

How does this circuit map $|x\rangle$ to $|7x \space mod15\rangle$? Looking into Shor's and I thought that phase kickback causes the modular exponentiation part to be mapped onto the measurement ...
3answers
122 views

### Shor's implementation problem on qiskit

If q4-7 are all supposed to be eigenstates of the operation, why is it just that q7 is in $|1\rangle$? Shouldn't all qubits 4 to ...
1answer
150 views

### How to show that amount of qubits needed to crack the RSA-2048 protocol using Shor's algorithm?

I've read that under current technology we would need around 20 million qubits to crack the RSA-2048 protocol. How would one prove this?
1answer
60 views

### How to build an example of Shor's algorithm for the discrete log?

I have been trying to build myself an example of Shor's computations for the discrete log. I started out with this objective and I realized I should understand the factorization first, which I did ...
1answer
167 views

### Shor's algorithm: what to do after reading the QFT's result twice?

I asked about how to identify the period looking at a Fourier transform plot. The answer seems to be to run the fourier transform multiple times getting multiple values associated to high ...
1answer
82 views

### What are the interesting spikes in this after-QFT graph (page 241) of Programming Quantum Computers?

I'm reading Programming Quantum Computers trying to understand Shor's algorithm. I learned there that we prepare a state $|x^i \bmod N\rangle$, then apply the QFT to this state. The QFT changes the ...
0answers
47 views

### Is there an example of Shor's algorithm for the discrete log problem with concrete numbers anywhere?

I understand the problem well enough and I'm trying to understand the algorithm, Shor's version. It's not easy to read the abstract descriptions available everywhere --- Shor's paper, Nielsen's book ...
1answer
367 views

### Simplifying Qiskit circuit with c_if()

I'm trying to simplify the inner for loop of this implementation of the Mosca-Ekert semi-classical variant of Shor's algorithm. The inner for loop should have only linear length, but this ...
2answers
370 views

### Shor's algorithm: initialization of second register

I am trying to understand Shor's algorithm. I am not quite sure why the initialization, indicated as $|1\rangle$ in the below image at the bottom left is chosen as it is? I understand the modular ...
1answer
176 views

### What is a maximal number factored by Shor's algorithm so far?

With reference to a similar question here, I would like to know what is the maximal number which has been factored with Shor's algorithm so far on actual quantum hardware. The reason I am asking a ...
0answers
68 views

### Abelian Hidden Subgroup Problem for arbitrary cyclic p-Groups

I had asked a question similar to this one here regarding how to handle the HSP for groups whose cyclic decomposition contains factors whose order is not a power of two. I also had some prior ...
1answer
151 views

### How to write a classical version of Shor's algorithm

For learning purposes, I would like to write a classical version of Shor's algorithm. From what I have read, what makes this algorithm fast is the quantum FFT, which is used to find the period of the ...
1answer
265 views

### Problem with Shor's factoring algorithm [closed]

I'm trying to figure out the Shor's factoring algorithm. References i've been using wikipedia page, the book Quantum Computer Science by David Mermin and the orignal paper(1996) By Peter Shor. I ...
2answers
124 views

### In Shor's algorithm, how can we guarantee that each controlled-U will kickback to the same eigenvalue?

I'm studying the Shor algorithm as part of my thesis and have a question about the "measured" phases after the QPE. So, I take the controlled-U operations on the second register and in cause ...
1answer
142 views

### Constructing arbitrary functions for the Abelian HSP

My question might be similar to Hidden subgroup problem. However, I'm not exactly sure though. In addition, that question doesn't have an answer. I'm trying to create some simple instances of the ...
1answer
77 views

### Eigenvectors and eigenvalues of the gate $U_a:|s\rangle\mapsto|sa \bmod N\rangle$

I'm studying Shor algorithm. This is a demostration about the eigenvectors and eigenvalues of $U_a$ gate: Can somebody explain me from the third step to the last?
1answer
99 views

### Why can I use the Sum of Eigenvectors for Phase Estimation in Shor

In phase estimation, we start by using an eigenvector $\newcommand{\ket}[1]{\lvert#1\rangle}\ket u$ to find the corresponding eigenvalue lambda. So far so good. In the order finding algorithm, we also ...