🤖 AI Summary
This work addresses the memory bandwidth and parallel scalability limitations of traditional FFT in high-performance computing by proposing the quantum Fourier transform (QFT) as a plug-in replacement. The authors present the first implementation of discrete Fourier transform on a classical quantum simulator, directly encoding input arrays into quantum state amplitudes and introducing a backend-agnostic planner to optimize computation and memory layout. By incorporating an approximate QFT (AQFT) that truncates small-angle controlled rotations, they significantly reduce circuit depth while preserving accuracy. Leveraging the qsim simulator with OpenMP, AVX, and CUDA backends, they employ fused gate scheduling and memory-aware optimizations to enhance arithmetic intensity. Experiments demonstrate that the AVX implementation matches FFTW performance on AMD EPYC Zen2 processors, while the CUDA backend achieves over 4× speedup on NVIDIA A100 GPUs for large problem sizes.
📝 Abstract
We introduce QFT$\rightarrow$FFT, a family of HPC FFT libraries that compute the discrete Fourier transform by executing a quantum Fourier transform (QFT) circuit on classical quantum computer simulators. Input arrays are mapped directly to state amplitudes with explicit normalization/indexing, making QFT a drop-in replacement for FFT primitives. A backend-agnostic planner builds a fused-gate schedule and memory layout adapters to increase arithmetic intensity and reduce memory data movement. We implement this design on top of Google's C++ \texttt{qsim} and evaluate OpenMP, AVX, and CUDA backends. On an AMD EPYC Zen2 processor, our AVX performance is on par with that of multithreaded FFTW, utilizing 64 threads. On an NVIDIA A100, the CUDA backend achieves more than $4\times$ lower time than both AVX and FFTW on AMD EPYC Zen2 at larger sizes. We also employ an approximate QFT (AQFT) that truncates small-angle controlled rotations beyond a cutoff $k$, reducing circuit depth and runtime while preserving accuracy.