# 量子傅里叶变换（Quantum Fourier transform）

量子傅里叶变换（QFT）是一种量子算法，它将离散傅里叶变换（DFT）作用于量子态的振幅向量，并且是量子相位估计、肖尔（Shor）的因数分解算法以及相关周期查找方法中的核心子程序。<sup>[1](https://ar5iv.labs.arxiv.org/html/quant-ph/0006004)</sup><sup> • </sup><sup>[2](https://www.cambridge.org/core/books/quantum-algorithms/quantum-fourier-transform/4F2B669EE1363DF9BBB83D66F05C6041)</sup> 对于输入态 \( \sum_{x} \alpha_{x} |x\rangle \)，它产生 \( \sum_{x} \beta_{x} |x\rangle \)，其中 \( \beta_{x} = \tfrac{1}{\sqrt{m}} \sum_{y} (e^{2\pi i/m})^{x \cdot y} \alpha_{y} \)。<sup>[1](https://ar5iv.labs.arxiv.org/html/quant-ph/0006004)</sup> 对于 \( n \) 个量子比特，该电路只需要 \( O(n^{2}) \) 个门；而经典快速傅里叶变换（FFT）在 \( N = 2^{n} \) 时需要 \( O(N \log N) \) 次算术运算。然而，QFT 制备的是一个变换后的量子态，其振幅无法从一次运行中全部读出；而 FFT 返回全部傅里叶系数的列表。<sup>[3](https://link.springer.com/article/10.1007/s11128-026-05067-7)</sup><sup> • </sup><sup>[4](https://prod-edxapp.edx-cdn.org/assets/courseware/v1/8f101da9d14cfeec83df9e42a70562bf/c4x/BerkeleyX/CS-191x/asset/chap5.pdf)</sup> 它的价值在于相位估计和周期性提取，而不在于计算傅里叶系数。<sup>[5](https://export.arxiv.org/pdf/quant-ph/0211030v1.pdf)</sup>

| 关键事实 | 内容 |
|---|---|
| 执行的变换 | \( \beta_{x} = \tfrac{1}{\sqrt{m}} \sum_{y} (e^{2\pi i/m})^{x \cdot y} \alpha_{y} \)，即对振幅作 DFT<sup>[1](https://ar5iv.labs.arxiv.org/html/quant-ph/0006004)</sup> |
| 精确电路，\( n \) 个量子比特 | \( n \) 个哈达玛（Hadamard）门、\( n(n-1)/2 \) 个受控旋转、\( n/2 \) 个 SWAP 门：\( O(n^{2}) \) 个门<sup>[6](https://www.cl.cam.ac.uk/teaching/2324/QuantComp/Quantum_Computing_Lecture_9_2024.pdf)</sup> |
| 经典对比 | 经典 \( O(n\cdot 2^{n}) \) 个比特级门，对比量子 \( O(n^{2}) \) 个门<sup>[3](https://link.springer.com/article/10.1007/s11128-026-05067-7)</sup> |
| 半经典变体 | \( O(n) \) 个门，无双量子比特门，但需要顺序测量<sup>[7](https://www.science.org/doi/10.1126/science.1110335)</sup> |
| 近似 QFT 深度 | \( O(\log n + \log \log(1/\varepsilon)) \)，并有 \( \Omega(\log n) \) 下界<sup>[1](https://ar5iv.labs.arxiv.org/html/quant-ph/0006004)</sup> |
| 容错成本 | \( O(n \log n) \) 个 T 门（南允成（Yunseong Nam）、苏元（Yuan Su）和德米特里·马斯洛夫（Dmitri Maslov），2020）<sup>[8](https://doi.org/10.1038/s41534-020-0257-5)</sup> |
| 主要应用 | 肖尔算法、量子相位估计、HHL、量子 PCA<sup>[3](https://link.springer.com/article/10.1007/s11128-026-05067-7)</sup> |

## 工作原理

对于 \( N = 2^{n} \)，QFT 是酉算子 \( U_{\mathrm{FT}} = \tfrac{1}{\sqrt{N}} \sum_{x,y=0}^{N-1} e^{2\pi i x y / N} |y\rangle \langle x| \)；其矩阵的第 \( j \cdot k \) 个元素为 \( \omega^{jk} \)，其中 \( \omega = e^{2\pi i / N} \)。<sup>[9](https://qubit.guide/10.9-quantum-fourier-transform)</sup><sup> • </sup><sup>[4](https://prod-edxapp.edx-cdn.org/assets/courseware/v1/8f101da9d14cfeec83df9e42a70562bf/c4x/BerkeleyX/CS-191x/asset/chap5.pdf)</sup> 它将基态 \( |j\rangle \) 映射为 \( \tfrac{1}{\sqrt{N}} \sum_{k} e^{2\pi i j k / N} |k\rangle \)。<sup>[6](https://www.cl.cam.ac.uk/teaching/2324/QuantComp/Quantum_Computing_Lecture_9_2024.pdf)</sup>

高效电路之所以存在，是因为输出是一个乘积态：\( F_{N}|k\rangle = \bigotimes_{\ell=1}^{n} \tfrac{1}{\sqrt{2}} (|0\rangle + e^{2\pi i\, 0.k_{n-\ell+1}\ldots k_{n}} |1\rangle) \)，其中 \( 0.j_{1} \ldots j_{n} \) 表示一个二进制小数。<sup>[10](https://gilyen.hu/teaching/PCMI_2023_QFT_prez_day_1.pdf)</sup><sup> • </sup><sup>[11](https://dojo.qulacs.org/en/qp_main/notebooks/2.3_quantum_Fourier_transform.html)</sup> 每个输出量子比特都依赖于输入比特的一个二进制小数，因此该变换可分解为单量子比特操作和受控相位旋转。\( n = 1 \) 的情形恰好就是哈达玛门；更一般地，QFT 是循环群 \( \mathbb{Z}/2^{n}\mathbb{Z} \) 上的[傅里叶变换](https://www.edgepedia.org/zh/fourier-transform)，而[哈达玛变换](https://www.edgepedia.org/zh/hadamard-transform)是 \( (\mathbb{Z}/2\mathbb{Z})^{n} \) 上的傅里叶变换。<sup>[9](https://qubit.guide/10.9-quantum-fourier-transform)</sup>

## 实现方式

\( n \) 个量子比特的标准电路是：对每个量子比特先作用一个哈达玛门，再作用由后续量子比特控制的旋转 \( R_{k} = \mathrm{diag}(1, e^{2\pi i / 2^{k}}) \)，然后用一个 SWAP 阶段反转量子比特顺序。<sup>[6](https://www.cl.cam.ac.uk/teaching/2324/QuantComp/Quantum_Computing_Lecture_9_2024.pdf)</sup><sup> • </sup><sup>[11](https://dojo.qulacs.org/en/qp_main/notebooks/2.3_quantum_Fourier_transform.html)</sup> 一份资料计数为 \( n \) 个哈达玛门、\( n(n-1)/2 \) 个受控旋转和 \( n/2 \) 个 SWAP 门，总规模为 \( \Theta(n^{2}) \)。<sup>[6](https://www.cl.cam.ac.uk/teaching/2324/QuantComp/Quantum_Computing_Lecture_9_2024.pdf)</sup><sup> • </sup><sup>[12](https://quantumnanophotonics.org/wp-content/uploads/2023/07/module4lecture1.pdf)</sup> 逆 QFT 将电路中的门按相反顺序排列，并将每个门取逆：哈达玛门和 SWAP 门是自逆的，且 \( R_{k}^{\dagger} = \mathrm{diag}(1, e^{-2\pi i / 2^{k}}) \)。<sup>[6](https://www.cl.cam.ac.uk/teaching/2324/QuantComp/Quantum_Computing_Lecture_9_2024.pdf)</sup>

## 起源

肖尔于 1994 年在计算机科学基础会议（Foundations of Computer Science）上，在其离散对数与因数分解算法中，首次提出了傅里叶变换的量子电路规模可以关于 \( \log m \) 为多项式的观察。<sup>[1](https://ar5iv.labs.arxiv.org/html/quant-ph/0006004)</sup><sup> • </sup><sup>[13](https://epubs.siam.org/doi/10.1137/S0036144598347011)</sup> 卡内基梅隆大学（Carnegie Mellon University）的罗伯特·B·格里菲思（Robert B. Griffiths）和牛琦生（Chi-Sheng Niu）于 1996 年在《[物理评论快报](https://www.edgepedia.org/zh/physical-review-letters)》（Physical Review Letters）上发表了半经典傅里叶变换。<sup>[14](https://doi.org/10.1103/physrevlett.76.3228)</sup>

## 变体

**半经典 QFT。** 格里菲思和牛表明，当变换紧接在测量之前时（如[肖尔算法](https://www.edgepedia.org/zh/shors-algorithm)中），每个双比特门都可以替换为由经典信号控制的单比特门：每个比特都被测量，测量结果 \( c \) 会更新一个相位 \( \varphi' = \varphi/2 + c/4 \)，该相位在下一个比特被测量之前作用于它。<sup>[15](https://arxiv.org/pdf/quant-ph/9511007)</sup> 这将门数从 \( O(n^{2}) \) 降至 \( O(n) \)。<sup>[7](https://www.science.org/doi/10.1126/science.1110335)</sup> 代价是顺序性：必须测量一个比特后才能处理下一个比特；如果量子比特在测量时间尺度上快速退相干，这就是一个缺点；而且该方案会破坏叠加态，因此只有当 QFT 紧接在测量之前时才有用。<sup>[15](https://arxiv.org/pdf/quant-ph/9511007)</sup><sup> • </sup><sup>[16](http://arxiv.org/pdf/1006.3989)</sup> 一种相干版本用受控量子比特替代测量控制的修正。<sup>[9](https://qubit.guide/10.9-quantum-fourier-transform)</sup>

**近似 QFT。** 省略 \( k = \Omega(\log n) \) 的旋转 \( R_{k} \)，可得到一个 \( O(n \log n) \) 个门的电路，以精度 \( 1/\mathrm{poly}(n) \) 实现 QFT。<sup>[17](https://www.cs.umd.edu/~amchilds/teaching/w13/l02.pdf)</sup> 将每个量子比特的二进制小数相位截断到 \( m = O(\log(n/\varepsilon)) \) 位，产生的相位误差至多为 \( 2\pi n / 2^{m} \)。<sup>[18](https://www.rintonpress.com/xqic7/qic-7-4/383-391.pdf)</sup><sup> • </sup><sup>[19](https://arxiv.org/html/2505.00701)</sup> 在容错（Clifford+T）形式下，标准近似 QFT 的 T 门数较高；南允成、苏元和德米特里·马斯洛夫在 2020 年发表于《npj 量子信息》（npj Quantum Information）的工作中，将固定误差 \( \varepsilon \) 下的 T 门数降至 \( O(n \log n) \)，达到约 \( 8n(\log n - 2) + 1.2 \log^{2} n \) 个 T 门。<sup>[8](https://doi.org/10.1038/s41534-020-0257-5)</sup> 在深度方面，克利夫（Cleve）和沃特鲁斯（Watrous）于 2000 年给出了模 \( 2^{n} \) 的 QFT 的深度为 \( O(\log n + \log \log(1/\varepsilon)) \) 的并行电路，改进了此前 \( O(n) \) 的深度，并证明了 \( \Omega(\log n) \) 的下界。<sup>[1](https://ar5iv.labs.arxiv.org/html/quant-ph/0006004)</sup>

## 应用

在量子相位估计中，将逆 QFT 作用于第一个寄存器，可得到本征值相位 \( \varphi \) 的 \( t \) 比特近似 \( \tilde{\varphi} \)；要以至少 \( 1 - \varepsilon \) 的成功概率获得 \( n \) 比特精度，该寄存器需要 \( t = n + \lceil \log_{2}(2 + 1/(2\varepsilon)) \rceil \) 个量子比特。<sup>[6](https://www.cl.cam.ac.uk/teaching/2324/QuantComp/Quantum_Computing_Lecture_9_2024.pdf)</sup><sup> • </sup><sup>[12](https://quantumnanophotonics.org/wp-content/uploads/2023/07/module4lecture1.pdf)</sup> 肖尔的因数分解与离散对数算法在随机多项式时间内运行，是量子密码分析的首批例子；离散对数版本使用 \( \mathbb{Z}_{N} \times \mathbb{Z}_{N} \) 上的 QFT，每次尝试成功概率为 \( \varphi(N)/N = \Omega(1/\log \log N) \)。<sup>[13](https://epubs.siam.org/doi/10.1137/S0036144598347011)</sup><sup> • </sup><sup>[17](https://www.cs.umd.edu/~amchilds/teaching/w13/l02.pdf)</sup> QFT 也是阿贝尔（Abelian）隐藏子群问题、HHL 线性系统算法和量子主成分分析的基础。<sup>[10](https://gilyen.hu/teaching/PCMI_2023_QFT_prez_day_1.pdf)</sup><sup> • </sup><sup>[3](https://link.springer.com/article/10.1007/s11128-026-05067-7)</sup>

## 局限与替代方案

核心局限在于读出：单个傅里叶变换后的输出振幅无法通过测量获取，而直接读出一个振幅需要指数多次重复。<sup>[5](https://export.arxiv.org/pdf/quant-ph/0211030v1.pdf)</sup><sup> • </sup><sup>[11](https://dojo.qulacs.org/en/qp_main/notebooks/2.3_quantum_Fourier_transform.html)</sup> \( O(n^{2}) \) 对 \( O(n \cdot 2^{n}) \) 的优势，建立在利用相位信息而不测量量子态之上；任何测量至多提取 \( n = \log N \) 比特，因此 QFT 并不是对经典 FFT 的指数加速——经典 FFT 用 \( O(N \log N) \) 次运算计算该变换。<sup>[16](http://arxiv.org/pdf/1006.3989)</sup><sup> • </sup><sup>[20](https://people.eecs.berkeley.edu/~vazirani/f04quantum/notes/lec8.pdf)</sup> 对于基态输入，经典算法可以在 \( O(n) \) 时间内生成 QFT 输出的紧凑乘积态描述，尽管显式输出全部振幅至少需要 \( \Omega(2^{n}) \) 时间。<sup>[16](http://arxiv.org/pdf/1006.3989)</sup> 在容错场景中，门合成主导成本；后藤（Goto）发现，对于容错 QFT，辅助量子比特辅助的门合成优于态蒸馏。<sup>[21](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.90.052318)</sup> 硬件演示发展迅速：半经典 QFT 已在分段多区阱中的三个铍离子量子比特上实现，<sup>[7](https://www.science.org/doi/10.1126/science.1110335)</sup> Q-CTRL 的研究人员后来在 [IBM Quantum](https://www.edgepedia.org/zh/ibm-quantum) 计算机上演示了 100 量子比特的 QFT。这些结果代表着迄今在任何量子硬件上最大的实验 QFT，规模是此前最大者的两倍。<sup>[22](https://q-ctrl.com/blog/breaking-the-100-qubit-barrier-executing-the-quantum-fourier-transform-at-scale-on-ibm-hardware)</sup>

近期工作聚焦资源成本。一种使用 \( O(n) \) 次中途测量的动态 QFT 取代了 \( O(n^{2}) \) 的双量子比特门电路，且无需连通性约束。<sup>[3](https://link.springer.com/article/10.1007/s11128-026-05067-7)</sup> 2025 年的一种构造达到深度 \( O(\log(n/\varepsilon)) \)，无需辅助量子比特、长程门或测量；而此前的对数深度电路需要 \( O(n \log n) \) 个辅助量子比特。将其用于基于 QFT 的乘法器，可得到深度为 \( O(n^{1+\varepsilon}) \)、总量子比特数为 \( 2n + O(n/\log n) \) 的因数分解算法。<sup>[19](https://arxiv.org/html/2505.00701)</sup> 南、苏和马斯洛夫估计，约 \( 5.3 \times 10^{4} \) 个受控旋转门足以分解 2048 位整数，预期算法精度至少为 99.992%。<sup>[8](https://doi.org/10.1038/s41534-020-0257-5)</sup>

## References

1. [Fast parallel circuits for the quantum Fourier transform (Cleve & Watrous)](https://ar5iv.labs.arxiv.org/html/quant-ph/0006004)
2. [Quantum Fourier transform (Chapter 12), Quantum Algorithms: A Survey of Applications and End-to-end Complexities (Cambridge University Press, 2025)](https://www.cambridge.org/core/books/quantum-algorithms/quantum-fourier-transform/4F2B669EE1363DF9BBB83D66F05C6041)
3. [A review on quantum Fourier transform (Quantum Information Processing, 2026)](https://link.springer.com/article/10.1007/s11128-026-05067-7)
4. [Quantum Fourier Transform (BerkeleyX CS-191x, Chapter 5)](https://prod-edxapp.edx-cdn.org/assets/courseware/v1/8f101da9d14cfeec83df9e42a70562bf/c4x/BerkeleyX/CS-191x/asset/chap5.pdf)
5. [Implementation of the quantum Fourier transform on NMR quantum computers](https://export.arxiv.org/pdf/quant-ph/0211030v1.pdf)
6. [Quantum Computing (CST Part II), Lecture 9: Quantum Fourier Transform & Quantum Phase Estimation (University of Cambridge)](https://www.cl.cam.ac.uk/teaching/2324/QuantComp/Quantum_Computing_Lecture_9_2024.pdf)
7. [Implementation of the Semiclassical Quantum Fourier Transform in a Scalable System](https://www.science.org/doi/10.1126/science.1110335)
8. [Yunseong Nam, Yuan Su, Dmitri Maslov (2020). Approximate quantum Fourier transform with O(n log(n)) T gates. npj Quantum Information.](https://doi.org/10.1038/s41534-020-0257-5)
9. [10.9 Quantum Fourier transform | Introduction to Quantum Information Science](https://qubit.guide/10.9-quantum-fourier-transform)
10. [Quantum Fourier transform beyond Shor's algorithm (Gilyén, PCMI 2023, Day 1)](https://gilyen.hu/teaching/PCMI_2023_QFT_prez_day_1.pdf)
11. [2-3. Quantum Fourier Transform (Qulacs Dojo)](https://dojo.qulacs.org/en/qp_main/notebooks/2.3_quantum_Fourier_transform.html)
12. [AQI Lecture 1 (Module 4): Quantum Fourier Transform and Phase Estimation](https://quantumnanophotonics.org/wp-content/uploads/2023/07/module4lecture1.pdf)
13. [Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer (Shor)](https://epubs.siam.org/doi/10.1137/S0036144598347011)
14. [Robert B. Griffiths, Chi-Sheng Niu (1996). Semiclassical Fourier Transform for Quantum Computation. Physical Review Letters.](https://doi.org/10.1103/physrevlett.76.3228)
15. [Semiclassical Fourier Transform for Quantum Computation (Griffiths & Niu, preprint full text)](https://arxiv.org/pdf/quant-ph/9511007)
16. [De-quantisation of the Quantum Fourier Transform](http://arxiv.org/pdf/1006.3989)
17. [Quantum Fourier transform (lecture notes, UMD, Andrew Childs)](https://www.cs.umd.edu/~amchilds/teaching/w13/l02.pdf)
18. [The quantum Fourier transform on a linear nearest neighbor architecture (Quantum Information & Computation)](https://www.rintonpress.com/xqic7/qic-7-4/383-391.pdf)
19. [A log-depth in-place quantum Fourier transform that rarely needs ancillas (arXiv, 2025)](https://arxiv.org/html/2505.00701)
20. [CS 294 Quantum Computing, Lecture 8: Quantum Fourier transform (Vazirani, Fall 2004)](https://people.eecs.berkeley.edu/~vazirani/f04quantum/notes/lec8.pdf)
21. [Resource requirements for a fault-tolerant quantum Fourier transform (Goto, Phys. Rev. A 90, 052318, 2014)](https://journals.aps.org/pra/abstract/10.1103/PhysRevA.90.052318)
22. [Breaking the 100-qubit barrier: Executing the Quantum Fourier Transform at scale on IBM hardware | Q-CTRL](https://q-ctrl.com/blog/breaking-the-100-qubit-barrier-executing-the-quantum-fourier-transform-at-scale-on-ibm-hardware)

---
*Initially written Sep 29, 2026 · Edited: Oct 15, 2026; Oct 21, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › 算法与计算方法 › 数值、字符串与几何算法 › 傅里叶与信号变换

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/quantum-fourier-transform

English original: https://www.edgepedia.org/quantum-fourier-transform
