Craig Gidney
algassert.com · Personal blog · on HN since 2017
Craig Gidney, a quantum computing researcher at Google, writes about quantum algorithms, factoring, and builds the Quirk circuit simulator.
What HN saysHN commenters recommend the Quirk browser simulator for getting a feel for quantum algorithms and cite the blog for related problems.
37HN people shared it
25linked it in comments
25stories submitted
703story points
3 months agolast shared
2017people per year2026
Most-shared posts
- 1Why haven't quantum computers factored 21 yet?11 people · 340 points · first shared 2025 · 197 comments on HN
- 2Quirk: Quantum Circuit Simulator11 people · 44 points · first shared 2017 · 4 comments on HN
- 3An Explanation of Shor's Quantum Factoring Algorithm3 people · 114 points · first shared 2017 · 17 comments on HN
- 4Factoring the largest number ever with a quantum computer3 people · 3 points · first shared 2020 · discussion on HN
- 5The Frauchiger-Renner Paradox Is a Sleeping Beauty Problem2 people · 4 points · first shared 2019 · discussion on HN
- 6You versus Bell Tests and the No Communication Theorem (2015)2 people · 3 points · first shared 2022 · discussion on HN
- 7Why Will Quantum Computers Be Slow?2 people · 3 points · first shared 2018 · discussion on HN
- 8Quantum Error Correction Goes FOOM2 people · 2 points · first shared 2025 · discussion on HN
- 9Quantum Circuit Simulator: Quirk2 people · 2 points · first shared 2018 · discussion on HN
- 10Roulette Selection Fit for a Quantum Computer2 people · 2 points · first shared 2018 · discussion on HN
- 11Unfathomable bugs #10: The Broken Windows Build2 people · 2 points · first shared 2026 · discussion on HN
- 12The French Have the Quantum Circuits2 people · 2 points · first shared 2026 · discussion on HN
- 13The predictable failure of the QDay Prize2 people · 2 points · first shared 2026 · discussion on HN
- 14Bugs from the Future: Hadamard Coins and Implicit Measurement1 people · 63 points · first shared 2017 · 9 comments on HN
- 15You can't test if quantum uses complex numbers1 people · 61 points · first shared 2025 · 58 comments on HN
What HN people wrote when they linked it
Strilanc · 2026-03-11
That slide deck is complaining that correct work on quantum attacks should be seen as negligible priority or as distractions. TFA is complaining that JVG isn't even correct. They are pretty different concerns.
To be clear, I think that slide deck will be looked back upon as naive. In particular, it makes the classic mistake of assuming the size of number factored should be growing smoothly. That's naive because 15 is such a huge cost outlier and because quantum error correction has frontloaded costs. See [1] and [2] for details.
[1]: https://algassert.com/post/2500
[2]: https://algassert.com/post/2503
bradrn · 2022-04-22
Relatedly, I recently discovered https://algassert.com/quirk — it does require a bit of quantum computing knowledge to use, but the UI is excellent, and I found it incredibly useful for ‘getting a feel’ of how various quantum algorithms work.
swampangel · 2018-03-08
There's an in-browser quantum computer simulator called Quirk https://hackaday.com/2018/01/24/quantum-weirdness-in-your-browser/ and the author's blog explores related problems http://algassert.com/
archgoon · 2019-08-24
Well, we'll see how small the elaboration is... :)
A brief review of how quantum teleportation works. (I have a diagram in quirk that might help with the explanation
https://algassert.com/quirk#circuit=%7B%22cols%22:%5B%5B1,%22H%22%5D,%…
You start off with two qubits in a known state, say |0>. You then shift one of the qubits (using a Hadamard gate) into a equally mixed state of
qubit_1 = k(|0>+|1>)
and then use a controlled NOT gate to put the entire system in the state of
qubit_2 = k(|00>+|11>)
(where k = 1/sqrt(2)).
So you then ship one of the qubits off to your friend in Antarctica (say, qubit_1). You then pull out qubit_3. Now, let's say it's also in some known state |0> to begin with, and then you apply a bunch of gate operations to it, resulting in it being in the following state:
qubit_3 = a|0> + b|1>
Where a and b are two complex numbers whose magnitude sums to one.
You use another controlled not gate, this time, qubit_3 will act on qubit_2. This now has entangled qubit_3 into the qubit_1 and qubit_2 system. Finally, you apply another Hadamard gate to qubit_3. The system is now in the following state
|Psi> = …
darkkindness · 2017-06-27
> But there is more to try–the Beginner’s Guide has a number of different experiments available—from Bit-flip encoders, to Grover’s and Shor’s algorithms. Am I ready to understand a quantum score like this? Well, maybe not just yet. Some day though…
The enthusiasm! I love it. However...
I remember reading a post from Algorithmic Assertions[1] which gave a wonderful example of the use of intuition in designing/transforming a quantum circuit. He walks through every step, starting with a simple swap circuit and ending with a proof of quantum teleportation. It was kind of magical to see all the tricks used. Inserting CNOTS in order to optimize out certain gates? Knowing that controlled-Z gates are equivalent if flipped around? Transposing H gates with X or Z gates to turn an X into a Z and vice versa?
I stress the importance of the steps here, because if your goal is to be able to build fancy quantum scores, it isn't enough, most likely, to just read the Beginner's guide and grok Shor's algorithm -- it's really important to have the intuition needed to write your own algorithms. It is exactly like learning how to code again.
[1]: http://algassert.com/post/1628
exmadscientist · 2026-07-21
Would anyone downvoting care to explain? I'm genuinely interested in seeing anything that suggests there's either some secret breakthrough (completely plausible, but there's no evidence that I've seen hint of) making quantum computers actually useful, or an argument that they'll be usable by (say) 2050?
Because right now my attitudes are trained by things like this https://algassert.com/post/2500 that explain just why 15 was factored in that famous run of Shor's algorithm and not, say, 21; and why 21 hasn't been factored yet and isn't likely to be any time soon....
sanxiyn · 2026-04-30
No you really can't. Being able to factor 15 but not 21 with Shor's algorithm is normal. I know it sounds absurd, but it really is that way. Because factoring 21 is about 100x times harder than factoring 15.
See https://algassert.com/post/2500 for details.
qnleigh · 2026-04-21
The quantum circuit to factor 15 is a weird special case that can be factored with just a handful of logic gates [0]. Factoring 21 will require quantum error correction, which adds a huge amount of overhead.
[0] https://algassert.com/post/2500
newpavlov · 2026-03-31
Have they factored 21 yet? [0] IMO most of us can ignore such pieces until a practical factorization of arbitrary 32 bit integers is demonstrated on a QC. And even after this "easy" milestone is achieved, I think it will be at least a decade until QC will be a practical cryptographic threat. And it's generously assuming that a Moore-like scaling is possible for QC.
[0]: https://algassert.com/post/2500
aleph_minus_one · 2026-03-19
An opposite standpoint: Why it's so much harder to factor 21 on a quantum computer than 15: https://algassert.com/post/2500
mapt · 2026-03-03
On the one hand you have strong and persistent claims about quantum factoring of large numbers
On the other hand you have
https://algassert.com/post/2500
sestep · 2025-12-26
That's a 404; here's a working link: https://algassert.com/post/2500
vtomole · 2025-12-26
No, and Shor's is not a good benchmark for these early quantum computers: https://algassert.com/post/2500m
prof-dr-ir · 2025-12-21
I am confused, since even factoring 21 is apparently so difficult that it "isn’t yet a good benchmark for tracking the progress of quantum computers." [0]
So the "useful quantum computing" that is "imminent" is not the kind of quantum computing that involves the factorization of nearly prime numbers?
[0] https://algassert.com/post/2500
fsh · 2025-11-28
Even 21 was only possible by cheating (optimizing away the difficult part using prior knowledge of the results) [1]. Craig Gidney has a blog post that shows the actual quantum circuit for factoring 21 which is far beyond the capabilities of current quantum computers [2].
[1] https://www.nature.com/articles/nature12290
[2] https://algassert.com/post/2500
xiphias2 · 2022-04-15
I just recently played with an online quantum computer simulator to get a better understanding of how quantum fourier transform works, it's a lot of fun:
https://algassert.com/quirk
ivan_ah · 2021-06-10
I guess the closest thing to a quantum hello world would be a simple quantum circuit—each line represents a qubit register, and various types of gates operate on the qubits.
To see quantum circuits that do something useful, check out the "Example Circuits" links that show up in the Quirk simulator: https://algassert.com/quirk
via https://algassert.com/2016/05/22/quirk.html
via https://news.ycombinator.com/item?id=11752421
mjewkes · 2020-04-27
Strilanc, who works on the google quantum team, has a simulator here: https://algassert.com/quirk
umname · 2017-12-15
I feel like someone should post this: http://algassert.com/quirk
sp332 · 2017-10-18
There are lots of different ways to build a quantum computer, so you might get conflicting answers about the materials and signaling mechanisms. But what they have in common is that they are probabilistic, and there are very few algorithms that take advantage of this to speed things up instead of just adding noise. Shor's algorithm for factoring numbers and Grover's search algorithm work by constructive and destructive interference of the wavefunctions of entangled particles, amplifying the probabilities of the right answers. http://twistedoakstudios.com/blog/Post2644_grovers-quantum-search-algo… http://algassert.com/post/1718
s-macke · 2017-08-15
Consider these two simulators, if you want to try the examples in the paper:
1. https://www.research.ibm.com/ibm-q/
This is IBM Quantum experience. Click on "experiment" to start. It has a nice tutorial.
2. http://algassert.com/quirk
I like this one much better, because you can see the internal state of the machine at any moment. And it has much more options and is much faster.
Arcorann · 2025-07-12
Somewhat related is the work done in "Falling with Style: Factoring up to 255 “with” a Quantum Computer" published in the proceedings of SIGBOVIK 2025 [1]. The author, Craig Gidney [2], successfully factored all odd composite numbers up to 255 using Shor's algorithm, even though the quantum circuits involved were such that any meaningful output would be overwhelmed by noise (and indeed, performance was maintained when the circuits were replaced by a random number generator).
> To my knowledge, no one has cheated at factoring in this way before. Given the shenanigans pulled by past factoring experiments, that’s remarkable.
[1] https://sigbovik.org/2025/; standalone paper is also available in the code repository https://github.com/strilanc/falling-with-style
[2] Who has previous experience in cheating at quantum factoring: see "Factoring the largest number ever with a quantum computer", posted April Fools' Day 2020 at https://algassert.com/post/2000
gdavisson · 2024-11-08
That's not correct; you cannot use a double-slit test to check for entanglement. Running a photon through a double-slit setup always just produces a single dot, not a any sort of pattern. To get a pattern, you need to run a bunch of photons through it and see if a fringe pattern appears [1].
(BTW, you never get a two-line pattern in a decent setup. This is an incredibly common mistake, but it's simply wrong. The interference (which produces fringes) only happens where the separate patterns from the two slits overlap, so if you want a lot of interference, you need them to overlap a lot. So in the no-interference case, you won't get two separate lines with a gap between, you'll get a single merged wash (with probably some fine structure due to diffraction within each of the slits, but that'll also be there when there is interference, on top of the two-slit interference fringes).)
You might think "ok, I'll do this with a bunch of photons, measure/not measure all of their twins, and see if the bunch of them show fringes." This is more-or-less what's done in the delayed-choice quantum eraser experiment, but it doesn't work out in a way that allows communication. What happens is that you always get the no-interference pattern. In order to see interference fringes, you need to split the individual photons' dots up based on the result of the measurement you made on their twins. Based on those measurements (if you made them), you can split the photons up into two groups, which'll…
stared · 2021-05-09
QC simulation (qubits only, no dedicated vis) is much easier. You just make a vector, and multiply it by matrices. Here for Python interface I like QuTiP even more than Qiskit (though, I might be biased, as I contributed to the former). For interactive, IBM Quantum Computing Experience and Quirk (https://algassert.com/quirk).
As "easier" I mean that 2^10 is still managable, as you can use dense vectors and operators. For, say, this quantum optics simulation you get roughly 1000 dimensions per particle. For 3 particles it is 10^9. Don't even think about dense vectors, let alot - dense operators. Sparse operators are not enough, as even identity is big; so for any real-time-ish simulation there are considerably more tricks and methods.
Simulting QFT you need to deal with much more complexity (including continuous dimensions). Instead of numerically pretty much you need to solve some intergrals. (Side note: I wanted at some point to write an interactive editor of Feynman diagrams, turning it into formulae and integrating.)
balopat · 2020-07-22
Hi,
I personally have a similar background to you, with ~15 years of software engineering.
I second some of the comments: I really started understanding quantum computing much better when I sat down and worked through the problems of the Nielsen and Chuang book ("Mike & Ike") - the first 4 chapters should give you a solid start. It starts from theoretical base and does cover some of the applications of QCs as well, though from that perspective there are a bunch of newer results that are not represented in it yet (e.g. QAOA/VQE, NISQ era algorithms, etc.). Some basic linear algebra is definitely needed though, it takes effort and practice to build up familiarity there if you are rusty on it (I was).
Also, I would like to plug open source contribution as a vehicle / forcing function for learning. I started contributing to Cirq (https://github.com/quantumlib/Cirq) starting last year in my free time (as well as some of my work time at Google) and I learned a ton through that. I now work on Cirq full time. OpenFermion, qsim, Tensorflow Quantum are all projects that are excited to have new contributors.
The reason I mention my journey because it shows that you don't need formal training in quantum physics to become productive in the quantum computing community (it can definitely help though). However, the field is very deep and is moving very fast, I very much consider myself a noob and rely heavily on the expertise of others for contributions, and I spend a lot of time…