logoalt Hacker News

Strilanc • yesterday at 11:57 PM • 0 replies • view on HN

That paper is not a valid quantum factoring.

In section 4.1 you can see the circuit that they ran only had 8 phase estimation qubits. But Shor's algorithm needs 2n phase estimation qubits to factor an n bit number, so they need 16 not 8. With only 8 they can't determine the phase accurately enough to reconstruct the denominator that reveals the period. Even if the QC was perfect they'd just be measuring random values and getting false positives.

Note they took 1000 shots. If you sample a random number and feed it into the post-processing for Shor's algorithm it would succeed after less than 10 shots on average. So success is really the wrong metric here. At best you can look at the distribution of outputs and compare it to the expected distribution to determine whether the quantum computer is working or not. They don't do this.

They do say they observed 249 different values (out of a possible 256, after taking 1000 shots). That tells us something about the distribution: it must be quite flat. 249 is roughly how many numbers you see when sampling a flat 256 item disribution with replacement 1000 times. So this 249 is consistent with them sampling from a uniformly random distribution, rather than the peaked one that Shor's algorithm is supposed to produce when performed correctly. I'd say this indicates the quantum computer is noisy, except that they didn't use enough qubits of phase estimation meaning the expected distribution is ~flat so it's impossible to distinguish if it's ~uniformly random due to the noisy machine or due to their misconfiguration of the algorithm.

Lastly, there's a very strange error in section 4.1 where they say the period of multiplying by 3 mod 221 is r=20, when actually it's r=48. Feeding r=20 into the period-to-factor postprocessing math.gcd(pow(3, r//2, 221) + 1, 221) yields 1 which isn't a non-trivial factor of 221.

I am not away of ANY quantum factoring paper that factors a number larger than 15 that doesn't have either serious issues like the ones above or else that performs invalid precompilations that require preknowledge of the period.