为什么离散傅立叶变换可以有效地实现为量子电路?


17

这是一个熟知的结果是离散傅立叶变换(DFT)的的数字具有复杂与最好的已知算法,在执行傅立叶变换的量子状态的幅度的,使用经典QFT算法,只需要基本门。N=2nO(n2n)O(n2)

有什么已知的原因会导致这种情况吗?我的意思是说,DFT是否存在已知的特性,可以实现其高效的“量子版本”。

实际上,可以将基于维向量的DFT 视为线性运算 N

y=DFTx,DFTjk1Nexp(2πiNjk).

给定一个量子状态,此问题的“量子版本”是任务,获得输出状态,使得 | \ boldsymbol y \ rangle = \ operatorname {DFT} | \\ boldsymbol x \ rangle = \ operatorname {QFT} | \\ boldsymbol x \ rangle。|xk=1Nxk|k|yk=1Nyk|k

|y=DFT|x=QFT|x.
  1. 第一个简化似乎来自这样一个事实,由于QM的线性,我们可以着眼于基态,随着一般矢量的演化然后免费提供。|j,j=1,...,N|x
  2. 如果,则可以以为底数来表示。N=2n|j|j=|j1,...,jn
  3. 然后,在标准QFT算法中,人们利用了这样一个事实,即转换可以写为 然后可以将其实现为形式的量子电路 其中通过基本门。
    |j1,...,jn2n/2l=1n[|0+exp(2πi(0.jnl+1jn))|1],
    QFT|j1,...,jn=(k=1nUk)|j1,...,jn,
    UkO(n)

假设我们现在有一些unit变换,并且我们想找到一个有效实现等效量子变换 上面提到的前两个技巧总是可以应用的,但是在何时何地如何使用另一点来获得效率结果(如我们对QFT的看法)时,这并非无关紧要。A

|y=A|x.

是否有已知的标准可以实现?换句话说,是否有可能精确地确定DFT的哪些特征,从而有可能有效地实现相关的量子变换?


1
具有量子位数量的QFT的递归结构似乎有助于提高效率。
AHusain '18年

Answers:


12

经典离散傅立叶变换简介:

DFT变换N复数的序列= x 0x 1x 2...。x N - 1{xn}:=x0,x1,x2,...,xN1成另一个复数序列{Xk}:=X0,X1,X2,...我们可以根据需要乘以合适的归一化常数。此外,是否在公式中采用加号或减号取决于我们选择的约定。

Xk=n=0N1xn.e±2πiknN

假设给定x = 1 2 i i 1 + 2 iN=4x=(12ii1+2i)

我们需要找到列向量。通用方法已显示在Wikipedia页面上。但是我们将为此开发矩阵表示法。通过将x乘以矩阵可以很容易地获得XXXx

M=1N(11111ww2w31w2w4w61w3w6w9)

其中ë - 2 π w。矩阵的每个元素基本上都是wij1个e2πiNwij只是一个归一化常数。1N

最终,变为:1X12(222i2i4+4i)

现在,坐一会儿,注意一些重要的属性:

  • 矩阵所有列彼此正交。M
  • 所有列的大小均为1M1
  • 如果您将乘以具有很多零(较大扩展)的列向量,则最终将得到只有几个零(窄扩展)的列向量。反之亦然。(校验!)M

可以很简单地注意到,经典DFT的时间复杂度为。这是因为获得的每一行Xñ需要执行的操作。X中N行。O(N2)XNNX


快速傅立叶变换:

现在,让我们看一下快速傅立叶变换。快速傅立叶变换利用傅立叶变换的对称性来减少计算时间。简而言之,我们将大小为的傅里叶变换重写为大小为N / 2的两个傅里叶变换-奇数和偶数项。然后,我们一次又一次地重复此操作,以成倍地减少时间。为了详细了解其工作原理,我们转向傅立叶变换的矩阵。在我们进行此操作的过程中,将DFT 8摆在您面前可能会有所帮助。请注意,由于w 8 = 1,所以指数以8为模。NN/2DFT88w8=1

enter image description here

请注意,第行与第j + 4行非常相似。另外,请注意第j 列与第j + 4列非常相似。因此,我们将傅立叶变换分为偶数和奇数列。jj+4jj+4

enter image description here

在第一帧中,我们通过描述第行和第k列来表示整个傅里叶变换矩阵:w j k。在下一帧中,我们将奇数列和偶数列分开,并类似地将要转换的向量分开。您应该说服自己,第一个平等确实是平等。在第三帧中,我们注意到w j + N / 2 = w j(因为w n / 2 = 1),从而增加了一些对称性 。jkwjkwj+N/2=wjwn/2=1

注意,奇数侧和偶数侧都包含项。但是,如果w是原始的第N个根,则w 2是原始的第N / 2个根。因此,第jk个项为w 2 j k的矩阵实际上就是DFT N / 2 !现在我们可以用新的方式写DFT N:现在假设我们正在计算函数f x 的傅立叶变换。w2jkww2N/2jkw2jkDFT(N/2)DFTNf(x)。我们可以写上面的操作为计算第j项的方程式˚FĴ f^(j)

enter image description here

注意:在此情况下,图像中的QFT代表DFT。另外,M表示我们所说的N。

这将我们对的计算转换为DFT N / 2 )的两个应用。我们可以将其转换为DFT N / 4 )的四个应用程序,依此类推。只要ñ = 2 ñ一些ñ,我们可以打破我们的计算DFT ňň 的计算DFT 1 = 1。这大大简化了我们的计算。DFTNDFT(N/2)DFT(N/4)N=2nnDFTNNDFT1=1

在快速傅立叶变换的情况下,时间复杂度降低为(尝试自己证明)。这是对经典DFT的巨大改进,几乎是在现代音乐系统(如iPod)中使用的最新算法!O(Nlog(N))


具有量子门的量子傅立叶变换:

FFT的优势在于我们能够利用离散傅立叶变换的对称性来发挥我们的优势。QFT的电路应用使用相同的原理,但是由于叠加的能力QFT甚至更快。

QFT受FFT激励,因此我们将遵循相同的步骤,但是由于这是一种量子算法,因此步骤的实现将有所不同。也就是说,我们首先对奇数和偶数部分进行傅立叶变换,然后将奇数项乘以相位wj

在量子算法中,第一步非常简单。奇数和偶数项叠加在一起:奇数项是最低有效位为那些,而偶数为0的那些。因此,我们可以将QFT N / 2 )一起应用于奇数和偶数项。通过应用,我们将简单地将QFT N / 2 应用于n - 1个最高有效位,并通过对最低有效位应用Hadamard来重新组合奇数甚至适当地做到这一点。10QFT(N/2)QFT(N/2)n1

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.

enter image description here

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 n1 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).

enter image description here

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:

  1. https://en.wikipedia.org/wiki/Discrete_Fourier_transform

  2. https://en.wikipedia.org/wiki/Quantum_Fourier_transform

  3. 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.


Regarding the recursive structure: one might take that more or less by definition. If you want to talk about the scaling of an algorithm, you need a family of circuits for different sized inputs. The way this is typically done is to build the circuit for size n+1 out of the circuit for size n.What I'm not really seeing here is any insight that might give some guidance with regards to other possible algorithms (not that I claim that's an easy thing to do)
DaftWullie

@DaftWullie "What I'm not really seeing here is any insight that might give some guidance with regards to other possible algorithms (not that I claim that's an easy thing to do)" Well, yes! I have been thinking about that too. This is more of a preliminary answer. I will add more to it when I get about learning a bit more (and when I get more free time). I would be very glad to see alternate answers to this question. :-)
Sanchayan Dutta

Just because you have a sequence of problems, does not mean one gives the algorithm for the next (let alone a good one). It is typical because we typically think of nice functions. Being recursive in such a simple way is a property of a sequence of problems. Here what I mean is there exists a factorization Un=Un1x. Using this question to diagnose whether a sequence U has the same efficency properties.
AHusain

Hi, in QFT is it implicitly assumed that a, say 8 x 1, input vector x_classical is amplitude encoded with 3-qubits? Then the QFT operations are done on the encoded qubits? Also, can you please elaborate on "...and recombine the odd and even appropriately by applying the Hadamard to the least significant bit."?
Abdullah Ash- Saki

10

One possible answer as to why we can realise the QFT efficiently is down to the structure of its coefficients. To be precise, we can represent it easily as a quadratic form expansion, which is a sum over paths which have phases given by a quadratic function:

F2n=12nk,x{0,1}nexp(iQ(k,x))|kx|,
where Q(z)=1jk2nθj,kzjzk is a quadratic form defined on 2n-bit strings. The quantum Fourier transform in particular involves a quadratic form whose angles are given by
θj,k={π/22njk,if 1jn<k2nj+10,otherwise.
The structure of these angles has an important feature, which allows the QFT to be easily realised as a unitary circuit:
  1. There is a function f:{1,2,,n}{n+1,n+2,,2n} such that θj,k=π for each 1jn (where f(j)=2nj+1 in the case of the QFT);
  2. For any 1h,jn for which θh,f(j)0, we have θj,f(h)=0.

We may think of the indices of z=(k,x){0,1}2n as input and output wires of a quantum circuit, where our task is to show what the circuit in the middle is which shows how the inputs connect to the outputs. The function f above allows us to see the association of output wires to input wires, that in each case there is a Hadamard gate which connects the two ends together, and that apart from the Hadamards (and SWAP gates which accounts for the reversal of in the order of the indices between (1,2,,n) and (f(1),f(2),,f(n))), all of the other operations are two-qubit controlled-phase gates for relative phases of exp(iθj,k). The second condition on f serves to ensure that these controlled-phase gates can be given a well-defined time ordering.

There are more general conditions which one could describe for when a quadratic form expansion gives rise to a realisable circuit, along similar lines. The above describes one of the simplest cases, in which there are no indices in the sum except for those for the standard basis of the input and output states (in which case the coefficients of the associated unitary all have the same magnitude).


I am not sure I fully understand. Are you saying that any evolution represented as a quadratic form expansion with a quadratic form satisfying those two conditions can be efficiently implemented? Very interesting
glS

@gIS: yes, and furthermore the structure is essentially the same as the Coppersmith QFT circuit (or rather, the fact that the QFT has that form is why the Coppersmith circuit structure suffices to realise the QFT).
Niel de Beaudrap

8

This is deviating a little from the original question, but I hope gives a little more insight that could be relevant to other problems.

One might ask "What is it about order finding that lends itself to efficient implementation on a quantum computer?". Order Finding is the main component of factoring algorithms, and includes the Fourier transform as part of it.

The interesting thing is that you can put things like order finding, and Simon's problem, in a general context called the "Hidden Subgroup Problem".

Let us take a group G, with elements indexed by g, and a group operation ''. We are given an oracle that evaluates the function f(g), and we are assured that there is a subgroup, K, of G with elements k such that for all gG and kK, f(g)=f(gk). It is our task to uncover the generators of the subgroup K. For example, in the case of Simon's problem, the group G is all n-bit numbers, and the subgroup K is a pair of elements {0,s}. The group operation is bitwise addition.

Efficient solutions (that scale as a polynomial of log|G|) exist if the group G is Abelian, i.e. if the operation is commutative, making use of the Fourier Transform over the relevant group. There are well-established links between the group structure (e.g. {0,1}n,) and the problem that can be solved efficiently (e.g. Simon's problem). For example, if we could solve the Hidden Subgroup Problem for the symmetric group, it would help with the solution of the graph isomorphism problem. In this particular case, how to perform the Fourier Transform is known, although this in itself is not sufficient for creating an algorithm, in part because there is some additional post-processing that is required. For example, in the case of Simon's Problem, we required multiple runs to find enough linearly independent vectors to determine s. In the case of factoring, we were required to run a continued fractions algorithm on the output. So, there's still some classical post-processing that has to be done efficiently, even once the appropriate Fourier transform can be implemented.


Some more details

In principle, the Hidden Subgroup Problem for Abelian groups is solved as follows. We start with two registers, |0|0, and prepare the first in a uniform superposition of all group elements,

1|G|gG|g|0,
and perform the function evaluation
1|G|g|g|f(g)=1|G|gKkK|gk|f(g),
where K is defined such that by taking each element and combining with the members of K yields the whole group G (i.e. each member of K creates a different coset, yielding distinct values of f(g)), and is known as the orthogonal subgroup. Tracing over the second register,
1|K|gKk,kK|gkgk|.
Now we perform the Fourier Transform over the group G, giving the output state
|K||G|gK|gg|.
Each of the vectors |gK has a probability of |K|/|G| of being found, and all others have 0 probability. Once the generators of K have been determined, we can figure out the generators of K via some linear algebra.

3

One of many possible constructions that gives some insight into this question, at least to me, is as follows. Using the CSD (cosine-sine decomposition), you can expand any unitary operator into a product of efficient gates V that fit nicely into a binary tree pattern. In the case of the QFT, that binary tree collapses to a single branch of the tree, all the V not in the branch are 1.

Ref: Quantum Fast Fourier Transform Viewed as a Special Case of Recursive Application of Cosine-Sine Decomposition, by myself.


interesting, thanks. Could you include a sketch of the argument in the answer, if possible?
glS

1
What I presented already is my version of a " sketch". If you want to delve more deeply, with equations and pictures, it's best to go to the arxiv ref given at the end
rrtucci
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.