About
oqft.com is the home of OQFT, an open source toolkit for the optimistic quantum Fourier transform. It builds the circuit for any register size, writes it out as OpenQASM 3, counts its gates and depth, and checks it on a classical simulator against the exact transform.
The Name
OQFT stands for Optimistic Quantum Fourier Transform. The quantum Fourier transform, QFT for short, is the step in Shor’s factoring algorithm, and in quantum phase estimation, that turns a hidden repeating pattern into a number you can measure. “Optimistic” is the word the researchers who designed the fast version chose for circuits that are accurate on almost every input but give up on a small, predictable slice of them. The O in front is that trade.
The name is the same abbreviation the research papers on the method use, so anyone searching for it finds the tool. The post about the name has more.
Where It Comes From
The method comes from a 2025 paper by Gregory Kahanamoku-Meyer, John Blue, Thiago Bergamaschi, Craig Gidney and Isaac Chuang, A log-depth in-place quantum Fourier transform that rarely needs ancillas. OQFT is an independent implementation of that construction. It isn’t affiliated with the authors, and no code from them was used.
How It’s Built
- One small binary. OQFT is written in Go with nothing but the standard library. Download it and run it, there’s nothing else to install.
- Plain circuits out. Every circuit is exported as OpenQASM 3 with the standard gate library, so Qiskit, Cirq and other tools can load it.
- Checked against the real thing. For up to 10 qubits the tests compare every entry of the full matrix with the exact Fourier transform. Up to 20 qubits the checker runs chosen or random inputs through a simulator.
- Numbers from recorded runs. Every figure on this site comes from the recorded results in the repository.
License
All the code is open source under the Apache License 2.0, on GitHub. You can use it, change it and build it into your own tools.
Questions People Ask
Do I need a quantum computer?
No. OQFT makes circuits and checks them on an ordinary computer. You can run the circuits it writes on any quantum hardware or simulator that reads OpenQASM 3.
What does “almost always right” mean here?
The error is measured as an average over every possible input. With an error target of 0.01, the circuit’s output is very close to the exact transform for nearly all inputs, and badly off for a small fraction near the edges of each block’s range of values. How OQFT was tested shows where.
Why would anyone accept a wrong answer?
Because the algorithms that use the QFT are built to tolerate it. Shor’s algorithm already gets its answer with some probability and simply runs again when it misses. A small extra chance of a miss costs far less than a circuit twenty times bigger.
Is it faster on small registers too?
No. Below about 64 qubits the textbook circuit is shallower. The optimistic version wins as registers grow: at 2,048 qubits its depth is 198 against 4,096.
Does it break RSA?
No. It’s a tool for building and studying one part of the circuit that would. A resource calculator for factoring is planned next, so people can see how much the method changes the cost estimates.
Can I suggest something?
Please do. The contact page has the address.