3 ms·
Does it calculate generic Shore?
by bvrmn 4y ago
Does it calculate generic Shore?
- credit_guy 4y agoDo you mean Shor's algorithm [1]? Most likely no, or IBM would have made sure you'll hear about that. But let's say it can, and somehow IBM forgot to mention. Shor's algorithm reduces to a quantum Fourier circuit, with 2N qubit inputs and 2N qubit outputs, where N is the number of digits of the number to be factored. That's 4N qubits only for inputs and outputs. So, in the best case scenario, this computer would be able to factor a 108-binary digit number. My computer (2020 Intel-based iMac) can do that in one minute. Here's the code if you want to try it on your computer: import sympy n_digits = 54 p = sympy.randprime(2**(n_digits-1), 2**n_digits) q = sympy.randprime(2**(n_digits-1), 2**n_digits) sympy.factorint(N) Output: {53882560694857690729: 1, 44658549937294814041: 1} [1] https://en.wikipedia.org/wiki/Shor%27s_algorithm https://en.wikipedia.org/wiki/Shor%27s_algorithm
- nemoniac 4y agoBefore the last line you need N = p * q