* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Lecture 2
Many-worlds interpretation wikipedia , lookup
Measurement in quantum mechanics wikipedia , lookup
Probability amplitude wikipedia , lookup
Renormalization group wikipedia , lookup
Algorithmic cooling wikipedia , lookup
Interpretations of quantum mechanics wikipedia , lookup
History of quantum field theory wikipedia , lookup
Quantum decoherence wikipedia , lookup
EPR paradox wikipedia , lookup
Path integral formulation wikipedia , lookup
Coherent states wikipedia , lookup
Orchestrated objective reduction wikipedia , lookup
Density matrix wikipedia , lookup
Quantum field theory wikipedia , lookup
Quantum key distribution wikipedia , lookup
Canonical quantization wikipedia , lookup
Quantum machine learning wikipedia , lookup
Quantum group wikipedia , lookup
Quantum state wikipedia , lookup
Hidden variable theory wikipedia , lookup
Quantum computing wikipedia , lookup
Quantum teleportation wikipedia , lookup
Quantum Computing (Fall 2013) Instructor: Shengyu Zhang. Lecture 2 Factoring and Abelian HSP 1. Factoring problem Historical importance: one of the oldest computational problems. Average-case hardness: not only hard on worst-case inputs, but also on average-case inputs. Relation to RSA: If Factoring is easy, then RSA is insecure. Best classical algorithms: 2O(βπ log π) for π-bit numbers. Shorβs quantum algorithm: π(π3 ). 2. Quantum Fourier Transform (QFT) Definition of QFT. In next class, we will define Fourier transform on general groups. Today, weβll only focus on a cyclic group: ππ . (Sometimes it is written as π/ππ.) Define ππ = π π2π/π , a primitive π-th root of unity. For each π₯ β ππ , the QFT has the following effect on the basis vector |π₯βͺ: |π₯βͺ β 1 π₯π¦ β ππ |π¦βͺ = βπ π¦βπ π 1 β π 2πππ₯π¦/π |π¦βͺ. βπ π¦βπ π In other words, the QFT is the following operator. πΉππ = form, it is 1 βπ βπ₯,π¦βππ πππ₯π¦ |π¦βͺβ©π₯|. In matrix Algorithm for QFT for πππ . (Note: the group is the cyclic group ππ with π = 2π , but not π (π2 )×π ). Write both π₯ and π¦ by binary numbers, namely π₯ = βπβ1 π=0 2 π₯π and π¦ = π βπβ1 π=0 2 π¦π . Then The QFT can be implemented by the following circuit, where we use some controlled-π π , 1 0 π ). (Weβve learned controlled-NOT in the last class; the general 0 π 2ππ/2 with π π = ( controlled-unitary operator is similar: Conditioned on the control bit being 1, do the unitary.) We can see intuitively why this circuit works by verifying the first two qubits. For the top qubit, one Hadamard gates makes the output |0βͺ + (β1)π₯0 |1βͺ = |0βͺ + π 2πππ₯0 /2 |1βͺ = |π§πβ1 βͺ. π π₯ (Note that we used the fact that π 2ππ2 π = 1 for all π β₯ 0 and π₯π β {0,1}.) Now look at the second qubit. After the Hadamard gate, it is |0βͺ + π 2πππ₯1 /2 |1βͺ. The controlled-π 2 gate further puts a phase π 2πππ₯0 /4 on |1βͺ, thus the final output on this qubit is |0βͺ + π₯1 π₯0 π 2ππ( 2 + 4 ) |1βͺ = |π§πβ2 βͺ. Using the same way one can verify the rest qubits. 3. Tool β Phase Estimation One important application of QFT on ππ is Phase Estimation. Suppose that there is a unitary operation π and we are given the ability of applying controlled-ππ operations for j = 2, 22 , 23 , β¦ We are also given an eigenstate |π’βͺ, which corresponds to an eigenvalue ππ’ . The task is to get an estimate of ππ’ . (Recall the spectral decomposition of normal matrices.) Here is a simple algorithm using QFT. To get an intuition why the above algorithm is correct, consider the case that the eigenvalue has an π-bit binary representation. Then the inverse Fourier transform in Step 4 above will give exactly the eigenvalue ππ’ . (Recall the definition of Fourier transform: |πβͺ β βπ¦βππ π2ππππ |πβͺ.) 4. Quantum algorithm for Factoring First, Factoring is known to be equivalent to another problem called Order Finding. In Order Finding, we are given two positive integers π₯ and π that are co-prime to each other. We want to find the smallest π s.t. π₯ π = 1 mod π. For example, when π₯ = 5 and π = 21, then it is not hard to verify that the powers of π₯ are 5, 4, 20, 16, 17, 1 (all mod 21), thus the order is 6. Algorithm for Order Finding. Consider the unitary matrix π|π¦βͺ = |π₯π¦ mod πβͺ for each π¦ β [0, π β 1]. Note that for different π¦βs, π|π¦βͺβs are also different. (Suppose π₯π¦1 β‘ π₯π¦2 , then π₯(π¦1 β π¦2 ) β‘ 0, impossible because π₯ is co-prime with π.) Thus π is indeed a unitary matrix. For each π β [0, π β 1], consider state |π’π βͺ = 1 βπ βπ π π βπβ1 π=0 ππ |π₯ mod πβͺ. It is actually an eigenvector of π with respect to eigenvalue πππ : π|π’π βͺ = 1 πβ1 β ππβπ π |π₯ π+1 mod πβͺ = βπ π=0 1 πβ1 βπ (πβ1) β ππ βπ π=0 |π₯ π mod πβͺ = πππ |π’π βͺ. Thus we can run the Phase Estimation algorithm on |π’π βͺ and weβll get π /π. Some issues: We donβt have |π’π βͺ; after all it needs information of π. But note that 1 πβ1 β |π’π βͺ = βπ π =0 1 πβ1 β 1 πβ1 β ππβπ π |π₯ π mod πβͺ = |1βͺ. βπ π =0 βπ π=0 (For π β 0, βs ππβπ π = 0.) So if we prepare |1βͺ and run the Phase Estimation algorithm, then we will get 1 βπ βπβ1 π =0 |π /πβͺ|π’π βͺ. Measuring the first register gives π /π. Using a simple procedure called the continued fraction, one can get π β² and π β² s.t. π β² πβ² π = π. π β² may not be π, but π β² is at least a factor of π. Doing this a couple of times and get π β²β² , π β²β²β² , β¦ and take the least common multiple of π β² , π β²β² , π β²β²β² , β¦ would give us π. (Actually, a careful analysis shows that most likely the least common multiple of π β² and π β²β² is already π.) π Another issue is that in Phase Estimation, we need controlled-π 2 operations. 5. Hidden Subgroup Problem (HSP) Definition of HSP. Order Finding and many other problems fall into the framework of Hidden Subgroup Problem (HSP). In HSP, there is a function π: πΊ β π on a group πΊ, which contains a subgroup π». π» partitions πΊ by (left) cosets. We have the promise that π is constant on each coset, and distinct on different cosets. The goal is to identify π» efficiently. In quantum algorithms, we can access π by controlled-π gates. In particular, we can make the following transform: |π₯βͺ|0βͺ β |π₯βͺ|π(π₯)βͺ. HSP for finite Abelian groups. Any finite Abelian group πΊ is isomorphic to ππ1 × β― × πππ . For each element π = (π1 , β¦ , ππ ) β ππ1 × β― × πππ , define a character function π π₯1 ππ : πΊ β πΆ by ππ (π₯1 β¦ π₯π ) = ππ11 1 β|πΊ| π π₯ β¦ ππππ π |π1 β¦ ππ βͺ, and define the QFT by |π₯βͺ β βπ ππ (π₯)|πβͺ. It is easily checked that each ππ is a homomorphism: ππ (π₯π¦) = ππ (π₯)ππ (π¦). The set of the ππ βs is denoted by πΊΜ , which is isomorphic to πΊ itself. One property for πΊΜ is that any two distinct characters are orthogonal. In particular, if π β (0, β¦ ,0), then βπ₯βπΊ ππ (π₯) = 0. Algorithm. 1 β|πΊ| βπ₯βπΊ |π₯βͺ query π β 1 β|πΊ| βπ₯βπΊ|π₯βͺ|π(π₯)βͺ measure |π(π₯)βͺ β 1 β|π»||πΊ| ππππ π’ππ β 1 β|π»| QFT β // prepare a uniform superposition βπ¦βπ»|π + π¦βͺ for an unknown and random π β πΊ βπβπΊΜ βπ¦βπ» π(π + π¦)|πβͺ a random π with π(π¦) = 1, βπ¦ β π». Do this for π‘ = π(log|πΊ|) times, and obtain π1 , β¦ , ππ‘ . For a character π, define its kernel as ker(π) = {π β πΊ: π(π) = 1}, and it is easily seen that kernel is a subgroup of πΊ. Claim. For some π = log 2 |πΊ|, it holds that π» = βπ=1,β¦,π ker(ππ ) with high probability. Proof. First, there is a fact that π» β₯ β {π: π(π¦) = 1, βπ¦ β π»} = {π: π» β€ ker(π)} is a group and itβs isomorphic to the quotient group πΊ/π». Thus |π» β₯ | = |πΊ|/|π»| . Similarly |πΎπ‘ β₯ | = |πΊ|/|πΎπ‘ |. Suppose that after π‘ times, πΎπ‘ = βπ‘π=1 ker(ππ ) is still strictly larger than π». The next iteration gives a random π β π» β₯ . Since πΎπ‘+1 β€ πΎπ‘ , we know that |πΎπ‘+1 | |πΎπ‘ | 1 β€ 2 unless πΎπ‘+1 = πΎπ‘ . Since πΎπ‘+1 = πΎπ‘ β© ker(π), it suffices to show that Prβ₯[πΎπ‘ β ker(π)] β€ 1/2. πβπ» Note that πΎπ‘ β ker(π) means π β πΎπ‘β₯ . Therefore, |πΎ β₯ | Prβ₯[πΎπ‘ β ker(π)] = |π»π‘β₯ | = πβπ» |πΊ|/|πΎπ‘ | |πΊ|/|π»| = |π»|/|πΎπ‘ |. This ratio is at most 1/2 since we assumed that π» is a proper subgroup of πΎπ‘ . Note There are many explanations of Shorβs algorithm, see the wiki page. We basically followed [NC00], Chapter 5 and [CvD10] Section III. For the Hidden Subgroup Problem part, see [CvD10], Section IV-C. Reference [NC00] Michael Nielsen and Isaac Chuang, Quantum Computation and Quantum Information, Cambridge University Press, 2000. [CvD10] Andrew M. Childs and Wim van Dam, Quantum algorithms for algebraic problems, Reviews of Modern Physics, Volume 82, JanuaryβMarch 2010. Exercise 1. Verify that the QFT operator πΉπ is unitary. 2. Write down the QFT for π2 , π3 , π4 , π5 . 3. Suppose π = 2π . We want a uniform superposition 1 βπ |π₯βͺ. βπ π₯=1 Prove that we can obtain it by simply preparing π qubits all in state |0βͺ, and then applying a Hadamard gate on each qubit.