quantum Fourier transform

{{Short description|Change of basis applied in quantum computing}}

{{Use American English|date=January 2019}}In quantum computing, the quantum Fourier transform (QFT) is a linear transformation on quantum bits, and is the quantum analogue of the discrete Fourier transform. The quantum Fourier transform is a part of many quantum algorithms, notably Shor's algorithm for factoring and computing the discrete logarithm, the quantum phase estimation algorithm for estimating the eigenvalues of a unitary operator, and algorithms for the hidden subgroup problem. The quantum Fourier transform was discovered by Don Coppersmith.{{cite report |type=Preprint |last1=Coppersmith |first1=D. |title=An approximate Fourier transform useful in quantum factoring |date=2002 |arxiv=quant-ph/0201067 }} With small modifications to the QFT, it can also be used for performing fast integer arithmetic operations such as addition and multiplication.{{cite arXiv |last=Draper |first=Thomas G. |eprint=quant-ph/0008033 |title=Addition on a Quantum Computer |date=7 Aug 2000}}{{cite journal |last1=Ruiz-Perez |first1=Lidia |last2=Juan Carlos |first2=Garcia-Escartin |title=Quantum arithmetic with the quantum Fourier transform |journal=Quantum Information Processing |arxiv=1411.5949v2 |date=2 May 2017 |volume=16 |issue=6 |page=152 |doi=10.1007/s11128-017-1603-1 |bibcode=2017QuIP...16..152R |s2cid=10948948}}{{cite journal | last=Şahin | first=Engin | title=Quantum arithmetic operations based on quantum Fourier transform on signed integers | year=2020 | journal=International Journal of Quantum Information | volume=18 | issue=6 | pages=2050035 | issn=1793-6918 | doi=10.1142/s0219749920500355 | arxiv=2005.00443v3| bibcode=2020IJQI...1850035S }}

The quantum Fourier transform can be performed efficiently on a quantum computer with a decomposition into the product of simpler unitary matrices. The discrete Fourier transform on 2^n amplitudes can be implemented as a quantum circuit consisting of only O(n^2) Hadamard gates and controlled phase shift gates, where n is the number of qubits.{{cite book |doi=10.1017/CBO9780511976667 |title=Quantum Computation and Quantum Information |date=2012 |last1=Nielsen |first1=Michael A. |last2=Chuang |first2=Isaac L. |isbn=978-1-107-00217-3 }} This can be compared with the classical discrete Fourier transform, which takes O(n2^n) gates (where n is the number of bits), which is exponentially more than O(n^2).

The quantum Fourier transform acts on a quantum state vector (a quantum register), and the classical discrete Fourier transform acts on a vector. Both types of vectors can be written as lists of complex numbers. In the classical case, the vector can be represented with e.g. an array of floating-point numbers, and in the quantum case it is a sequence of probability amplitudes for all the possible outcomes upon measurement (the outcomes are the basis states, or eigenstates). Because measurement collapses the quantum state to a single basis state, not every task that uses the classical Fourier transform can take advantage of the quantum Fourier transform's exponential speedup.

The best quantum Fourier transform algorithms known (as of late 2000) require only O(n \log n) gates to achieve an efficient approximation, provided that a controlled phase gate is implemented as a native operation.{{Cite book |last1=Hales |first1=L. |last2=Hallgren |first2=S. |title=Proceedings 41st Annual Symposium on Foundations of Computer Science |chapter=An improved quantum Fourier transform algorithm and applications |date=November 12–14, 2000 |pages=515–525 |doi=10.1109/SFCS.2000.892139 |isbn=0-7695-0850-2 |citeseerx=10.1.1.29.4161 |s2cid=424297}}

Definition

The quantum Fourier transform is the classical discrete Fourier transform applied to the vector of amplitudes of a quantum state, which has length N = 2^n if it is applied to a register of n qubits.

The classical Fourier transform acts on a vector (x_0, x_1, \ldots , x_{N-1}) \in \mathbb{C}^N and maps it to the vector

(y_0, y_1, \ldots , y_{N-1}) \in \mathbb{C}^N according to the formula

: y_k = \frac{1}{\sqrt{N}} \sum_{j=0}^{N-1} x_j \omega_N^{-jk}, \quad k = 0, 1, 2, \ldots, N - 1,

where \omega_N = e^{\frac{2 \pi i}{N}} is an N-th root of unity.

Similarly, the quantum Fourier transform acts on a quantum state |x\rangle = \sum_{j=0}^{N-1} x_j |j\rangle and maps it to a quantum state \sum_{j=0}^{N-1} y_j |j\rangle according to the formula

: y_k = \frac{1}{\sqrt{N}} \sum_{j=0}^{N-1} x_j \omega_N^{jk}, \quad k = 0, 1, 2, \ldots, N - 1.

(Conventions for the sign of the phase factor exponent vary; here the quantum Fourier transform has the same effect as the inverse discrete Fourier transform, and conversely.)

Since \omega_N^l is a rotation, the inverse quantum Fourier transform acts similarly but with

: x_j = \frac{1}{\sqrt{N}} \sum_{k=0}^{N-1} y_k \omega_N^{-jk}, \quad j = 0, 1, 2, \ldots, N - 1,

In case that |x\rangle is a basis state, the quantum Fourier transform can also be expressed as the map

: \operatorname{QFT}: |x\rangle \mapsto \frac{1}{\sqrt{N}} \sum_{k=0}^{N-1} \omega_N^{xk} |k\rangle.

Equivalently, the quantum Fourier transform can be viewed as a unitary matrix (or quantum gate) acting on quantum state vectors, where the unitary matrix F_N is the DFT matrix

:

F_N = \frac{1}{\sqrt{N}} \begin{bmatrix}

1 & 1 & 1 & 1 & \cdots & 1 \\

1 & \omega & \omega^2 & \omega^3 & \cdots & \omega^{N-1} \\

1 & \omega^2 & \omega^4 & \omega^6 & \cdots & \omega^{2(N-1)} \\

1 & \omega^3 & \omega^6 & \omega^9 & \cdots & \omega^{3(N-1)} \\

\vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\

1 & \omega^{N-1} & \omega^{2(N-1)} & \omega^{3(N-1)} & \cdots & \omega^{(N-1)(N-1)}

\end{bmatrix},

where \omega = \omega_N. For example, in the case of N = 4 = 2^2 and phase \omega = i the transformation matrix is

:

F_4 = \frac{1}{2} \begin{bmatrix}

1 & 1 & 1 & 1 \\

1 & i & -1 & -i \\

1 & -1 & 1 & -1 \\

1 & -i & -1 & i

\end{bmatrix}

{{see also|Generalizations of Pauli matrices#Construction: The clock and shift matrices}}

Properties

= Unitarity =

Most of the properties of the quantum Fourier transform follow from the fact that it is a unitary transformation. This can be checked by performing matrix multiplication and ensuring that the relation FF^{\dagger}=F^{\dagger}F=I holds, where F^\dagger is the Hermitian adjoint of F. Alternately, one can check that orthogonal vectors of norm 1 get mapped to orthogonal vectors of norm 1.

From the unitary property it follows that the inverse of the quantum Fourier transform is the Hermitian adjoint of the Fourier matrix, thus F^{-1}=F^{\dagger}. Since there is an efficient quantum circuit implementing the quantum Fourier transform, the circuit can be run in reverse to perform the inverse quantum Fourier transform. Thus both transforms can be efficiently performed on a quantum computer.

Circuit implementation

The quantum gates used in the circuit of n qubits are the Hadamard gate and the dyadic rational phase gate R_k:

H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \qquad

\text{and} \qquad

R_k = \begin{pmatrix} 1 & 0 \\ 0 & e^{i2\pi/2^k} \end{pmatrix}

The circuit is composed of H gates and the controlled version of R_k:

File:Q fourier nqubits.png

An orthonormal basis consists of the basis states

: |0\rangle, \ldots , |2^n - 1\rangle.

These basis states span all possible states of the qubits:

: | x \rangle = | x_1 x_2 \ldots x_n \rangle = | x_1 \rangle \otimes | x_2 \rangle \otimes \cdots \otimes | x_n \rangle

where, with tensor product notation \otimes, |x_j\rangle indicates that qubit j is in state x_j, with x_j either 0 or 1. By convention, the basis state index x is the binary number encoded by the x_j, with x_1 the most significant bit.

The action of the Hadamard gate is H|x_j\rangle=\left(\frac{1}{\sqrt{2}}\right)\left(|0\rangle+e^{2\pi i x_j 2^{-1}}|1\rangle \right) , where the sign depends on x_i.

The quantum Fourier transform can be written as the tensor product of a series of terms:

:

\text{QFT}(|x\rangle) = \frac{1}{\sqrt{N}} \bigotimes_{j=1}^{n} \left( |0\rangle + \omega_N^{x2^{n-j}} |1\rangle \right).

Using the fractional binary notation

: [0. x_1 \ldots x_m] = \sum_{k = 1}^m x_k 2^{-k},

the action of the quantum Fourier transform can be expressed in a compact manner:

:\text{QFT}(|x_1 x_2 \ldots x_n \rangle) = \frac{1}{\sqrt{N}} \ \left(|0\rangle + e^{2 \pi i \, [0.x_n] }|1\rangle\right) \otimes \left(|0\rangle + e^{2 \pi i \, [0.x_{n-1} x_n] }|1\rangle\right) \otimes \cdots \otimes \left(|0\rangle + e^{2 \pi i \, [0.x_1 x_2 \ldots x_n] }|1\rangle\right).

To obtain this state from the circuit depicted above, a swap operation of the qubits must be performed to reverse their order. At most n/2 swaps are required.

Because the discrete Fourier transform, an operation on n qubits, can be factored into the tensor product of n single-qubit operations, it is easily represented as a quantum circuit (up to an order reversal of the output). Each of those single-qubit operations can be implemented efficiently using one Hadamard gate and a linear number of controlled phase gates. The first term requires one Hadamard gate and (n-1) controlled phase gates, the next term requires one Hadamard gate and (n-2) controlled phase gate, and each following term requires one fewer controlled phase gate. Summing up the number of gates, excluding the ones needed for the output reversal, gives n + (n-1) + \cdots + 1 = n(n+1)/2 = O(n^2) gates, which is quadratic polynomial in the number of qubits. This value is much smaller than for the classical Fourier transformation.{{Cite book |last1=Kurgalin |first1=Sergei |title=Concise guide to quantum computing: algorithms, exercises, and implementations |last2=Borzunov |first2=Sergei |date=2021 |publisher=Springer |isbn=978-3-030-65054-4 |series=Texts in computer science |location=Cham}}

The circuit-level implementation of the quantum Fourier transform on a linear nearest neighbor architecture has been studied before.{{cite journal |last1=Fowler |first1=A.G. |last2=Devitt |first2=S.J. |last3=Hollenberg |first3=L.C.L. |title=Implementation of Shor's algorithm on a linear nearest neighbour qubit array |journal=Quantum Information and Computation |date=July 2004 |volume=4 |issue=4 |pages=237–251 |doi=10.26421/QIC4.4-1 }}{{cite journal |last1=Maslov |first1=Dmitri |title=Linear depth stabilizer and quantum Fourier transformation circuits with no auxiliary qubits in finite-neighbor quantum architectures |journal=Physical Review A |date=15 November 2007 |volume=76 |issue=5 |page=052310 |doi=10.1103/PhysRevA.76.052310 |s2cid=18645435 |arxiv=quant-ph/0703211 |bibcode=2007PhRvA..76e2310M }} The circuit depth is linear in the number of qubits.

Example

The quantum Fourier transform on three qubits, F_8 with n=3, N=8=2^3, is represented by the following transformation:

:\text{QFT}: |x\rangle \mapsto \frac{1}{\sqrt{8}} \sum_{k=0}^{7} \omega^{xk} |k\rangle,

where \omega = \omega_{8} is an eighth root of unity satisfying \omega^8=\left(e^{\frac{i2\pi}{8}}\right)^8=1.

The matrix representation of the Fourier transform on three qubits is:

:

F_8 = \frac{1}{\sqrt{8}} \begin{bmatrix} 1&1&1&1&1&1&1&1 \\

1&\omega&\omega^2&\omega^3&\omega^4&\omega^5&\omega^6&\omega^7 \\

1&\omega^2&\omega^4&\omega^6&1&\omega^2&\omega^4&\omega^6 \\

1&\omega^3&\omega^6&\omega&\omega^4&\omega^7&\omega^2&\omega^5 \\

1&\omega^4&1&\omega^4&1&\omega^4&1&\omega^4 \\

1&\omega^5&\omega^2&\omega^7&\omega^4&\omega&\omega^6&\omega^3 \\

1&\omega^6&\omega^4&\omega^2&1&\omega^6&\omega^4&\omega^2 \\

1&\omega^7&\omega^6&\omega^5&\omega^4&\omega^3&\omega^2&\omega \\

\end{bmatrix}.

The 3-qubit quantum Fourier transform can be rewritten as:

:\text{QFT}(|x_1, x_2, x_3 \rangle ) = \frac{1}{\sqrt{8}} \ \left(|0\rangle + e^{2 \pi i \, [0.x_3] }|1\rangle\right) \otimes \left(|0\rangle + e^{2 \pi i \, [0.x_2 x_3] }|1\rangle\right) \otimes \left(|0\rangle + e^{2 \pi i \, [0.x_1 x_2 x_3] }|1\rangle\right).

The following sketch shows the respective circuit for n=3 (with reversed order of output qubits with respect to the proper QFT):

File:Q fourier 3qubits.png

As calculated above, the number of gates used is n(n+1)/2 which is equal to 6, for n=3.

Relation to quantum Hadamard transform

{{see also|Hadamard transform#Quantum computing applications}}

Using the generalized Fourier transform on finite (abelian) groups, there are actually two natural ways to define a quantum Fourier transform on an n-qubit quantum register. The QFT as defined above is equivalent to the DFT, which considers these n qubits as indexed by the cyclic group \Z / 2^n \Z. However, it also makes sense to consider the qubits as indexed by the Boolean group (\Z / 2 \Z)^n, and in this case the Fourier transform is the Hadamard transform. This is achieved by applying a Hadamard gate to each of the n qubits in parallel.[https://www.staff.uni-mainz.de/pommeren/Kryptologie/Bitblock/A_Nonlin/Fourier.pdf Fourier Analysis of Boolean Maps– A Tutorial –, pp. 12-13]{{full|date=June 2024}}[https://web.archive.org/web/20210713134541/https://www.cse.iitk.ac.in/users/rmittal/prev_course/s19/reports/5_algo.pdf Lecture 5: Basic quantum algorithms, Rajat Mittal, pp. 4-5] Shor's algorithm uses both types of Fourier transforms, an initial Hadamard transform as well as a QFT.

For other groups

The Fourier transform can be formulated for groups other than the cyclic group, and extended to the quantum setting.{{cite report |type=Preprint |last1=Moore |first1=Cristopher |last2=Rockmore |first2=Daniel |last3=Russell |first3=Alexander |title=Generic Quantum Fourier Transforms |date=2003 |arxiv=quant-ph/0304064 }} For example, consider the symmetric group S_n.{{cite journal |last1=Kawano |first1=Yasuhito |last2=Sekigawa |first2=Hiroshi |title=Quantum Fourier transform over symmetric groups — improved result |journal=Journal of Symbolic Computation |date=July 2016 |volume=75 |pages=219–243 |doi=10.1016/j.jsc.2015.11.016 }}{{cite book |doi=10.1145/258533.258548 |chapter=Quantum computation of Fourier transforms over symmetric groups |title=Proceedings of the twenty-ninth annual ACM symposium on Theory of computing - STOC '97 |date=1997 |last1=Beals |first1=Robert |pages=48–53 |isbn=0-89791-888-6 }} The Fourier transform can be expressed in matrix form

: \mathfrak{F}_n = \sum_{\lambda \in \Lambda_n} \sum_{p,q \in \mathcal{P}(\lambda)} \sum_{g \in S_n} \sqrt{\frac{d_\lambda}{n!}}[\lambda(g)]_{q,p} |\lambda, p, q\rangle \langle g|,

where [\lambda(g)]_{q,p} is the (q, p) element of the matrix representation of \lambda(g), \mathcal{P}(\lambda) is the set of paths from the root node to \lambda in the Bratteli diagram of S_n, \Lambda_n is the set of representations of S_n indexed by Young diagrams, and g is a permutation.

Over a finite field

The discrete Fourier transform can also be formulated over a finite field F_q, and a quantum version can be defined.{{cite journal |last1=de Beaudrap |first1=Niel |last2=Cleve |first2=Richard |last3=Waltrous |first3=John |title=Sharp Quantum versus Classical Query Complexity Separations |journal=Algorithmica |date=8 November 2002 |volume=34 |issue=4 |pages=449–461 |doi=10.1007/s00453-002-0978-1 }} Consider N = q = p^n. Let \phi: GF(q) \to GF(p) be an arbitrary linear map (trace, for example). Then for each x \in GF(q) define

: F_{q,\phi}: |x\rangle \mapsto \frac{1}{\sqrt{q}} \sum_{y \in GF(q)} \omega^{\phi(xy)}|y \rangle

for \omega = e^{2\pi i/p} and extend F_{q,\phi} linearly.

References

{{reflist}}

Further reading

  • {{cite book |last1=Parthasarathy |first1=K. R. |authorlink1=K. R. Parthasarathy (probabilist) |title=Lectures on Quantum Computation, Quantum Error Correcting Codes and Information Theory |date=2006 |publisher=Tata Institute of Fundamental Research |isbn=978-81-7319-688-1 }}
  • {{cite web |last1=Preskill |first1=John |authorlink1=John Preskill |title=Lecture Notes for Physics 229: Quantum Information and Computation |date=September 1998 |url=https://web.gps.caltech.edu/~rls/book.pdf }}