{"id":4090,"date":"2024-09-21T13:21:21","date_gmt":"2024-09-21T13:21:21","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=4090"},"modified":"2024-09-24T11:48:47","modified_gmt":"2024-09-24T11:48:47","slug":"quantum-fourier-transform-and-applications","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/21\/quantum-fourier-transform-and-applications\/","title":{"rendered":"Quantum Fourier Transform and Applications"},"content":{"rendered":"\n<p>Applications<\/p>\n\n\n\n<p>The Fourier transform, a mathematical tool named after the 18th century<\/p>\n\n\n\n<p>French mathematician Joseph Fourier, is an invaluable tool in engineering<\/p>\n\n\n\n<p>and the sciences. No technical education is complete without a \ufb01rm grasp<\/p>\n\n\n\n<p>of this technique and its uses. The simplest way to understand the Fourier<\/p>\n\n\n\n<p>transform F of a function f (x) is to imagine the function as made up of<\/p>\n\n\n\n<p>various components that are periodic (like a sine function) with a frequency<\/p>\n\n\n\n<p>y, and F(f(x)) as a function<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>f(y) measuring the amplitude of each frequency<\/p>\n\n\n\n<p>component in the function. In other words, we construct a decomposition<\/p>\n\n\n\n<p>of the function in terms of the oscillatory exponential e<\/p>\n\n\n\n<p>\u22122\u03c0iyx<\/p>\n\n\n\n<p>, where the<\/p>\n\n\n\n<p>coe\ufb03cients in that decomposition are the Fourier transform:<\/p>\n\n\n\n<p>f(x) =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2\u03c0<\/p>\n\n\n\n<p>Z<\/p>\n\n\n\n<p>\u221e<\/p>\n\n\n\n<p>\u2212\u221e<\/p>\n\n\n\n<p>dy e<\/p>\n\n\n\n<p>2\u03c0iyx<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>f(y). (8.19)<\/p>\n\n\n\n<p>This formula is said to de\ufb01ne the inverse Fourier transform of<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>f(y), while the<\/p>\n\n\n\n<p>Fourier transform is de\ufb01ned as<\/p>\n\n\n\n<p>F(f(x)) =<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>f(y) =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2\u03c0<\/p>\n\n\n\n<p>Z<\/p>\n\n\n\n<p>\u221e<\/p>\n\n\n\n<p>\u2212\u221e<\/p>\n\n\n\n<p>dx e<\/p>\n\n\n\n<p>\u22122\u03c0iyx<\/p>\n\n\n\n<p>f(x). (8.20)<\/p>\n\n\n\n<p>The factor in front of the integral captures the normalization. A function<\/p>\n\n\n\n<p>can in general have an in\ufb01nite number of frequency components, and the<\/p>\n\n\n\n<p>frequencies can be distributed continuously. That\u2019s how the Fourier transform<\/p>\n\n\n\n<p>is a continuous function of the frequency y.<\/p>\n\n\n\n<p>The two Equations 8.20 and 8.19 de\ufb01ne a Fourier transform pair. The<\/p>\n\n\n\n<p>Fourier transform naturally produces complex numbers, so that f(x) and<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>f(y)<\/p>\n\n\n\n<p>are in general complex. When we compute the Fourier transform on a digi-<\/p>\n\n\n\n<p>tal machine, we need to discretize the integral to get the Discrete Fourier<\/p>\n\n\n\n<p>Transform (DFT).<\/p>\n\n\n\n<p>8.4.1 The discrete Fourier transform and classical algorithm<\/p>\n\n\n\n<p>When f(x) is a discrete function over the \ufb01nite range N = 2<\/p>\n\n\n\n<p>n<\/p>\n\n\n\n<p>of discrete n-<\/p>\n\n\n\n<p>bit inputs x, we can think of it as a vector with N components {f<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>f<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>&#8230; f<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>}.<\/p>\n\n\n\n<p>The integral over x in Equation 8.20 is then a sum over an index k with<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>154 Introduction to Quantum Physics and Information Processing<\/p>\n\n\n\n<p>x \u2192 k\/N and the limits are restricted from 0 to N \u2212 1. We then get the<\/p>\n\n\n\n<p>discrete Fourier transform of order N de\ufb01ned as<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>f(y) =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>k=0<\/p>\n\n\n\n<p>e<\/p>\n\n\n\n<p>\u22122\u03c0iyk\/N<\/p>\n\n\n\n<p>f<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>This is another vector with N components {g<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>g<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>&#8230; g<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>}, given by<\/p>\n\n\n\n<p>g<\/p>\n\n\n\n<p>j<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>k=0<\/p>\n\n\n\n<p>e<\/p>\n\n\n\n<p>\u22122\u03c0ijk\/N<\/p>\n\n\n\n<p>f<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>. (8.21)<\/p>\n\n\n\n<p>These are just the coe\ufb03cients of orthogonal harmonic components e<\/p>\n\n\n\n<p>2\u03c0ijk\/N<\/p>\n\n\n\n<p>of<\/p>\n\n\n\n<p>the function, which can be expressed as the inverse discrete Fourier transform<\/p>\n\n\n\n<p>(IDFT):<\/p>\n\n\n\n<p>f<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>j=0<\/p>\n\n\n\n<p>e<\/p>\n\n\n\n<p>2\u03c0ijk\/N<\/p>\n\n\n\n<p>g<\/p>\n\n\n\n<p>j<\/p>\n\n\n\n<p>. (8.22)<\/p>\n\n\n\n<p>We can regard the DFT as a complex matrix transformation of the vector<\/p>\n\n\n\n<p>{f<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>}:<\/p>\n\n\n\n<p>g<\/p>\n\n\n\n<p>j<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>k=0<\/p>\n\n\n\n<p>M<\/p>\n\n\n\n<p>jk<\/p>\n\n\n\n<p>f<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>; f<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>j=0<\/p>\n\n\n\n<p>M<\/p>\n\n\n\n<p>\u22121<\/p>\n\n\n\n<p>jk<\/p>\n\n\n\n<p>g<\/p>\n\n\n\n<p>k<\/p>\n\n\n\n<p>, (8.23)<\/p>\n\n\n\n<p>where M<\/p>\n\n\n\n<p>jk<\/p>\n\n\n\n<p>are the elements of an N \u00d7 N matrix M given by<\/p>\n\n\n\n<p>M<\/p>\n\n\n\n<p>jk<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>e<\/p>\n\n\n\n<p>2\u03c0ijk\/N<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>\u03c9<\/p>\n\n\n\n<p>jk<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>. (8.24)<\/p>\n\n\n\n<p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n\n\n<p>0<\/p>\n\n\n\n<p>f<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>f<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>\uf8f6<\/p>\n\n\n\n<p>\uf8f7<\/p>\n\n\n\n<p>\uf8f7<\/p>\n\n\n\n<p>\uf8f7<\/p>\n\n\n\n<p>\uf8f7<\/p>\n\n\n\n<p>\uf8f8<\/p>\n\n\n\n<p>(8.25)<\/p>\n\n\n\n<p>Example 8.4.1. The simple case of N = 2, \u03c9<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>= e<\/p>\n\n\n\n<p>i\u03c0<\/p>\n\n\n\n<p>= \u22121 and<\/p>\n\n\n\n<p>DFT<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>1 1<\/p>\n\n\n\n<p>1 \u03c9<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>&#8220;<\/p>\n\n\n\n<p>1 1<\/p>\n\n\n\n<p>1 \u22121<\/p>\n\n\n\n<p>#<\/p>\n\n\n\n<p>(8.26)<\/p>\n\n\n\n<p>which is just the Walsh\u2013Hadamard transform.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Quantum Algorithms 155<\/p>\n\n\n\n<p>Exercise 8.1. Write out the DFT matrix for N = 4.<\/p>\n\n\n\n<p>Exercise 8.2. Calculate the DFT on the N -dimensional zero-vector.<\/p>\n\n\n\n<p>Example 8.4.2. Unitarity of the DFT:<\/p>\n\n\n\n<p>The crucial point that allows us to extend the DFT to an operator on<\/p>\n\n\n\n<p>quantum states is that it is unitary. To prove this, we need to show that<\/p>\n\n\n\n<p>M<\/p>\n\n\n\n<p>\u2020<\/p>\n\n\n\n<p>M = =\u21d2<\/p>\n\n\n\n<p>N\u22121<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>l=0<\/p>\n\n\n\n<p>M<\/p>\n\n\n\n<p>jl<\/p>\n\n\n\n<p>M<\/p>\n\n\n\n<p>\u2217<\/p>\n\n\n\n<p>lk<\/p>\n\n\n\n<p>= \u03b4<\/p>\n\n\n\n<p>jk<\/p>\n\n\n\n<p>(8.27)<\/p>\n\n\n\n<p>where M<\/p>\n\n\n\n<p>jk<\/p>\n\n\n\n<p>is de\ufb01ned by Equation 8.24.<\/p>\n\n\n\n<p>When j = k :<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>l<\/p>\n\n\n\n<p>\u03c9<\/p>\n\n\n\n<p>jl<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>\u03c9<\/p>\n\n\n\n<p>\u2212lj<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>l<\/p>\n\n\n\n<p>1 = 1; (8.28)<\/p>\n\n\n\n<p>When j 6= l, then<\/p>\n\n\n\n<p>P<\/p>\n\n\n\n<p>l<\/p>\n\n\n\n<p>\u03c9<\/p>\n\n\n\n<p>l(j\u2212k)<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>is the sum of N terms of a geometric series whose<\/p>\n\n\n\n<p>\ufb01rst term is 1 and ratio is \u03c9<\/p>\n\n\n\n<p>(j\u2212k)<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>. So we have<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>l<\/p>\n\n\n\n<p>\u03c9<\/p>\n\n\n\n<p>l(j\u2212k)<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1 \u2212 \u03c9<\/p>\n\n\n\n<p>N(j\u2212k)<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>1 \u2212 \u03c9<\/p>\n\n\n\n<p>(j\u2212k)<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>= 0 (8.29)<\/p>\n\n\n\n<p>Thus Equation 8.27 is proved.<\/p>\n\n\n\n<p>Box 8.2: Classical FFT Algorithm<\/p>\n\n\n\n<p>Computing the DFT<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>of a vector involves evaluating N<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>elements of the<\/p>\n\n\n\n<p>DFT matrix, and looks like a job that scales as 2<\/p>\n\n\n\n<p>2n<\/p>\n\n\n\n<p>with the number of bits<\/p>\n\n\n\n<p>n = log<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>N. In implementing the DFT transform on a digital machine, one<\/p>\n\n\n\n<p>can easily optimize by exploiting the properties of the integer powers of \u03c9<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>There are cycles among elements of DFT<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>, since \u03c9<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>= 1. So while a direct<\/p>\n\n\n\n<p>matrix multiplication of the form of Equation 8.24 would typically require<\/p>\n\n\n\n<p>O(N<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>) basic operations, the optimized fast Fourier transform (FFT) algorithm<\/p>\n\n\n\n<p>requires O(N log<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>N) operations only.<\/p>\n\n\n\n<p>For example, consider N = 4; \u03c9<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>= e<\/p>\n\n\n\n<p>2\u03c0i\/4<\/p>\n\n\n\n<p>= i, \u03c9<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>= \u22121, \u03c9<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>= 1.<\/p>\n\n\n\n<p>DFT<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\uf8eb<\/p>\n\n\n\n<p>\uf8ec<\/p>\n\n\n\n<p>\uf8ec<\/p>\n\n\n\n<p>\uf8ec<\/p>\n\n\n\n<p>\uf8ed<\/p>\n\n\n\n<p>1 1 1 1<\/p>\n\n\n\n<p>1 i \u22121 \u2212i<\/p>\n\n\n\n<p>1 \u22121 1 \u22121<\/p>\n\n\n\n<p>1 \u2212i \u22121 i<\/p>\n\n\n\n<p>\uf8f6<\/p>\n\n\n\n<p>\uf8f7<\/p>\n\n\n\n<p>\uf8f7<\/p>\n\n\n\n<p>\uf8f7<\/p>\n\n\n\n<p>\uf8f8<\/p>\n\n\n\n<p>(8.30)<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>156 Introduction to Quantum Physics and Information Processing<\/p>\n\n\n\n<p>Now there is a relationship between the upper and lower halves of this matrix.<\/p>\n\n\n\n<p>Look at the highlighted columns, repeated for the upper and lower halves: they<\/p>\n\n\n\n<p>form a 2 \u00d7 2 matrix that acts on the even index components (note the index<\/p>\n\n\n\n<p>starts at 0).<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>1 1<\/p>\n\n\n\n<p>1 \u22121<\/p>\n\n\n\n<p>!<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>DFT<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>. (8.31)<\/p>\n\n\n\n<p>The part that acts on the odd index components is for the upper half<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>1 1<\/p>\n\n\n\n<p>i \u2212i<\/p>\n\n\n\n<p>!<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>1 0<\/p>\n\n\n\n<p>0 i<\/p>\n\n\n\n<p>!<\/p>\n\n\n\n<p>\u00d7 DFT<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>(8.32)<\/p>\n\n\n\n<p>=<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>Diag(1 \u03c9<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>) \u00d7 DFT<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>.<\/p>\n\n\n\n<p>The negative of this acts on the lower half. Thus the DFT of a 4-d vector is<\/p>\n\n\n\n<p>reduced to two DFT\u2019s of a 2-d vector. This is at the heart of the classical FFT<\/p>\n\n\n\n<p>algorithm.<\/p>\n\n\n\n<p>The above example shows that DFT<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>can be reduced to DFT<\/p>\n\n\n\n<p>N\/2<\/p>\n\n\n\n<p>. The<\/p>\n\n\n\n<p>FFT algorithm works by recursively dividing the original vector into even<\/p>\n\n\n\n<p>numbered and odd numbered elements, until at the \ufb01nal stage there are just<\/p>\n\n\n\n<p>two terms and DFT<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>can be applied. The process is then reversed by succes-<\/p>\n\n\n\n<p>sively doubling the vectors and eventually covering the entire input. Let\u2019s see<\/p>\n\n\n\n<p>how this is possible in general: let N = 2M .<\/p>\n\n\n\n<p>DFT<\/p>\n\n\n\n<p>N<\/p>\n\n\n\n<p>(f(x)) =<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>f(y) =<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u221a<\/p>\n\n\n\n<p>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p>M\u22121<\/p>\n\n\n\n<p>X<\/p>\n\n\n\n<p>x=0<\/p>\n\n\n\n<p>\u03c9<\/p>\n\n\n\n<p>(x)y<\/p>\n\n\n\n<p>M<\/p>\n\n\n\n<p>f(2x + 1)<\/p>\n\n\n\n<p>| {z }<\/p>\n\n\n\n<p>DFT<\/p>\n\n\n\n<p>M<\/p>\n\n\n\n<p>of odd terms<\/p>\n\n\n\n<p>\u00d7\u03c9<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>2M<\/p>\n\n\n\n<p>\ue013<\/p>\n\n\n\n<p>(8.34)<\/p>\n\n\n\n<p>At any stage l of evaluating the DFT, one can divide the input into two<\/p>\n\n\n\n<p>to write it in terms of DFT<\/p>\n\n\n\n<p>l\/2<\/p>\n\n\n\n<p>, and continue successively until one is left with<\/p>\n\n\n\n<p>DFT<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u2019s.<\/p>\n\n\n\n<p>Successive division of the terms in the input into two until we reach the<\/p>\n\n\n\n<p>two-term pairs is called decimation. The process of decimating higher-order<\/p>\n\n\n\n<p>DFT\u2019s looks like the following for N = 8:<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bgb6.png\" width=\"685\" height=\"1068\"><\/p>\n\n\n\n<p>Quantum Algorithms 157<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>5<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>6<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>7<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>6<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>5<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>7<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>6<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>5<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>7<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>4<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>6<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>5<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>7<\/p>\n\n\n\n<p>even<\/p>\n\n\n\n<p>odd<\/p>\n\n\n\n<p>We then start evaluating upward from the 2-point DFTs, successively dou-<\/p>\n\n\n\n<p>bling at each stage. The generic 2-point DFT looks like Figure 8.8, called a<\/p>\n\n\n\n<p>butter\ufb02y diagram for its symmetric structure. The labels on the sides represent<\/p>\n\n\n\n<p>the multiplicative factors and two lines joined at a node represent addition of<\/p>\n\n\n\n<p>the corresponding terms.<\/p>\n\n\n\n<p>FIGURE 8.8: The 2-point DFT: butter\ufb02y diagram.<\/p>\n\n\n\n<p>For N = 8, we have worked out the decimation process in Example 8.4.4.<\/p>\n\n\n\n<p>The butter\ufb02y diagram looks like Figure 8.9.<\/p>\n\n\n\n<p>FIGURE 8.9: Butter\ufb02y diagram for computing an 8-point DFT.<\/p>\n\n\n\n<p>The output vector {y<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>. . . y<\/p>\n\n\n\n<p>8<\/p>\n\n\n\n<p>} is the DFT of the input vector.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Applications The Fourier transform, a mathematical tool named after the 18th century French mathematician Joseph Fourier, is an invaluable tool in engineering and the sciences. No technical education is complete without a \ufb01rm grasp of this technique and its uses. The simplest way to understand the Fourier transform F of a function f (x) is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4042,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[497],"tags":[],"class_list":["post-4090","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quantum-algorithms"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/09\/algorithm-1.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=4090"}],"version-history":[{"count":2,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4090\/revisions"}],"predecessor-version":[{"id":4586,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4090\/revisions\/4586"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/4042"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=4090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=4090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=4090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}