introduction to quantum information processingjyard/qic710/qic710lec8-2017.pdfΒ Β· exercise: why are...

18
1 Introduction to Quantum Information Processing QIC 710 / CS 768 / PH 767 / CO 681 / AM 871 Jon Yard QNC 3126 [email protected] http://math.uwaterloo.ca/~ jyard/qic710 Lecture 8 (2017)

Upload: tranlien

Post on 20-Jul-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

1

Introduction to

Quantum Information ProcessingQIC 710 / CS 768 / PH 767 / CO 681 / AM 871

Jon Yard

QNC 3126

[email protected]

http://math.uwaterloo.ca/~jyard/qic710

Lecture 8 (2017)

Page 2: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

2

Recap of:

Eigenvalue estimation problem

(a.k.a. phase estimation)

Page 3: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

3

Generalized controlled-U gates

U

I

0

0

U

π‘Ž

𝑏

π‘Ž

π‘ˆπ‘Ž 𝑏

π‘Ž1

U

:

π‘Žπ‘š

π‘Ž1:

π‘Žπ‘š

𝑏1:

π‘π‘›π‘ˆπ‘Ž1β‹―π‘Žπ‘š 𝑏

12

2

000

000

000

000

m

U

U

U

I

Example: 11010101 ↦ 1101π‘ˆ130101

Page 4: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

4

Eigenvalue estimation problem

π‘ˆ is a unitary operation on 𝑛 qubits

|πœ“βŸ© is an eigenvector of π‘ˆ, with eigenvalue 𝑒2πœ‹π‘–πœ™ (0 ≀ πœ™ < 1)

Output: πœ™ (π‘š-bit approximation)

Input: black-box for

U n qubits

m qubitsand a copy of |πœ“βŸ©

β€’ one query to generalized controlled-π‘ˆ gate

β€’ 𝑂 𝑛2 auxiliary gates

β€’ Success probability 4/2 0.4

Algorithm:

Note: with 2m-qubit control gate, error probability is exponentially small

Page 5: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

5

Order-finding via

eigenvalue estimation

Page 6: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

6

Order-finding problemLet π‘š be an 𝑛-bit integer

Def: β„€π‘šΓ— = {π‘₯ ∈ {1,2,… ,π‘š –1} ∢ gcd(π‘₯,π‘š) = 1} a group (mult.)

Def: ordπ‘š(π‘Ž) is the minimum π‘Ÿ > 0 such that π‘Žπ‘Ÿ ≑ 1mod π‘š

Order-finding problem: given π‘š and π‘Ž ∈ β„€π‘šΓ— find ordπ‘š(π‘Ž)

Example: β„€21Γ— = {1,2,4,5,8,10,11,13,16,17,19,20}

The powers of 5 are: 1, 5, 4, 20, 16, 17, 1, 5, 4, 20, 16, 17, 1, 5,…

Therefore, ord21(5) = 6

Note: no classical polynomial-time algorithm is known for

this problemβ€”it turns out that this is as hard as factoring

Page 7: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

7

Order-finding algorithm (1)Define: π‘ˆ (an operation on 𝑛 qubits) as: π‘ˆ 𝑦 = π‘Žπ‘¦ mod π‘š

Define:

Then

Therefore πœ“1 is an eigenvector of π‘ˆ.

Knowing the eigenvalue is equivalent to knowing 1/π‘Ÿ,

from which π‘Ÿ can be determined.

πœ“1 =1

π‘Ÿ

𝑗=0

π‘Ÿβˆ’1

π‘’βˆ’2πœ‹π‘– 1/π‘Ÿ 𝑗|π‘Žπ‘— mod π‘šβŸ©

π‘ˆ πœ“1 =1

π‘Ÿ

𝑗=0

π‘Ÿβˆ’1

π‘’βˆ’2πœ‹π‘– 1/π‘Ÿ 𝑗|π‘Žπ‘—+1 mod π‘šβŸ©

=1

π‘Ÿ

𝑗=0

π‘Ÿβˆ’1

𝑒2πœ‹π‘–(1/π‘Ÿ)π‘’βˆ’2πœ‹π‘– 1/π‘Ÿ (𝑗+1)|π‘Žπ‘—+1 mod π‘šβŸ©

= 𝑒2πœ‹π‘–(1/π‘Ÿ) |πœ“1⟩

Page 8: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

8

Order-finding algorithm (2)

U 𝑛 qubits

2𝑛 qubits*Corresponds to the mapping

π‘₯ 𝑦 ↦ π‘₯ π‘Žπ‘₯𝑦 mod π‘š .

Moreover, this mapping can

be implemented with roughly

𝑂(𝑛2) gates.

The eigenvalue estimation algorithm yields a 2𝑛-bit estimate

of 1/π‘Ÿ (using the above mapping and the state |πœ“1⟩).

From this, a good estimate of π‘Ÿ can be calculated by taking

the reciprocal, and rounding off to the nearest integer.

Big problem: how do we construct |πœ“1⟩ to begin with?

Exercise: why are 2𝑛 bits necessary and sufficient for this?

* We’re now using π‘š for the modulus and setting the number of control qubits to 2𝑛.

Page 9: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

9

Bypassing the need for πœ“1 (1)

Note: If we let

then any one of these could be used in the previous procedure,

giving an estimate of π‘˜/π‘Ÿ. Then π‘Ÿ = π‘˜ π‘˜/π‘Ÿ βˆ’1.

What if π‘˜ is chosen randomly and kept secret?

πœ“1 =1

π‘Ÿ

𝑗=0

π‘Ÿβˆ’1

π‘’βˆ’2πœ‹π‘– 1/π‘Ÿ 𝑗|π‘Žπ‘— mod π‘šβŸ©

πœ“2 =1

π‘Ÿ

𝑗=0

π‘Ÿβˆ’1

π‘’βˆ’2πœ‹π‘– 2/π‘Ÿ 𝑗|π‘Žπ‘— mod π‘šβŸ©

πœ“π‘˜ =1

π‘Ÿ

𝑗=0

π‘Ÿβˆ’1

π‘’βˆ’2πœ‹π‘– π‘˜/π‘Ÿ 𝑗|π‘Žπ‘— mod π‘šβŸ©

πœ“π‘Ÿ =1

π‘Ÿ

𝑗=0

π‘Ÿβˆ’1

π‘’βˆ’2πœ‹π‘– π‘Ÿ/π‘Ÿ 𝑗|π‘Žπ‘— modπ‘šβŸ©

Page 10: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

10

Bypassing the need for |πœ“1⟩ (2)

Note: If π‘˜ and π‘Ÿ have a common factor, it is impossible

because, for example, 2/3 and 34/51 are indistinguishable

What if π‘˜ is chosen randomly and kept secret?

Can still uniquely determine π‘˜ and π‘Ÿ from a 2𝑛-bit estimate

of π‘˜/π‘Ÿ, provided they have no common factors, using the

continued fractions algorithm*.

* For a discussion of the continued fractions algorithm, please see

Appendix A4.4 in [Nielsen & Chuang]

So this is fine as long as π‘˜ and π‘Ÿ are relatively prime …

Page 11: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

11

Bypassing the need for |πœ“1⟩ (3)

Recall that π‘˜ is randomly chosen from {1,… , π‘Ÿ}.

What is the probability that π‘˜ and π‘Ÿ are relatively prime?

Therefore, the success probability is at least Ξ©(1/ log(𝑛)).

The probability that this occurs is πœ™(π‘Ÿ)/π‘Ÿ, where πœ™ is

Euler’s totient function (defined as the cardinality of β„€π‘ŸΓ—).

It is known that πœ™ π‘Ÿ = Ξ©(π‘Ÿ/ log log(π‘Ÿ)), which implies that

this probability is at least Ξ©(1/ log log(π‘Ÿ)) = Ξ©(1/ log(𝑛)).

Is this good enough? Yes, because it means that the success

probability can be amplified to any constant < 1 by repeating

𝑂(log 𝑛) times (so still polynomial in 𝑛).

But we’d still need to generate a random |πœ“π‘˜βŸ© here …

Page 12: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

12

Bypassing the need for |πœ“1⟩ (4)

Returning to the phase estimation problem, suppose that |πœ“1⟩and |πœ“2⟩ are orthogonal, with eigenvalues 𝑒2πœ‹π‘–πœ™1 and 𝑒2πœ‹π‘–πœ™2,

and that 𝛼1 πœ“1 + 𝛼2|πœ“2⟩ is used in place of an eigenvector:

U

H

H

H

000

πΉπ‘šβ€ 

What will the outcome of the measurement be?

It can be shown* that the outcome will be an estimate ofπœ™1 with probability 𝛼1

2

πœ™2 with probability 𝛼22

* Showing this is straightforward, but not entirely trivial.

𝛼1 πœ“1 + 𝛼2|πœ“2⟩

Page 13: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

13

Bypassing the need for |πœ“1⟩ (5)

Along these lines, the state

So now all we have to do is construct the state.

yields the same outcome as using a random |πœ“π‘˜βŸ© (but not being

given π‘˜), where each π‘˜ ∈ {1,… , π‘Ÿ} occurs with probability 1/π‘Ÿ.

This is a case that we’ve already solved.

In fact, this is something that is easy, since

This is how the previous requirement for |πœ“1⟩ is bypassed.

1

π‘Ÿ

π‘˜=1

π‘Ÿ

|πœ“π‘˜βŸ©

1

π‘Ÿ

π‘˜=1

π‘Ÿ

|πœ“π‘˜βŸ© =1

π‘Ÿ

π‘˜=1

π‘Ÿ

𝑗=0

π‘Ÿβˆ’1

π‘’βˆ’2πœ‹π‘– π‘˜/π‘Ÿ 𝑗|π‘Žπ‘— mod π‘šβŸ© = |1⟩

Page 14: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

14

Quantum algorithm for order-finding

π‘ˆπ‘Ž,π‘š

H

H

H

0

0

0

0

0

1

H

H 4

4 8H

measure these qubits and

apply continued fractions

algorithm to determine a

quotient, whose

denominator divides r

π‘ˆπ‘Ž,π‘šπ‘¦ = π‘Ž 𝑦 mod π‘š

inverse QFT

For constant success probability, repeat 𝑂(log 𝑛) times and

take the smallest resulting π‘Ÿ such that π‘Žπ‘Ÿ ≑ 1mod π‘š

Number of gates for Ξ©(1/ log 𝑛) success probability is:

𝑂(𝑛2 log 𝑛 log log(𝑛))

Page 15: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

15

Reducing factoring to order finding

Page 16: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

16

The integer factorization problem

Input: π‘š (𝑛-bit integer; we can assume it is composite)

Output: β„Ž, β„Žβ€² > 1 such that β„Žβ„Žβ€² = π‘š.

Note 2: given any efficient algorithm for the above, we can

recursively apply it to fully factor π‘š into primes efficiently.

Note 1: no efficient (polynomial-time) classical algorithm is

known for this problem.

Note 3: βˆƒ polynomial-time classical algorithms for primality testing:

β€’ Miller-Rabin - randomized

β€’ Agrawal–Kayal–Saxena (AKS) - deterministic, but slower

β€’ sage: is_prime(m) uses PARI implementation of ECPP

(Elliptic Curve Primality Proving) - randomized and faster

Page 17: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

17

Factoring prime-powers

There is a straightforward efficient classical algorithm for

recognizing and factoring numbers of the form π‘š = π‘π‘˜, for

some (unknown) prime 𝑝.

What is this algorithm?

Therefore, the interesting remaining case is where π‘š has

at least two distinct prime factors.

Hint: If in fact π‘š = π‘π‘˜, then π‘˜ ≀ log2π‘š ≀ 𝑛.

Page 18: Introduction to Quantum Information Processingjyard/qic710/Qic710Lec8-2017.pdfΒ Β· Exercise: why are 2 bits ... Appendix A4.4 in [Nielsen & Chuang] ... with probability 𝛼2 2 * Showing

18

Proposed quantum algorithm (repeatedly do):

1. randomly choose π‘Ž ∈ {2, 3, … ,π‘šβ€“1}2. compute β„Ž = gcd(π‘Ž,π‘š)3. if β„Ž > 1 then

output β„Ž,π‘š/β„Želse

compute π‘Ÿ = ordπ‘š(π‘Ž) (quantum part)

if π‘Ÿ is even then

compute π‘₯ = π‘Žπ‘Ÿ/2 – 1mod π‘šcompute β„Ž = gcd(π‘₯,π‘š)if β„Ž > 1 then output β„Ž,π‘š/β„Ž

Numbers other than prime-powers

So π‘š | π‘Žπ‘Ÿ/2 + 1 π‘Žπ‘Ÿ/21 .

This means π‘š | π‘Žπ‘Ÿβ€“ 1.

Thus, either π‘š|π‘Žπ‘Ÿ/2 + 1

or gcd π‘Žπ‘Ÿ/2 βˆ’ 1,π‘š is

a nontrivial divisor of π‘š.

At least half (actually a 1 βˆ’ 2βˆ’#odd prime factors of π‘š fraction) of the

π‘Ž ∈ {2, 3, … ,π‘šβ€“1} have ordπ‘š(π‘Ž) even and result in gcd π‘Žπ‘Ÿ/2 βˆ’ 1,π‘š

being a nontrivial divisor of π‘š (see Shor’s 1995 paper for details).

Analysis

Problem. Given odd composite π‘š β‰  π‘π‘˜, compute nontrivial divisor β„Ž of π‘š.

Assume we find an π‘Žwith π‘Ÿ = ordπ‘š π‘Ž even.