In
quantum computing
Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Thou ...
, the quantum Fourier transform (QFT) is a
linear transformation
In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pr ...
on
quantum bits, and is the quantum analogue of the
discrete Fourier transform
In mathematics, the discrete Fourier transform (DFT) converts a finite sequence of equally-spaced Sampling (signal processing), samples of a function (mathematics), function into a same-length sequence of equally-spaced samples of the discre ...
. The quantum Fourier transform is a part of many
quantum algorithms, notably
Shor's algorithm
Shor's algorithm is a quantum computer algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor.
On a quantum computer, to factor an integer N , Shor's algorithm runs in polynomial ...
for factoring and computing the
discrete logarithm
In mathematics, for given real numbers ''a'' and ''b'', the logarithm log''b'' ''a'' is a number ''x'' such that . Analogously, in any group ''G'', powers ''b'k'' can be defined for all integers ''k'', and the discrete logarithm log' ...
, the
quantum phase estimation algorithm for estimating the
eigenvalue
In linear algebra, an eigenvector () or characteristic vector of a linear transformation is a nonzero vector that changes at most by a scalar factor when that linear transformation is applied to it. The corresponding eigenvalue, often denot ...
s of a
unitary operator
In functional analysis, a unitary operator is a surjective bounded operator on a Hilbert space that preserves the inner product. Unitary operators are usually taken as operating ''on'' a Hilbert space, but the same notion serves to define the c ...
, and algorithms for the
hidden subgroup problem
The hidden subgroup problem (HSP) is a topic of research in mathematics and theoretical computer science. The framework captures problems such as factoring, discrete logarithm, graph isomorphism, and the shortest vector problem. This makes it esp ...
. The quantum Fourier transform was discovered by
Don Coppersmith
Don Coppersmith (born 1950) is a cryptographer and mathematician. He was involved in the design of the Data Encryption Standard block cipher at IBM, particularly the design of the S-boxes, strengthening them against differential cryptanalysis.
...
.
[
]
The quantum Fourier transform can be performed efficiently on a quantum computer with a decomposition into the product of simpler
unitary matrices
In linear algebra, a complex square matrix is unitary if its conjugate transpose is also its inverse, that is, if
U^* U = UU^* = UU^ = I,
where is the identity matrix.
In physics, especially in quantum mechanics, the conjugate transpose is ...
. The discrete Fourier transform on
amplitudes can be implemented as a
quantum circuit
In quantum information theory, a quantum circuit is a model for quantum computation, similar to classical circuits, in which a computation is a sequence of quantum gates, measurements, initializations of qubits to known values, and possibly ...
consisting of only
Hadamard gate
The Hadamard transform (also known as the Walsh–Hadamard transform, Hadamard–Rademacher–Walsh transform, Walsh transform, or Walsh–Fourier transform) is an example of a generalized class of Fourier transforms. It performs an orthogonal ...
s and
controlled phase shift gates, where
is the number of qubits.
This can be compared with the classical discrete Fourier transform, which takes
gates (where
is the number of bits), which is exponentially more than
.
The quantum Fourier transform acts on a
quantum state
In quantum physics, a quantum state is a mathematical entity that provides a probability distribution for the outcomes of each possible measurement on a system. Knowledge of the quantum state together with the rules for the system's evolution in ...
vector (a
quantum register In quantum computing, a quantum register is a system comprising multiple qubits. It is the quantum analogue of the classical processor register. Quantum computers perform calculations by manipulating qubits within a quantum register.
Definition ...
), and the classical Fourier transform acts on a vector. Both types of vectors can be written as lists of complex numbers. In the quantum case it is a sequence of
probability amplitude
In quantum mechanics, a probability amplitude is a complex number used for describing the behaviour of systems. The modulus squared of this quantity represents a probability density.
Probability amplitudes provide a relationship between the qu ...
s for all the possible outcomes upon
measurement (called ''basis states'', or ''
eigenstate
In quantum physics, a quantum state is a mathematical entity that provides a probability distribution for the outcomes of each possible measurement on a system. Knowledge of the quantum state together with the rules for the system's evolution in ...
s''). 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
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, where we usually consider vectors of length
.
The classical Fourier transform acts on a
vector
Vector most often refers to:
*Euclidean vector, a quantity with a magnitude and a direction
*Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematic ...
and maps it to the vector
according to the formula:
:
where
and
is an ''N''-th
root of unity
In mathematics, a root of unity, occasionally called a de Moivre number, is any complex number that yields 1 when raised to some positive integer power . Roots of unity are used in many branches of mathematics, and are especially important i ...
.
Similarly, the quantum Fourier transform acts on a quantum state
and maps it to a quantum state
according to the formula:
:
(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 vice versa.)
Since
is a rotation, the inverse quantum Fourier transform acts similarly but with:
:
In case that
is a basis state, the quantum Fourier Transform can also be expressed as the map
:
Equivalently, the quantum Fourier transform can be viewed as a
unitary matrix
In linear algebra, a Complex number, complex Matrix (mathematics), square matrix is unitary if its conjugate transpose is also its Invertible matrix, inverse, that is, if
U^* U = UU^* = UU^ = I,
where is the identity matrix.
In physics, esp ...
(or
quantum gate
In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate (or simply quantum gate) is a basic quantum circuit operating on a small number of qubits. They are the building blocks of quantum circuits, li ...
) acting on quantum state vectors, where the unitary matrix
is given by
:
where
. We get, for example, in the case of
and phase
the transformation matrix
:
Properties
Unitarity
Most of the properties of the quantum Fourier transform follow from the fact that it is a
unitary transformation
In mathematics, a unitary transformation is a transformation that preserves the inner product: the inner product of two vectors before the transformation is equal to their inner product after the transformation.
Formal definition
More precisely, ...
. This can be checked by performing
matrix multiplication
In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the ...
and ensuring that the relation
holds, where
is the
Hermitian adjoint
In mathematics, specifically in operator theory, each linear operator A on a Euclidean vector space defines a Hermitian adjoint (or adjoint) operator A^* on that space according to the rule
:\langle Ax,y \rangle = \langle x,A^*y \rangle,
wher ...
of
. 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
. 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 gate
In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate (or simply quantum gate) is a basic quantum circuit operating on a small number of qubits. They are the building blocks of quantum circuits, li ...
s used in the circuit of
qubits are the
Hadamard gate
The Hadamard transform (also known as the Walsh–Hadamard transform, Hadamard–Rademacher–Walsh transform, Walsh transform, or Walsh–Fourier transform) is an example of a generalized class of Fourier transforms. It performs an orthogonal ...
and the
phase gate , here in terms of
:
with
the
-th root of unity. The circuit is composed of
gates and the
controlled version of

An orthonormal basis consists of the basis states
:
These basis states span all possible states of the qubits:
:
where, with
tensor product
In mathematics, the tensor product V \otimes W of two vector spaces and (over the same Field (mathematics), field) is a vector space to which is associated a bilinear map V\times W \to V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an e ...
notation
,
indicates that qubit
is in state
, with
either 0 or 1. By convention, the basis state index
is the
binary number
A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method of mathematical expression which uses only two symbols: typically "0" ( zero) and "1" (one).
The base-2 numeral system is a positional notati ...
encoded by the
, with
the most significant bit. The quantum Fourier transform can be written as the tensor product of a series of terms:
:
Using the fractional binary notation
:
the action of the quantum Fourier transform can be expressed in a compact manner:
:
To obtain this state from the circuit depicted above, a
swap operation of the qubits must be performed to reverse their order. At most
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
In quantum information theory, a quantum circuit is a model for quantum computation, similar to classical circuits, in which a computation is a sequence of quantum gates, measurements, initializations of qubits to known values, and possibly ...
(up to an order reversal of the output). Each of those single-qubit operations can be implemented efficiently using one
Hadamard gate
The Hadamard transform (also known as the Walsh–Hadamard transform, Hadamard–Rademacher–Walsh transform, Walsh transform, or Walsh–Fourier transform) is an example of a generalized class of Fourier transforms. It performs an orthogonal ...
and a linear number of
controlled phase gates. The first term requires one Hadamard gate and
controlled phase gates, the next term requires one Hadamard gate and
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
gates, which is quadratic polynomial in the number of qubits.
Example
The quantum Fourier transform on three qubits,
with
, is represented by the following transformation:
:
where
is an eighth
root of unity
In mathematics, a root of unity, occasionally called a de Moivre number, is any complex number that yields 1 when raised to some positive integer power . Roots of unity are used in many branches of mathematics, and are especially important i ...
satisfying
.
The matrix representation of the Fourier transform on three qubits is:
:
The 3-qubit quantum Fourier transform can be rewritten as:
:
In the following sketch, we have the respective circuit for
(with reversed order of output qubits with respect to the proper QFT):

As calculated above, the number of gates used is
which is equal to
, for
.
Relation to quantum Hadamard transform
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 In quantum computing, a quantum register is a system comprising multiple qubits. It is the quantum analogue of the classical processor register. Quantum computers perform calculations by manipulating qubits within a quantum register.
Definition ...
. The QFT as defined above is equivalent to the DFT, which considers these n qubits as indexed by the cyclic group
. However, it also makes sense to consider the qubits as indexed by the
Boolean group , and in this case the Fourier transform is the
Hadamard transform
The Hadamard transform (also known as the Walsh–Hadamard transform, Hadamard–Rademacher–Walsh transform, Walsh transform, or Walsh–Fourier transform) is an example of a generalized class of Fourier transforms. It performs an orthogonal ...
. This is achieved by applying a
Hadamard gate
The Hadamard transform (also known as the Walsh–Hadamard transform, Hadamard–Rademacher–Walsh transform, Walsh transform, or Walsh–Fourier transform) is an example of a generalized class of Fourier transforms. It performs an orthogonal ...
to each of the n qubits in parallel.
Lecture 5: Basic quantum algorithms, Rajat Mittal, pp. 4-5
/ref> Shor's algorithm
Shor's algorithm is a quantum computer algorithm for finding the prime factors of an integer. It was developed in 1994 by the American mathematician Peter Shor.
On a quantum computer, to factor an integer N , Shor's algorithm runs in polynomial ...
uses both types of Fourier transforms, an initial Hadamard transform as well as a QFT.
References
* K. R. Parthasarathy, ''Lectures on Quantum Computation and Quantum Error Correcting Codes'' (Indian Statistical Institute, Delhi Center, June 2001)
* John Preskill
John Phillip Preskill (born January 19, 1953) is an American theoretical physicist and the Richard P. Feynman Professor of Theoretical Physics at the California Institute of Technology, where he is also the Director of the Institute for Quantum In ...
, ''Lecture Notes for Physics 229: Quantum Information and Computation'' (CIT, September 1998)
External links
Wolfram Demonstration Project: Quantum Circuit Implementing Grover's Search Algorithm
Wolfram Demonstration Project: Quantum Circuit Implementing Quantum Fourier Transform
Quirk online life quantum fourier transform
{{DEFAULTSORT:Quantum Fourier Transform
Transforms
Quantum algorithms
Fourier analysis