0% found this document useful (0 votes)
2 views

lecture_02

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

lecture_02

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Probabilistic computing

Classical computation + coin ips


• Example 1: Matrix multiplication, Freivald’s matrix multiplication checker
• Example 2: Primality testing
• Input: n-bit integer
• Output: YES if prime, NO otherwise.
n/2
• Naive algorithm: O(2 ) steps
4
• Miller 1976: Assuming extended Riemann hypothesis, O(n ) steps
2
• Rabin 1980: Probabilistic twist on Miller’s algorithm, O(n ) steps
• Miller–Rabin algorithm used in https
fl
Strongly believed
Every “compute a function” problem in P
probabilistically is also in P deterministically
Upshot
Probabilistic computing

• Classical computation + one simple power • Typical probabilistic algorithm looks like:
“coin ip”

• Analyzing its complexity / e ciency requires • Initialize array A of length n


probability theory
• For each i, A[i]:= coin ip 0 or 1
• Quintessential use: simulate something
random • Do classical deterministic computing on A
• Seems to give speedups over deterministic n
computing from one level of P e ciency to • Now describe A’s state requires 2 numbers
n
another level (i.e. Pr(A = x) ∀x ∈ {0,1} )

• Strongly believed: doesn’t give speedups from


exponential time to polynomial time for any
“compute a function” task
fl
fl
ffi
ffi
Looking forward
Quantum computing

• Classical computation + one simple power • Typical quantum algorithm looks like:
“rotate”

• Analyzing its complexity / e ciency requires • Initialize array A of n photons (qubits)


probability theory + linear algebra
• Run them through an obstacle course of
• Quintessential use: simulate something mirror and prisms (quantum circuits)
quantum
n
• Now describe the state requires 2 possibly
• Seems to give speedups over probabilistic negative numbers (amplitutdes)
computing from one level of P e ciency to
another level

• Strongly believed: doesn’t give speedups from


exponential time to polynomial time for any
“compute a function” task
ffi
ffi
Understanding and measuring one qubit
Comparison with classical computing

• In classical computer,
• Logical bit 0 or 1
• Physical bit low or high voltage
• In quantum computer,
• Physically represented by photon polarization
• A photon can be horizontally polarized (|0⟩) or vertically polarized (|1⟩)
Quantum mechanics
Law #1

• If a particle can be in one of the two basic states |0⟩ or |1⟩, then it can also
be in a superposition state

• α amplitude on |0⟩ and β amplitude on |1⟩


2 2
• where α and β are complex numbers such that |α| + |β| = 1
• Write the superposition state as α|0⟩ + β|1⟩
• A photon may have the following states.
• Example 1: 0.8|0⟩ + 0.6|1⟩
• Example 2: 0.8|0⟩ − 0.6|1⟩
• Example 3: 1|0⟩ + 0|1⟩, write simply as |0⟩
• Example 4: i|0⟩ + 0|1⟩
Measuring device
How can we extra information from a photon in superposition?

Readout is either |0⟩ or |1⟩

photon

What’s the readout of a photon in superposition?


Quantum mechanics
Law #2

• For a photon in the superposition state α|0⟩ + β|1⟩


• If you measure it, then the readout is
2
• |0⟩ with probability |α|
2
• |1⟩ with probability |β|
2 2
• It makes sense because |α| + |β| = 1
• After the measurement, the state “collapses” to |0⟩ if the readout is |0⟩
and “collapses” to |1⟩ if the readout is |1⟩
Examples
? ?

Initial state
0.8|0⟩ − 0.6|1⟩
?
Polarize

Polarize lter rst measures photon’s state,


if |0⟩, the photon ies through;
if |1⟩, photon is converted into heat.
fi
fi
fi
fl
More photons
Joint state

• Two photons have 4 basic states |00⟩, |01⟩, |10⟩, |11⟩


n
• n photons have N = 2 basic states
• |00…00⟩, |00…01⟩, …, |11…11⟩ or equivalently |0⟩, |1⟩, …, |N − 1⟩
Quantum mechanics
Law #1 and #2

N−1
2
∑ ∑ ∑
Joint state is αs|s⟩ or equivalently αs|s⟩, where |αs| = 1
• n
s∈{0,1} s=0 s
2
• Measurement: readout is |s⟩ with probability |αs| , and the joint state
collapses to |s⟩ if the readout is |s⟩
Mathematically…
Linear algebra

d
• Joint state is a unit (column) vector in ℂ

[−0.6]
0.8
Example: 0.8|0⟩ − 0.6|1⟩ is just , a point on the unit circle

d †
• Recall, for u, v ∈ ℂ , ⟨u, v⟩ = u*
1
v1 + …u*
d
vd = u v (dagger, or conjugate
transpose)

• Recall, if z = x + yi, then z* = x − yi


2 2 d

Check: ∥v∥ = |vk| for v ∈ ℂ

k
Dirac’s notation
Bra-Ket
1 0 0 3
[0] [0 ] [1] ( )
High school: i = 0 , j = 1 , k = 0 ,3i + 5j − 2k = 5

−2
1 0 0
0 1 0
College: e1 = , e2 = , …, ed =
• ⋮ ⋮ ⋮
0 0 1
• Quantum: |0⟩, …, |d − 1⟩
α
• Qubit state: [β] = α|0⟩ + β|1⟩,
Dirac’s notation
Bra-Ket

• Ket |blah⟩ signi es a column vector


• Bra ⟨blah| signi es a row vector

• Connection: ⟨blah| = |blah⟩

• Inner product: u v = ⟨u||v⟩ = ⟨u ∣ v⟩
fi
fi
Dirac’s notation
Examples

1 1
|+⟩= |0⟩ + |1⟩
• 2 2
1 1
|−⟩= |0⟩ − |1⟩
• 2 2
• What happens when a photon in | + ⟩ state is measured?
Measuring in a different basis
For one qubit

• Standard measuring device measures in |0⟩, |1⟩ basis


• For any orthonormal basis |u⟩, |v⟩, can build a measuring device for this basis.
Readout is either |u⟩ or |v⟩

photon
2
• It makes sense for α|u⟩ + β|v⟩, the readout is |u⟩ with probability |α| ,
2
and the readout is |v⟩ with probability |β|
Measuring in a different basis
For one qubit

2
• Given |φ⟩ ∈ ℂ , how to write it as α|u⟩ + β|v⟩?
• Theorem: If |u⟩, |v⟩ form an orthonormal basis, then
|φ⟩ = ⟨u ∣ φ⟩|u⟩ + ⟨v ∣ φ⟩|v⟩
2
• Theorem: Measure |φ⟩ ∈ ℂ in the |u⟩, |v⟩ basis. The readout is |u⟩ with
2 2
probability |⟨u ∣ φ⟩| , and the readout is |v⟩ with probability |⟨v ∣ φ⟩| .

• Example: Measure |0⟩ in the | + ⟩, | − ⟩ basis

You might also like