클래식 이산 푸리에 변환 소개 :
DFT는 복소수 의 시퀀스 { x n } : = x 0 , x 1 , x 2 ,을 변환 합니다. . . , X N - 1 복소수의 다른 시퀀스로 { X의 K } : = X 0 , X 1 , X 2 , . . . 이는 X k = N − 1에 의해 정의됩니다. ∑N{xn}:=x0,x1,x2,...,xN−1{Xk}:=X0,X1,X2,... 필요에 따라 적절한 정규화 상수를 곱할 수 있습니다. 또한 수식에서 더하기 또는 빼기 기호를 사용할지 여부는 선택한 규칙에 따라 다릅니다.
Xk=∑n=0N−1xn.e±2πiknN
이 주어진 것, 가정하자 및 X = ( 1 2 - I - I - 1 + 2 I ) .N=4x=⎛⎝⎜⎜⎜12−i−i−1+2i⎞⎠⎟⎟⎟
열 벡터 를 찾아야합니다 . 일반적인 방법은 이미 Wikipedia 페이지에 나와 있습니다. 그러나 우리는이를 위해 행렬 표기법을 개발할 것입니다. x 에 행렬 을 미리 곱하면 X 를 쉽게 얻을 수 있습니다 .XXx
M=1N−−√⎛⎝⎜⎜⎜11111ww2w31w2w4w61w3w6w9⎞⎠⎟⎟⎟
여기서 는 e - 2 π i입니다.w . 행렬의 각 요소는 기본적으로wij입니다. 1e−2πiNwij 은 단순히 정규화 상수입니다.1N√
마지막으로 는 다음과 같습니다. 1X.12⎛⎝⎜⎜⎜2−2−2i−2i4+4i⎞⎠⎟⎟⎟
이제 잠시 앉아 몇 가지 중요한 속성을 확인하십시오.
- 행렬 의 모든 열은 서로 직교합니다.M
- 모든 열의 크기는 1 입니다.M1
- If you post multiply M with a column vector having lots of zeroes (large spread) you'll end up with a column vector with only a few zeroes (narrow spread). The converse also holds true. (Check!)
It can be very simply noticed that the classical DFT has a time complexity O(N2). That is because for obtaining every row of X, N operations need to be performed. And there are N rows in X.
The Fast fourier transform:
Now, let us look at the Fast fourier transform. The fast Fourier transform uses the symmetry of the Fourier transform to reduce the computation time. Simply put, we rewrite the Fourier transform of size N as two Fourier transforms of size N/2 - the odd and the even terms. We then repeat this over and over again to exponentially reduce the time. To see how this works in detail, we turn to the matrix of the Fourier transform. While we go through this, it might be helpful to have DFT8 in front of you to take a look at. Note that the exponents have been written modulo 8, since w8=1.
Notice how row j is very similar to row j+4. Also, notice how column j
is very similar to column j+4. Motivated by this, we are going to split the
Fourier transform up into its even and odd columns.
In the first frame, we have represented the whole Fourier transform matrix
by describing the jth row and kth column: wjk. In the next frame, we separate the odd and even columns, and similarly separate the vector that is to be transformed. You should convince yourself that the first equality really is
an equality. In the third frame, we add a little symmetry by noticing that
wj+N/2=−wj (since wn/2=−1).
Notice that both the odd side and even side contain the term w2jk. But
if w is the primitive Nth root of unity, then w2 is the primitive N/2 nd root of unity. Therefore, the matrices whose j, kth entry is w2jk are really just DFT(N/2)! Now we can write DFTN in a new way:
Now suppose we are calculating the Fourier transform of the function f(x).
We can write the above manipulations as an equation that computes the jth
term f^(j).
Note: QFT in the image just stands for DFT in this context. Also, M refers to what we are calling N.
This turns our calculation of DFTN into two applications of DFT(N/2). We
can turn this into four applications of DFT(N/4), and so forth. As long as N=2n for some n, we can break down our calculation of DFTN into N
calculations of DFT1=1. This greatly simplifies our calculation.
In case of the Fast fourier transform the time complexity reduces to O(Nlog(N)) (try proving this yourself). This is a huge improvement over the classical DFT and pretty much the state-of-the-art algorithm used in modern day music systems like your iPod!
The Quantum Fourier transform with quantum gates:
The strength of the FFT is that we are able to use the symmetry of the
discrete Fourier transform to our advantage. The circuit application of QFT
uses the same principle, but because of the power of superposition QFT is
even faster.
The QFT is motivated by the FFT so we will follow the same steps, but
because this is a quantum algorithm the implementation of the steps will be
different. That is, we first take the Fourier transform of the odd and even
parts, then multiply the odd terms by the phase wj.
In a quantum algorithm, the first step is fairly simple. The odd and even
terms are together in superposition: the odd terms are those whose least
significant bit is 1, and the even with 0. Therefore, we can apply QFT(N/2) to both the odd and even terms together. We do this by applying we will simply apply QFT(N/2) to the n−1 most significant bits, and recombine the odd and even appropriately by applying the Hadamard to the least significant bit.
Now to carry out the phase multiplication, we need to multiply each odd
term j by the phase wj . But remember, an odd number in binary ends with a 1 while an even ends with a 0. Thus we can use the controlled phase shift, where the least significant bit is the control, to multiply only the odd terms by the phase without doing anything to the even terms. Recall that the controlled phase shift is similar to the CNOT gate in that it only applies a phase to the target if the control bit is one.
Note: In the image M refers to what we are calling N.
The phase associated with each controlled phase shift should be equal to
wj where j is associated to the k-th bit by j=2k.
Thus, apply the controlled phase shift to each of the first n−1 qubits,
with the least significant bit as the control. With the controlled phase shift
and the Hadamard transform, QFTN has been reduced to QFT(N/2).
Note: In the image, M refers to what we are calling N.
Example:
Lets construct QFT3. Following the algorithm, we will turn QFT3 into QFT2
and a few quantum gates. Then continuing on this way we turn QFT2 into
QFT1 (which is just a Hadamard gate) and another few gates. Controlled
phase gates will be represented by Rϕ. Then run through another iteration to get rid of QFT2. You should now be able to visualize the circuit for QFT on more qubits easily. Furthermore, you can see that the number of gates necessary to carry out QFTN it takes is exactly
∑i=1log(N)i=log(N)(log(N)+1)/2=O(log2N)
Sources:
https://en.wikipedia.org/wiki/Discrete_Fourier_transform
https://en.wikipedia.org/wiki/Quantum_Fourier_transform
Quantum Mechanics and Quantum Computation MOOC (UC BerkeleyX) - Lecture Notes : Chapter 5
P.S: This answer is in its preliminary version. As @DaftWillie mentions in the comments, it doesn't go much into "any insight that might give some guidance with regards to other possible algorithms". I encourage alternate answers to the original question. I personally need to do a bit of reading and resource-digging so that I can answer that aspect of the question.