Trisha Shetty (Editor)

Quantum Fourier transform

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Quantum Fourier transform

In quantum computing, the quantum Fourier transform 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.

Contents

The quantum Fourier transform can be performed efficiently on a quantum computer, with a particular decomposition into a product of simpler unitary matrices. Using a simple decomposition, 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. This can be compared with the classical discrete Fourier transform, which takes O ( n 2 n ) gates (where n is the number of bits), which is exponentially more than O ( n 2 ) . However, the quantum Fourier transform acts on a quantum state, whereas the classical Fourier transform acts on a vector, so not every task that uses the classical Fourier transform can take advantage of this exponential speedup.

The best quantum Fourier transform algorithms known today require only O ( n log n ) gates to achieve an efficient approximation.

Definition

The quantum Fourier transform is the classical discrete Fourier transform applied to the vector of amplitudes of a quantum state. The classical (unitary) Fourier transform acts on a vector (x0, ..., xN−1) in C N and maps it to the vector (y0, ..., yN−1) according to the formula

y k = 1 N j = 0 N 1 x j ω j k ,

where ω j k = e 2 π i j k N is a Nth root of unity.

Similarly, the quantum Fourier transform acts on a quantum state i = 0 N 1 x i | i and maps it to a quantum state i = 0 N 1 y i | i according to the formula:

y k = 1 N j = 0 N 1 x j ω j k ,

with ω j k defined as above.

This can also be expressed as the map

| j 1 N k = 0 N 1 ω j k | k .

Equivalently, the quantum Fourier transform can be viewed as a unitary matrix (quantum gate, similar to a logic gate for classical computers) acting on quantum state vectors, where the unitary matrix F N is given by

F N = 1 N [ 1 1 1 1 1 1 ω ω 2 ω 3 ω N 1 1 ω 2 ω 4 ω 6 ω 2 ( N 1 ) 1 ω 3 ω 6 ω 9 ω 3 ( N 1 ) 1 ω N 1 ω 2 ( N 1 ) ω 3 ( N 1 ) ω ( N 1 ) ( N 1 ) ] .

Here ω = e 2 π i N is a primitive Nth root of unity. For example, in the case of N = 4 we would find that ω = i , so

F 4 = 1 2 [ 1 1 1 1 1 i 1 i 1 1 1 1 1 i 1 i ] .

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 F F = F F = I holds, where F is the Hermitian adjoint of F . Alternately, one can check that vectors of norm 1 get mapped to 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 . 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 Fourier transform can be approximately implemented for any N; however, the implementation for the case where N is a power of 2 is much simpler. Suppose N = 2n. We have the orthonormal basis consisting of the vectors

| 0 , , | 2 n 1 .

The basis states enumerate all the possible states of the qubits:

| x = | x 1 x 2 x n = | x 1 | x 2 | x n

where, with tensor product notation , | x j indicates that qubit j is in state x j , with x j either 0 or 1. By convention, the basis state index x orders the possible states of the qubits lexicographically, i.e., by converting from binary to decimal in this way:

x = x 1 2 n 1 + x 2 2 n 2 + + x n 2 0 .

It is also useful to borrow fractional binary notation:

[ 0. x 1 x m ] = k = 1 m x k 2 k .

For instance, [ 0. x 1 ] = x 1 2 and [ 0. x 1 x 2 ] = x 1 2 + x 2 2 2 .

With this notation, the action of the quantum Fourier transform can be expressed as:

| x 1 x 2 x n 1 N   ( | 0 + e 2 π i [ 0. x n ] | 1 ) ( | 0 + e 2 π i [ 0. x n 1 x n ] | 1 ) ( | 0 + e 2 π i [ 0. x 1 x 2 x n ] | 1 ) ,

where the output qubit 1 is in a superposition of state | 0 and e 2 π i [ 0. x n ] | 1 , and so on for the other qubits.

In other words, the discrete Fourier transform, an operation on n-qubits, can be factored into the tensor product of n single-qubit operations, suggesting it is easily represented as a quantum circuit. In fact, each of those single-qubit operations can be implemented efficiently using a Hadamard gate and controlled phase gates. The first term requires one Hadamard gate, the next one requires a Hadamard gate and a controlled phase gate, and each following term requires an additional controlled phase gate. Summing up the number of gates gives 1 + 2 + + n = n ( n + 1 ) / 2 = O ( n 2 ) gates, which is polynomial in the number of qubits.

Example

Consider the quantum Fourier transform on 3 qubits. It is the following transformation:

| j 1 2 3 k = 0 2 3 1 ω j k | k ,

where ω is a primitive eighth root of unity satisfying ω 8 = ( e 2 π i 8 ) 8 = 1 (since N = 2 3 = 8 ).

The matrix representing this transformation on 3 qubits is

F 2 3 = 1 2 3 [ 1 1 1 1 1 1 1 1 1 ω ω 2 ω 3 ω 4 ω 5 ω 6 ω 7 1 ω 2 ω 4 ω 6 ω 8 ω 10 ω 12 ω 14 1 ω 3 ω 6 ω 9 ω 12 ω 15 ω 18 ω 21 1 ω 4 ω 8 ω 12 ω 16 ω 20 ω 24 ω 28 1 ω 5 ω 10 ω 15 ω 20 ω 25 ω 30 ω 35 1 ω 6 ω 12 ω 18 ω 24 ω 30 ω 36 ω 42 1 ω 7 ω 14 ω 21 ω 28 ω 35 ω 42 ω 49 ] = 1 2 3 [ 1 1 1 1 1 1 1 1 1 ω ω 2 ω 3 ω 4 ω 5 ω 6 ω 7 1 ω 2 ω 4 ω 6 1 ω 2 ω 4 ω 6 1 ω 3 ω 6 ω ω 4 ω 7 ω 2 ω 5 1 ω 4 1 ω 4 1 ω 4 1 ω 4 1 ω 5 ω 2 ω 7 ω 4 ω ω 6 ω 3 1 ω 6 ω 4 ω 2 1 ω 6 ω 4 ω 2 1 ω 7 ω 6 ω 5 ω 4 ω 3 ω 2 ω ] .

The 3-qubit quantum Fourier transform is the following operation:

| x 1 , x 2 , x 3 1 2 3   ( | 0 + e 2 π i [ 0. x 3 ] | 1 ) ( | 0 + e 2 π i [ 0. x 2 x 3 ] | 1 ) ( | 0 + e 2 π i [ 0. x 1 x 2 x 3 ] | 1 ) .

This quantum circuit implements the quantum Fourier transform on the quantum state | x 1 , x 2 , x 3 .

The quantum gates used in the circuit above are the Hadamard gate and the controlled phase gate R θ .

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

References

Quantum Fourier transform Wikipedia