The Discrete Fourier Transform
The Fourier Transformation is a high level mathematical function using the integrals over a continuous wave to compute the component that make up such a wave. As this is done in a continuous fashion, the Discrete Fourier Transform(DFT) is not. The DFT uses the summation of real numbers representing points in time of wave motion. Which makes it an extremely powerful tool to computers because of their discrete nature.
This transformation is accomplished by computing the value of each signal component using every point in time chosen. Every signal value is made of a summation of all the points in time chosen with the value of the signal applied. This is done in the form of circle rotation. Euler’s formula allows us to recognize a basis of imaginary polar coordinates where , thus creating an arbitrary point in
. This basis allows us to apply an exponential rotation to all of our points
, where K is the signal component being evaluated and n is the point in time. After the transformation is complete we are left with a “list” containing all of the signal components of the original wave.
Written as:
When the DFT is implemented on an algorithmic level it becomes quickly apparent that this runs at an time complexity belonging to
. That is because to compute every value K we must add together all of the point by point computations. Also, because of the discrete computation this algorithm is implemented using arrays. Where every index in array K is filled with the summation of points stored in array n. Finally, array K contains the value of every signal component spanned by the wave points chosen. While
isn’t inapplicable, the Fast Fourier Transform creates a one layer speed up in time complexity to reach
.
The Fast Fourier Transform
The Fast Fourier Transform, or FFT, is a proven way to implement a substantial array transformation on a large amount of data, due to its time complexity of . This speed up was possible due to the amount of redundant calculations made by the Discrete Fourier Transform. These redundant calculations come from the periodic nature of imaginary numbers, where
. Due to this property, by splitting the data up into even and odd indices, we are then able to apply the logarithmic time complexity. Using our original equation
,
and denoting as
. So we have
,
Now that we’ve condensed the formula, it becomes possible to split between indices and
, as halves of the array n respectively, to perform the Fourier transform as:
Now that the formula has been established and we are aware of the properties of W as
…
Where N is equal to 8.
We define the even summation of the FFT as $latex G[m] $ and the odd summation as . Therefore we can see that:
…
Given that the input is a power of 2, we can then perform the operation know as the decimating-in-time-algorithm. This is, recursively breaking down every set of transforms into even and odd inputs until only two point DFT’s remain. That is, point transformations, where we implement the recursion
until hitting summations or arrays of length 1. At each stage of the algorithm
complex operations are needed to build the previous level. Because of the stage construction in \log N, we only have to compute the summations of values themselves N, while recycling the complex computations.
Quantum Fourier Transform
Now that this basis has been firmly established and we have denoted the fastest time complexity of the Fourier transform using classical computing as , we can further use Quantum gate transformations to a achieve a time complexity such as
. Needless to say, this is an exponential speed up of an entire magnitude. To define the transform we first note that
can also be defined as set of column matrices denoted as
, where s the index of the “array”. We then form the formula as
While this may seem complex, it is important to realize this is a re-representation of the previously defined FFT formula in order to define as a form of column matrices. As we know from the previous post, qubits are defined as column vectors representing system state probability. If we can reform our input array to be represented as such then we can apply our gate matrices in order to introduce a state of superposition.
Following this the form of basis P is proven under a few propositions, however for the sake of this article we will assume the propositions as true while giving a brief explanation for each.
1. Each row of matrices only contains two non zero entries
In the matrices of we see that the non zero entries are located in the main diagonal and the sub-diagonal depending on the column values of
. If we look at this a little closer it becomes clear why this. Putting at this in terms of a double array, if indices
and j are equal at all times then we will receive only the diagonal values stored in the array and the same for our matrices. When
we traverse all indices in the main diagonal of each matrix, when
we receive all entries in the lower sub-diagonal, and
yields all entries in the upper sub-diagonal. Because we assumed proposition one we can now say each matrix has been defined depending on the piece-wise function of the indices i and j.
2. The matrices of P are unitary
If you refer from the last post, unitary is defined as a square matrix where the conjugate transpose is also its inverse. Recall, we need this to be true in order to evaluate output transformations as we due input, in our time steps denoted by t. Subsequently, this allows these quantum gates to be implemented on a quantum computer. However, we must determine what these gates are first. We do this by whats called QR decomposition. The decomposition states that any matrix belonging to can be broken up into the product of a unitary matrix
and an upper triangular matrix
. This then brings us to our next proposition.
3. For any matrix s belonging to can be made up of the matrices
and
Because the depth of the proofs are being conceded right now, I am going to use proposition three in order to explain the mathematical composition of both and
. Firstly, by multiplying the matrices M and N before traversing the matrix on the left side of the solution we can see that these sets of matrices build
, such as
We then denote that matrix can be written as its form of induction using the Identity
and the Hadamard matrix H. By recursively using the formula
for every matrix of matrices we can see this induction compose to
Thus, building every matrix belonging to and completing the unitary requirement of
Lastly, we form our matrices of N as triangular matrices. This is simply the product of all triangular matrices in reverse using R at time denoted by
Finally, we are able to build the Quantum Fourier Transform from the defined decomposition. We first prepare our quantum state as and every complex matrix in
such as,
Where contains every value of the input
in the form of ket complex matrices.
Thus we can say,
The algorithm takes a complex array X as input and uses our quantum gates in to output a quantum state that correspond the probabilities of the real values and amplitudes, given by the original DFT. Thus, we prepare our quantum register of input as
We then move in reverse as an outer loop from
and as an inner loop from
.
At every step in t, we apply our unitary gate operation of as
After applying the quantum gate operation to every matrix at step t, we apply the Hadamard matrix H to the value of at time step s.
After completing every matrix in the reverse time step of s, we have completed the algorithm, this yielding a quantum state $latex \left|\varphi_n \right> $ corresponding to elements of the complex matrix Y.
If we evaluate the time complexity of this transformation we see that the outer loop as steps or equivalently
. We see that classically this is equal to the original DTF, however every qubit operation compounds the probabilistic superposition to
. Due to this we can say that the operation becomes
. This incredible exponential speed up becomes the driving factor of the algorithm and the reason it must be defined in terms of qubits and quantum space.
Written By: Mitchell Mesecher