Optimistic Quantum Circuits Explained, Why a QFT That Is Almost Always Right Is Enough
Ask a circuit designer for a quantum Fourier transform and they’ll want it right on every input. That’s the normal bar. A circuit is a fixed piece of hardware, and you can’t look inside a quantum state to see which input you got and take a different path. So it has to work for all of them.
The trouble is that “all of them” is expensive. In 2025 a group of researchers from MIT, UC Berkeley and Google asked a different question: what if the circuit only has to be right on almost every input? They called that kind of circuit optimistic, and showed the QFT gets much cheaper under the looser rule.
What the QFT Does
The quantum Fourier transform takes a register of qubits holding some number and spreads it into a pattern of phases, one wave per possible output. Shor’s algorithm uses it at the end to read off a hidden period, the repeat length that gives away the factors of a large number. Quantum phase estimation uses it the same way.
The textbook circuit does this one qubit at a time. Each qubit gets a Hadamard, then a rotation controlled by every qubit after it, each rotation half the size of the last. On n qubits that’s about n²/2 rotations, and they can’t all run at once because they share qubits. The depth grows in step with the register.

Cutting It Into Blocks
The optimistic QFT cuts the register into blocks of a few dozen qubits. Each block runs its own small QFT. The tiny rotations between blocks far apart are dropped, since they barely move the result. Rotations between neighbouring blocks stay.
That still leaves blocks waiting on each other. The trick that breaks the chain is phase estimation inside the circuit: a block can work out roughly what its neighbour holds and apply the right rotations without waiting for it. Once every block can do that, they all run side by side, and the depth grows with the logarithm of the register size instead of the size itself.
Where It Goes Wrong
The estimate is done in fixed-width binary arithmetic, and binary arithmetic wraps around. Ask a three-bit counter what comes after 111 and it says 000. When a block’s value sits right at the top of its range, the estimate can wrap, and the output for that input comes out badly wrong.
It only happens near those edges, and the edges are a small fraction of all inputs. Widen the blocks and the fraction shrinks. The error target you give OQFT sets the block width. At 0.01 on 2,048 qubits the blocks are 25 qubits wide, and the wraparound zone is a sliver.
Why That’s Good Enough
Shor’s algorithm never promised a sure answer. It succeeds with some probability, checks its result with ordinary arithmetic, and runs again when it misses. A circuit that adds a small extra chance of a miss costs a few more runs on average. A circuit twenty times bigger costs far more than that, every run.
The same reasoning holds for most algorithms built around the QFT, which is why the researchers argue optimistic circuits are usually enough. For the rare case where a subroutine has to be right on every input, they also give a way to turn an optimistic circuit into a general one.
OQFT builds the optimistic QFT, counts it, and shows you exactly where it fails.