Instructor: Shengyu Zhang - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Instructor: Shengyu Zhang

Description:

Efficient quantum algorithm for Period Finding by quantum Fourier transform (QFT) ... We use a weird 'ket' notation | to denote such a state. ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 27
Provided by: cseCu
Category:

less

Transcript and Presenter's Notes

Title: Instructor: Shengyu Zhang


1
CSC3160 Design and Analysis of Algorithms
Week 13 Quantum Algorithms
  • Instructor Shengyu Zhang

2
Content
  • Quantum mechanics
  • Mathematical formulation
  • Efficient quantum algorithm for Factoring
  • Reduction of Factoring to Period Finding
  • Efficient quantum algorithm for Period Finding by
    quantum Fourier transform (QFT)

3
Quantum mechanics
  • Quantum mechanics study the behaviors of systems
    at atomic scales (and smaller).
  • Many classical rules do not hold any more.
  • Applications to
  • chemistry,
  • technology (such as laser, transistor, the
    electron microscope, and magnetic resonance
    imaging, etc)

4
Mathematical model for quantum mechanics
  • Despite all the mysteries, quantum mechanics has
    a clean simple and beautiful math framework.
  • 4 postulates

5
Postulate 1
  • State space Every isolated physical system
    corresponds to a unit vector in a complex vector
    space.
  • We use a weird ket notation ? to denote such
    a state.
  • For example, for an N-dimensional space, 0?, ,
    N-1? is a complete basis states.
  • For 1 quantum bit, or qubit a0?ß1?, where
    a2 ß2 1
  • That is, it can sits anywhere between 0 and 1 (on
    the unit circle)!

6
Postulate 2
  • Evolution/Operation The evolution of a closed
    quantum system is described by a unitary
    transformation.
  • That is, if the system is a1? at time t1, and
    a2? at time t2, then there is a unitary
    transformation U s.t. a2? Ua1?.
  • Think of a unitary transformation as a simple
    rotation. Definition coming up later.
  • For 1 qubit, its simply a rotation on the plane.

7
Postulate 3
  • We can only observe a quantum system by measuring
    it.
  • The outcome of the measure is random in general.
  • For 1 qubit state a0?ß1?, the probability of
    getting 0 is a2 and probability of getting 1 is
    ß2.
  • The system is changed by the measurement.
  • For 1 qubit state a0?ß1?, the system becomes
    0? if 0 is the outcome, and 1? if 1 is the
    outcome.

8
Postulate 4
  • The state of two systems a1? and a2?, put
    together, is a1??a2?.
  • ? tensor product.
  • (a,b) ? (c,d,e) (ac, ad, ae, bc, bd, be)
  • In general, dimension is the product of the two
    dimensions
  • Notation 0??n 0???0?, n times

9
Simple facts
  • Controlled operation Given implementation of any
    operation U, we can implement the controlled-U,
    an quantum analog of if clause.
  • For example, if we have a single-qubit unitary
    operator U, then we can implement the operator
    s.t. a0?a0? ß1?a1? ? a0?a0? ß1? Ua1?

10
Factoring
  • Recall that in the very first class of this
    course, we mentioned that though multiplication
    is easy, its inverse, factoring seems very hard
  • only for classical computers!
  • Best known (About) 2n1/3
  • Quantum? (About) n2 or n3

11
Map of solution
efficient classical reduction
Order Finding
Factoring
Phase Estimation
Quantum Fourier Transform (QFT)
12
Order Finding
  • Given positive integers x and N with no common
    factors, the order of x is the least positive
    integer r s.t. xr 1 mod N.
  • Well talk about the reduction of Factoring to
    Order Finding given time.
  • Next Efficient quantum algorithms for Order
    Finding, using two tools
  • Quantum Fourier Transform (QFT)
  • Phase Estimation

13
Fourier Transform (over ZN)
  • Recall that the Fourier Transform (over ZN) maps
    the vector (x0, , xN-1) to (y0, , yN-1), where
    yk N-1/2?j0,,N-1 ?Njkxj
  • ?N ei(2p/N)
  • Quantum Fourier Transform for N-dimensional
    state x? (where x?0, , N-1)
  • QFTx? N-1/2?j0,,N-1 ?Njxj?
  • That is, N-1/2?j0,,N-1 e2pijx/Nj?
  • In particular, 0??n ?2-n/2?j0,,N-1j?

14
  • For a matrix A and a vector x, if Ax ?xthen
    ? is an eigenvalue and x is an eigenvector.
  • A matrix is unitary if all its eigenvalues have
    unit length. That is, of the form ei?.
  • ?/2p is called phase.

15
Phase Estimation
  • Phase Estimation For a unitary matrix U and a
    given eigenvector u?, suppose we can apply all
    U, U2, U4, , U2n efficiently, then we can find
    the eigenvalue corresponding to u?.
  • If ei2pf is the eigenvalue, then Phase Estimation
    gives 0? u? ? f? u?

16
Phase Estimation by QFT
  • For simplicity, suppose the phase f has an n-bit
    representation, i.e. f 0.f1 fn
  • Algorithm
  • 0??n u?QFT? 2-n/2?j0,,N-1j? u?C-Uj?
    2-n/2?j0,,N-1j? Uju? 2-n/2?j0,,N-1j?
    e2pijfu? (2-n/2?j0,,N-1 e2pijf j?) u?
    IQFT? f1 fn? u? !
  • Last step Try QFT on f1 fn?
  • It gives 2-n/2?j0,,N-1 e2pijf j?

17
  • QFT on f1 fn? 2-n/2?j0,,N-1 e2pijf j?
  • Recall that f 0.f1 fn
  • QFT on f1 fn? QFT on fN? 2-n/2?j0,,N-1
    e2pijfN/N j? 2-n/2?j0,,N-1 e2pijf j?

18
Solving Order Finding by Phase Estimation
  • Recall that the Order Finding (x,N) problem is to
    find the min r s.t. xr 1 mod N.
  • Define unitary transform UN?N Uy? xy mod
    N?
  • U is unitary xy mod N y0, , N-1 are
    distinct if x and N are relatively prime.
  • Consider the state (for any s?0, , N-1) us?
    r-1/2?k0, , r-1 e-2pisk/r xk mod N?
  • Try to compute Uus? What do you find?

19
  • Uy? xy mod N?,
  • us? r-1/2?k0, , r-1 e-2pisk/r xk mod N?
  • Uus? U (r-1/2?k0, , r-1 e-2pisk/r xk mod
    N?) r-1/2?k0, , r-1 e-2pisk/r Uxk mod N?
    r-1/2?k0, , r-1 e-2pisk/r xxk mod N?
    r-1/2?k0, , r-1 e-2pisk/r xk1 mod N?
    r-1/2?k1, , r e-2pis(k-1)/r xk mod N? //
    k k1 r-1/2?k1, , r e-2pisk/r2pis/r
    xk mod N? e2pis/r r-1/2?k1, , r
    e-2pisk/r xk mod N? e2pis/r r-1/2?k0, ,
    r-1 e-2pisk/r xk mod N? e2pis/rus?
  • So us? is an eigenvector of U w.r.t. eigenvalue
    e2pis/r
  • In other words, the phase is s/r.

20
  • So us? is an eigenvector of U w.r.t. eigenvalue
    e2pis/r
  • In other words, the phase is s/r.
  • Thus if we can use Phase Estimation to find the
    phase s/r, then we can find the order r.
  • Some details hidden here since Phase Estimation
    only gives an approximation to s/r.
  • But it turns out that an approximation to s/r is
    enough for us to retrieve r

21
Preparations for Phase Estimation
  • To use Phase Estimation, we need
  • Prepare a state in us?
  • Apply U2j for j 1, 2, , n.
  • Actually Not exactly n, but similar.
  • The second issue though U2j looks scary, we can
    implement it efficiently

22
  • Recall that Uy? xy mod N?
  • Thus U2jy? x2jy mod N? (x2j mod N) (y
    mod N)?
  • ab mod N (a mod N)(b mod N).
  • So its enough to compute x2j mod N, which an be
    done easily
  • Compute x1 x mod N
  • Compute x2 x12 mod N ( x2 mod N)
  • Compute x3 x22 mod N ( x4 mod N)
  • Compute x4 x32 mod N ( x8 mod N)

23
The first issue Prepare a state in us?
  • Recall us? r-1/2?k0, , r-1 e-2pisk/r xk
    mod N?
  • This looks more serious After all, preparing
    us? needs knowledge of r, which is exactly what
    we are looking for.
  • Key Observation Though we dont know each us?,
    we know their sum r-1/2?s0, , r-1 us?
    1?

24
  • r-1/2?s0, , r-1 us? r-1/2?s0, , r-1
    r-1/2?k0, , r-1 e-2pisk/r xk mod N? r-1
    ?k0, , r-1 (?s0, , r-1 e-2pisk/r) xk mod
    N? 0 unless k 0 (in
    which case the sum r) x0 mod N? 1?

25
  • Thus, if we prepare 0? 1? in the Phase
    Estimation, then we will have the results of
    phases in superposition
  • 0? 1? r-1/2?s0, , r-1 0? us? PE?
    r-1/2?s0, , r-1 s/r? us? Measure ? s/r? for
    a random s.
  • It turns out that from s/r, one can get r easily.
  • using continued fraction algorithm

26
About the final
  • Open book / lecture notes. No Internet.
  • Covering the whole semester, but mainly the
    second half such as DP, Network Flow, FFT/QFT,
    Approximation Algorithm,
  • The last problem you need to think about which
    method to use (Divide-and-Conquer? DP? Greedy?
    Reduction? )
Write a Comment
User Comments (0)
About PowerShow.com