A few weeks ago I needed the state $| \psi \rangle = \sum_{i \in \mathbb Z^*_N} |i\rangle$ where $\mathbb Z^*_N$ is the group of integers modulo N with multiplication.

I first thought it would be hard to build it. Then I came with this algoritm:

(it succeeds with probability at least 4/15)

I find that delightful. Step 2 is performing Euclid’s Algorithm on a quantum superposition: the oldest algorithm on the most cutting-edge device. I loved it. It made my day.

(I guess this was already known, but it’s fun)