Lecture notes
Lecture notes
Hsi-Sheng Goan
1 Overview
53 quantum bits (Quantum supremency)
Task that super computer takes 100000 years (IBM days) only takes 200 sec on Quantum Computer
IBM 53 qubits have not been optimized
2100 state seems powerful
2 Speech
RSA cryptography: Factor two prime number Factor 309-digit number: Classical THz computer take 150000
years, and quantum computer take < 1s
2.2 Development
2016 IBM 5-qubit online
2017 IBM 16-qubit online (but 1 or 2 malfunction)
50 qubits need to pay The temperature for Quantum computer is nearly 20mK to superconduct
Noisy Intermediate Scale Quantum (N ISQ)
In classical computer, we can prevent noise just put on threshold, but quantum error is hard to correct. We
may add another error to that
Google v.s. IBM: 53 qubits 200s and 72 petabyte momory few days
2.3 implementation
• 1998 proposol: Sillicon-based electron-immediated nuclear spin (2012 implement)
• Electron spins in quantum dots
• 2015 two-quibt logic gate in silicon (Using semiconductor 15nm!!)
2.4 Challenge
• Much larger numbers of qubits e.g. shor’s need thousand qubits
• Much greater connectivity with fewer restriction
• Much lower error rate
• True fault tolerance-error correction
1
• Higher operating temperture
2.5 HQC
Hybrid Quantum-Classical (HQC) Algorithm
Variational quantum circuit algorithm
Data encoding scheme
Vairational Quantum Eigensolver (VQE)
2.6 Application
• Artificial intelligence
• Medicine and Materials (Molecule simulation)
• Supply chain
• Cloud Security
Remark Quantum system is rare in our daily life. It seems the nature is against it.
Explore and exploit Quantum effect, based on the principle of QM to compute and process information in
ways that are faster or more efficient than or even impossible on conventional computers or
information processing devices.
Example
Shor’s Quantum factoring algorithms (1994)
Grover’s Quantum search algorithms (1996)
Quantum simulation (exponential enhancement in memory size) Feynamn 1982
Quantum Teleportation (1993) Bennett et al.
Quantum superdense coding (1992)Bemett and Wiesner
Quantum Cryptography (1984) Bennett and Brassard
Remark Only Quantum machine can simulate quantum system. Because quantum system grows too fast.
Remark Quantum Teleportation: Transfer quantum state from one place to another place
Quantum superdense coding: Use a few qubit to transfer more bit information
2
4.1 Fundamental questions of IS
1. Given a physical resoures - energy, time, space, bit, gates
2. Given an information processing task - data compression, information transmission, computing task,
factoring
3. Given a criterion for success
Pursuing this question in the quantum case has led to and presumably will continue to lead to interest-
ing new information processing capability.
By contrast, the mathematics used in application to QIS is ”relatively painless”. Do not need to read
the tranditional QM textbooks. Here, I mean the mathematics required to understand those algorithms
protocols. However, the math for physical implementation and consideration of real world, noise and deco-
herence may be a little bit involved.
4 supensingly simple postulates witch lay the ground rules for our desceiption of the world.
Most physicsts believe that theory of everything will be a QM theory:
1. Attempts to describe gravitation in the framework of QM has so far not yet been successful.
2. Conceptual issue, so called ”measurement problem” remains to be clarified.
3
4. How to describe Quantum of a composite system?
tensor product
Postulate Associated to any isolated physical system is a complex vector space with inner product (that
is Hilbert space) known as the state space of the system. Thy system is completely described by its state
vector which is a unit vector in the system’s state space.
Remark QM does not tell us, for a given physical system, whate the state space of that system is, nor does
it tell us the state vector of the system is.
Remark Finding that out for a specific system is a difficult problem for which physicists have developed
many beautiful rules (e.g. QED)
Example Quantum bit (qubit) (Two level system)
”bit” is the fundamental element for information processing concept of classical Computation and Informa-
tion. It can exist in two distinct states represented by 0 and 1.
It is over C2 and quantum state is just a unit vector in that space.
|ψi = α |0i + β |1i
α 1 0
|ψi = α |0i + β |1i = =α +β
β in |0i,|1i basis 0 1
α 2 2
hψ|ψi = α∗ β ∗ = |α| +|β| = 1
β
Remark QM does not prescribe this unitary evolution for particular system. Physicsts figure it out by a
complex interplay between theory and experiement
Remark matrix = transformation = linear operator = map = Quantum gate
Example Pauli gate (Pauli sigma matrices)
0 1 0 −i 1 0 1 0
σx = σy = σz = 1=
1 0 i 0 0 −1 0 1
Quantum wire: The qubit is carried along by this Quantum wire until it reaches the X gate, not necessarily
means that it carries qubit through space, may represnt a stationary qubit which is simply sitting there,
passing through time until the X gate is applied.
0 1 1 0
X |0i = = = |1i
1 0 0 1
0 1 0 1
X |1i = = = |0i
1 0 1 0
Quantum NOT gate
4
Postulate The time evolution of the state of a closed quantum system by Schrödinger equation:
∂ |ψi
i~ = H |ψi
∂t
if H is independent of time
U (t1 , t2 ) = e−iH(t2 −t1 )/~
if H depends on time, we have to do the integration on Hamiltonian
Mm |ψi
q
†
hψ|Mm Mm |ψi
†
P
The measurement operators satisfy the completeness equation m Mm Mm = 1
• Post-Measurement
Mm |ψi α α
q =q |0i = 2 |0i = eiθ |0i
†
hψ|Mm Mm |ψi |α|
2 |α|
Remark
O00 O01 X
O= and O = Oij |ii hj|
O10 O11
i,j
5
Bloch Shpere representation
Distinguishibility: a set of states |ψi i, 1 ≤ i ≤ n known to Alice and Bob. Alice choose a state |ψi i
and gives it to Bob, whose task is to identify the index j of the state Alice has given him.
1. Suppose |ψi i are orthonormal hψi |ψj i = δij . Define Mj = |ψj i hψj |. If the state |ψj i is prepared, then
p(j) = hψj |Mj† Mj |ψj i = 1 ; p(i) = hψi |Mj† Mj |ψi i = 0.
Remark Since Alice only Pchoose n states, there are some states that are not chosen. Hence, we adjust
the completness relation i=1 Mi† Mi + M0† M0 = 1. M0 is the rest of the states.
n
2. If the state |ψi i are not orthonormal then there is no Quantum measurement capable of distinguishing
these state. hψi |ψj i =
6 0 for i 6= j
where Pm = |mi hm| is the projector onto the eigenspace of M with eigenvalue m.
The possible outcomes of the measurement correspond to the eigenvalues m and the outcome m occurs
with probability
p(m) = hψ|Pm |ψi
6
The corresponding post-measurement is
Pm |ψi
p
hψ|Pm |ψi
Example
~ ~
Sz = |+i h+| − |−i h−|
2 2
Remark Projective measurement can be usderstood as a special case of general measurement
X
†
Mm Mm = 1
m
†
From postulate of projective measurement, Mm = Mm (Hermition) and Mm Mm0 = Mm δmm0 (OrthogonalP rojector)
p(m) = hψ|Mm Mm |ψi = hψ|Mm |ψi and √ Mm†|ψi
†
=√Mm |ψi
= √ Mm |ψi
hψ|Mm Mm |ψi p(m) hψ|Mm |ψi
Hence
2 2
hψ|[A, B]|ψi ≤ 4 hψ|AB|ψi ≤ 4 hψ|A2 |ψi hψ|B 2 |ψi
Suppose C and D are two obervables and A = C − hCi , B = D − hDi⇒ [A, B] = [C, D]
2
hψ|[C, D]|ψi ≤ 4(∆C)2 (∆D)2
1
hψ|[C, D]|ψi ≤ (∆C)(∆D)
2
There is an intrinsic limit to the accureacy of the simultaneous measurement of both C and D if [C, D] 6= 0.
The measurement of one observable necessarily disturbs the other if [C, D] 6= 0
Positive operator: A special subclass of Hermitian operators defined as for any vector |vi , hv|A|vi is
a real, non-negative numbers.
Positive definite: If hv|A|vi is strictly greater than zero for all |vi =
6 0
P
POVM: A set of {Em }, m Em = 1, p(m) = hψ|Em |ψi
Remark POVM is a simple consequence of the general measurement. The set of Em is sufficient to deter-
mine probabilriy of different outcomes m. The complete set {Em } is known as POVM. Em is the POVM
element.
7
Example
|ψ1 i = |0i
|0i + |1i
|ψ2 i = √
2
It is impossible for Bob to perform a measurement which distinguishes the states.
Consider POVM containing √
2
E1 = √ |1i h1|
1+ 2
√
2 (|0i − |1i)(h0| − |1i)
E2 = √
1+ 2 2
E3 = 1 − E1 − E2
If the outcome is m1 , the state will not be |ψ1 i since hψ1 |E1 |ψ1 i = 0. The state must be |ψ2 i.
If the outcome is m2 , the state will not be |ψ2 i since hψ2 |E2 |ψ2 i = 0. The state must be |ψ1 i.
If the outcome is m3 , however, we do not sure whether we get |ψ1 i or |ψ2 i. We get no information.
Postulate The state space of a composite physical system is the tensor product of the state space of
the compoment physical system. Moreover, if we have system numbered 1 through n, and the system
number i is prepared in the state |ψi i, then the joint state of the total system is
100 qubits 2100 ≈ 1030 memory!! Hilbert space is indeed a big place!
Example √ √ √ √
(1 ⊗ X) 0.1 |00i + 0.2 |01i + 0.3 |10i + 0.4 |11i
√ √ √ √
= 0.1 |01i + 0.2 |00i + 0.3 |11i + 0.4 |10i
The first operator 1 acts on the first qubit space and the second one X acts on the second qubit space.
Remark Through we can compute parallelly, we have to do many measurements to get the information of
the amplitute. Thus, we often use interference to left the amplitute of interest and measure it.
8
6.
A11 B A12 B ··· A1n B
A21 B A22 B ··· A2n B
Am×n ⊗ Bp×q =
.. .. .. ..
. . . .
Am1 B Am2 B ··· Amn B
mp×nq
Partial measurement
If the state of a two-qubit system is
|ψi = α0 |00i + α1 |01i + α2 |10i + α3 |11i
Measure qubit 1 in tis computational basis.
P0 ⊗ 1 = |0i h0| ⊗ 1
P1 ⊗ 1 = |1i h1| ⊗ 1
P (m = 0) = hψ|M0† M0 |ψi = hψ|M0 |ψi = hψ|P0 ⊗ 1|ψi
= (h00| α0∗ + h01| α1∗ + h10| α2∗ + h11| α3∗ )(α0 |00i + α1 |01i)
2 2
= |α0 | +|α1 |
2 2
P (m = 1) = |α2 | +|α3 |
Post-measurement state
P ⊗ 1 |ψi α0 |00i + α1 |01i α0 |0i + α1 |1i
p0 = q = |0i ⊗ q
P (m = 0) 2
α1 + α0 2 α12 + α02
Example
2 2 1
ψ= |01i + i |10i + |00i
3 3 3
Measure 1st qubit m1 = 0
2
3 |01i + 13 |00i 2 1 2 |1i + |0i
q = √ |01i + √ |00i = |0i ⊗ √
2 2
+ 1 2 5 5 5
3 3
Quantum entanglement
|00i + |11i
Bell state : |ψi = √
2
|ψi =
6 |ai |bi non − sepearable
If the state is separable:
|ψi = (α |0i + β |1i) ⊗ (γ |0i + δ |1i) = αγ |00i + βγ |10i + αδ |01i + βδ |11i
γβ = 0 or αδ = 0 ↔ αγ = 1 and βδ = 1
We describe such state being ”entagled state” since they can not be understand in terms of Alice’s and Bob’s
individual system, but rather embody come joint property of the system.
9
Schrödinger(1935): I would not call entangled one but rahter the characteristic trait of quantum mechan-
ics the one thate enforces its entire departure from classical lines of thought.
Suppose the initial system state vector is |ψ(t)i, and say, there s a second Quantum system called ancilla
system (or the meter) in an initial state |φ(t)i. So the intitial states of the combined system is :
|Ψ(t)i = |ψ(t)i ⊗ |φ(t)i = |ψ(t)i |φ(t)i
Let the two system be coupled together fo a time T1
U (T1 ) = e−iHT1 /~ H : totalHamiltonian
|Ψ(t + T1 )i = U (T1 ) |ψ(t)i |φ(t)i
X
= βm (t) |ψm (t)i |φm i
m
|φm i is the orthonomal basis, but |ψm (t)i may not orthogonal.
Now let the meter be measured projectively over a small time interval T2 and the outcome is m, the post
measurement state is
[1 ⊗ |φm i hφm |]U (T1 ) |ψ(t)i |φ(t)i Mm
|Ψm (t + T1 + T2 )i = p =√ |φm i |ψ(t)i
Pm (T2 ) Pm
• Perhaps, the most spectacular and counter-intuitive manifestation of quantum mechanics is the phe-
nonmenon of entanglement observed in composite quantum system.
• According to quantum mechanics, and unobserved particle do not posses physical properties thate
exist independent of observation (reality assumption). Rather, such physical arise as a consequence of
measurement performed upon the system.
• In early days of the development of quantum mechanics, many physicists rejected this view of Nature.
The most prominent objector was Albert Einstein.
• 1935, Albert Einstein, Nathan Rosen, Boris Podolsky proposed a thought experiment which they be-
lieved demonstrated that QM is not a complete theory of Nature ⇒ QM leads to a contradiction,
provided that we accept the following two seemingly natural assumptions (that Nature ought to obey)
(1) Reality principle: If we can predict with certainty the value of a physical quantity, then this
value has physical reality, independent of observations. e.g. thennis ball, moon, color of a chalk
(2) Locality principle: If two system are causally disconnected, the result of any measurement per-
formed one a system cannot influence the result of a measurement performed the second system.
Theory of relativity: two events taking place at space-time coordinates (x1 , t1 ), (x2 , t2 ) respectively.
The two events are disconnected if (∆x)2 > (c∆t)2 (Space-like events). That is , physical influence
cannot propagate fasten than light.
10
• 1964, John Bell formulated inequality assuming the principle of realism and locality. Since it is pos-
sible to devise situations in which QM predicts a violation of these inequalities, any experimental
observation of such a violation excludes the possibility of a local and realistic description of natural
phenomena.
Remark It turns out that Nature experimentally invalidates EPR’s points of view, while agreeing
with QM. To device Bell’s inequality, we should forget about QM for a moment, and use the classical
common sense notion of how the world works, the sort of notion EPR thought Nature ought to obey.
1. A source that is capable of repeating the experimental procedure to prepare two particle.
2. Once tha particles are prepared, one particle is sent to A(lice) and the other to B(ob).
3. The timing of the experiment is arranged so that Alice and Bob do their measurements at the
same time (or in a causally disconnected manner).
4. Alice and Bob can measure the polarization along 3 different axes a,b,c.
According to the reality principle, we may assign well defined values to the spin components along the
three axes. That is, we assume that these values have physical reality independent of our observation.
The result of the measurement of Alice and Bob are perfectly anti-correlated.
Classical intuitive example: two balls (one black, one white), a pair of gloves (one left-handed,
one right-handed)
Alice Bob
↓ ↓
white black
(L) (R)
Let P (a+ , b+ ) denote the probability that Alice obtains σaA : +1 and Bob obtains σbB : +1
N3 + N4 N2 + N3 N3 + N7
P (a+ , b+ ) = P (a+ , c+ ) = P (c+ , b+ ) =
N N N
11
N3 + N4 ≤ (N2 + N4 ) + (N3 + N7 )
⇒ P (a+ , b+ ) ≤ P (a+ , c+ ) + P (c+ , b+ ) (Bell’s inequality)
Reality: We can establish the above table.
Locality: If a pair belongs to group 1, and Alice’s choose to measure σaA , then she will certainly
obtain outcome +1, i.e. a+ , independently of the fact that Bob may choose to perform a measurement
along the axes a,b or c.
Quantum Theory
The state of one particle depends unpon the nature of the observable measured on the other particle.
1 1 1
|ψi = √ (|01i − |10i) = √ (|+i |−i − |−i |+i) = √ (|+in |−in − |−in |+in )
2 2 2
If Alice finds σaA : +1, then the state of Bob’s particle collapses to the eigenstate of |−ia ⇒ σbB with
probability hψ|Pm |ψi =a h−|+ib b h+|−ia = sin2 θ2ab ⇒ P (a+ , b+ ) = 12 sin2 θ2ab
• 1968, CHSH(Clauser, Horne, Shimony and Holt) inequality. (Example of a larger set of Bell’s
inequalities)
Reality: physical properties of PQ , PR , PS , PT have definite values Q,R,S,T which exist independent
of observation.
Locality: Timing of measurement ⇒ Causally disconnected! The measurement which Alice per-
formed cannot disturb the result of Bob’s measurement (or vice versa).
QS + RS + RT − QT = (Q + R)S + (R − Q)T = ±2
(Suppose R, Q = ±1. T hus, (R + Q)S = 0 or (R − Q)T = 0)
12
Quantum Theory
The game itself does not involved quantum mechanics, but quantum mechanics can help us win it.
Alice and Bob are placed in separate rooms and are each given a challenge bit (x and y, respectively).
The challenge bits are chosen uniformly at random, and indpendently of each other. Then Alice sends
an answer bit a back to the refree, and Bob sends back an answer bit b. Alice and Bob win the game
iff
a + b = xy mod 2
So if either x or y is 0: a and b should be equal. But if x=y=1: a and b should be different.
Alice and Bob are allowed to agree on a strategy in advance and to share random bits.
Classical Strategy
The classical strategy to maximize winning probability simply that Alice and Bob always send the
refree a=b=0 regardless of what x and y are. In this case, Alice and Bob win 75% of the time, losing
only if x and y are both 1. The Bell’s inequality, in this framework, is just the slightly-boring statement
that the maximum classical win probability in the CHSH game is 75%.
Quantum Strategy
|00i+|11i |++i+|−−i
If Alice and Bob had pre-shared Bell pair √
2
= √
2
, then there is a better strategy
π π π
| i = cos ( ) |0i + sin ( ) |0i
8 8 8
π π
|+i = cos ( ) |0i + sin ( ) |1i
4 4
π π π
|− i = cos (− ) |0i + sin (− ) |0i
8 8 8
13
The strategy:
If x = 0, Alice measure in {|0i , |1i} and if x = 1, Alice measure in {|+i , |−i}. She sets a to 0 if
she measures |0i and |+i and 1 if she measures |1i or |−i
If y = 0, Bob measure in {| π8 i , | π8 + π2 i} and if y = 1, Bob measure in {|− π8 i , |− π8 + π2 i}. He sets b to
0 if he measures | π8 i or |− π8 i and 1 if otherwise.
Let’s consider the case where Alice gets x=0 and measure |0i.
She will output a = 0, and she and Bob will win iff Bob outputs b = 0. Given that Alice measured
her qubit already, Bob’s qubit collapsed to the |0i state. First suppose y = 0, Then Bob measures the
state |0i in the | π8 i basis. He outputs b = 0 if he measure | π8 i. Thus, the probability that Bob output 0
in this case is | h π8 |0i |2 = cos2 π8 ≈ 85%. For y = 1, Bob measure in |0i in |− π8 i basis. The probabiltiy
that Bob output 0 in this case ≈ 85%
Consider the case where Alice gets x=1 and Bob gets y=1. Alice measure |−i
She will output a = 1, and she and Bob will win iff Bob outputs b = 0. Given that Alice mea-
sured her qubit already, Bob’s qubit collapsed to the |−i state. Bob measure in |−i in |− π8 i basis. The
probabiltiy that Bob output 0 in this case is still | h−| − π8 i |2 ≈ 85%
– Quantum mechanics does not allow the copying of arbitrary quantum state or no arbitrary copy-
ing by unitary transformation.
14
– It is not possible to make a copy of an arbitrary unknown quantum state.
Proof. Suppose we have a quantum machine data slot |ψi and target slot |si
Proof 1
U (|ψ1 i ⊗ |ψ1 i) = |ψ1 i ⊗ |ψ1 i
U (|ψ2 i ⊗ |ψ1 i) = |ψ2 i ⊗ |ψ2 i
U ((|ψ2 i + |ψ1 i) ⊗ |ψ1 i) = (|ψ2 i + |ψ1 i) ⊗ (|ψ2 i + |ψ1 i)
But
U ((|ψ2 i + |ψ1 i) ⊗ |ψ1 i) = U (|ψ1 i ⊗ |ψ1 i) + U (|ψ2 i ⊗ |ψ1 i) = |ψ1 i ⊗ |ψ1 i + |ψ2 i ⊗ |ψ2 i ⇔
Proof 2
U (|ψi ⊗ |si) = |ψi ⊗ |ψi
U (|φi ⊗ |si) = |φi ⊗ |φi
Take the inner product
So a cloning device can only clone states which are orthogonal to one another and therefore a general
quantum cloning device is not possible. Hence, a potential quantum machine cannot clone both
|ψi = |0i and |φi = |0i+|1i
√
2
since these states are not orthogonal.
X2 = Y 2 = Z2 = H2 = I S2 = Z T2 = S
Rotation operator
θ θ θ
Rn̂ (θ) = e−i 2 (n̂·σ) = cos ( )I + sin ( )(n̂ · σ)
2 2
Unitary single-qubit gate (Rotate qubit on Bloch’s sphere)
α β α β
!
iδ ei(δ− 2 − 2 ) cos ( γ2 ) −ei(δ− 2 + 2 ) sin ( γ2 )
U U = e Rz (α)Ry (γ)Rz (β) = α β α β
ei(δ+ 2 − 2 ) sin ( γ2 ) ei(δ+ 2 + 2 ) cos ( γ2 )
Transformation of gate
1 1 1
H X H HXH = √ (X + Z)X √ (X + Z) = (X + Z + Z + ZXZ) = Z
2 2 2
1 1 1
H Y H HY H = √ (X + Z)Y √ (X + Z) = (XY X + ZY X + XY Z + ZY Z) = −Y
2 2 2
1 1 1
H Z H HZH = √ (X + Z)Z √ (X + Z) = (XZX + X + Z + X) = X
2 2 2
15
It can be verfied from commuation and anti-commutaion relation
CN OT
Contorl bit • •
=
T arget bit X
|00i → |00i 1
0 0 0
|01i → |01i 0 1 0 0
CN OT =
0
|10i → |11i 0 0 1
|11i → |10i 0 0 1 0
|ψi • |ψi
|φi |(ψ + φ)mod2i
CNOT gate combined with Hadamard gate can transform basis state into Bell state
Thus, we can not determined |ψi. |ψi is entangled with control bit now
1
|Controli ⊗ |T argeti = √ (|00i + |11i)
2
In general, if one of input state is superposed, the output will entangle. It can be computed by matrix.
α |0i + β |1i • ?
γ |0i + r |1i ?
CZ gate (controlled-Z)
Contorl bit • Z
=
T arget bit Z •
|00i → |00i
1 0 0 0
|01i → |01i 0 1 0 0
CZ =
0
|10i → |10i 0 1 0
|11i → − |11i 0 0 0 −1
16
Relation between CNOT and CZ gate
Contorl bit • •
=
T arget bit Z H H
Contorl bit • •
=
T arget bit H Z H
Classical computation
Universal gate: NAND gate can be used to simulate the AND, OR, XOR and NOT gate, provided wires
ancilla bits and Fanout are available.
17
1961, Rolf Landauer: Only process in a computation which are irreversible are those which erase informa-
tion. Any irreversible operation in a computation is necessarily accompanied by heat dissipation into the
environment.
Erasing one bit ⇒ reducing the number of state by a factor of 2 ⇒ reduce the entropy of the computer
by kB ln 2 ⇒ the entropy of the entire universe cannot decrease ∆Scomputer = −kB ln 2 ⇒ ∆Srest ≥ kB ln 2
∆Qrest = T ∆Srest = kB T ln 2
1973, Chales Bennett, main trick to computer using only reversible circuit elements by embedding the gate
in a larger reversible gate, possibly making use of some extra ancilla bits.
1982, Ed Fredkin& Tom Toffoli showed independently the way to bulid reversible computation. By avoiding
to erase information, one creates and also must carry along a signigicant amount of redundancy.
Toffoli gate
•
•
The information processing by any classical NAND logical gate can be replaced by a Toffoli gate and the
ability to prepared and ancilla bit. Toffoli gate is universal for classical computation.
1. Single-qubit gates (arbitrary rotations two orthogonal axes) and CNOT gates (arbitrary entangling
gate)
2. A discrete set of universal operation Hadomard gate, π8 gate and CNOT gate. H & π8 gates can
be used to approximate any single qubit unitary operation to arbitrary accuracy. (+ phase gate S:
Fault-tolerant gate set. Quantum state is much more fragile than classical memory)
Fault-tolerant QC: In principle, an arbitrarily long QC can be performed reliably provided that the average
probability of error per gate is less than a certain critical value (the accuracy/error threshold, which depend-
ing on the choice of error correction code (ECC))
18
Let
γ γ α+β β−α
A = Rz (α)Ry ( ) B = Ry (− )Rz (− ) C = Rz ( )
2 2 2 2
From XY X = −Y ⇒ XRy (θ)X = Ry (−θ), thus,
γ α+β γ α+β
XBX = XRy (− )XXRz (− )X = Ry ( )Rz ( )
2 2 2 2
Thus,
AXBXC = Rz (α)Ry (γ)Rz (β)
The phase operation
!
1 0
•
0 eiδ
=
!
eiδ 0
0 eiδ
|00i → |00i
|01i → |01i
|10i → eiδ |10i
|11i → eiδ |11i
• • • •
• = • •
U V V† V
∀ U =V2
Show
|00i3 i → |00i3 i
|01i3 i → |01i3 i
|10i3 i → |10i3 i
|11i3 i → |11i U |i3 i
RHS
|00i3 i → |00i3 i → |00i3 i → |00i3 i → |00i3 i → |00i3 i
†
|01i3 i → |01i V |i3 i → |01i V |i3 i → |01i V V |i3 i → |01i3 i → |01i3 i
† †
|10i3 i → |10i3 i → |11i3 i → |11i V → |10i V |i3 i → |10i V V † |i3 i
|11i3 i → |11i V |i3 i → |10i V |i3 i → |10i V |i3 i → |11i V |i3 i → |11i V 2 |i3 i
19
• • • •
• = • •
H A A† A H
1 0
∀ A= V = HAH U = V 2 = HA2 H = HZH = X
0 −i
GHZ(Greenberg, Horne, Zeilinger) state
1
√ (|000i + |111i)
2
Transform the computational basis state to the Bell states
H •
• H
1 1 1
|00i → √ (|0i + |1i) |0i = √ (|00i + |10i) → √ (|00i + |11i) = |φ+ i
2 2 2
1 1 1
|01i → √ (|0i + |1i) |1i = √ (|01i + |11i) → √ (|01i + |10i) = |ψ + i
2 2 2
1 1 1
|10i → √ (|0i − |1i) |0i = √ (|00i − |10i) → √ (|00i − |11i) = |φ− i
2 2 2
1 1 1
|11i → √ (|0i − |1i) |1i = √ (|01i − |11i) → √ (|01i − |10i) = |ψ − i
2 2 2
|0i H • •
|0i
|0i
1 1 1
|000i → √ (|0i + |1i) |00i → √ (|00i + |11i) |0i → √ (|000i + |111i)
2 2 2
20
Application
Superdense coding
Q: Can Alice transmit 2 classical bits of information to Bob by sending him only one qubit?
Case I
If the qubit has never been contacted with the rest of the world, i.e. isolated qubit, then the answer to this
question is ”No!” |ψi = α |0i + β |1i could be tempted to say that single qubitcould store infinite amount
of information α, β. But there is a catch to extract information we must perform measurement. Infinitely
many measurements on identically prepared single-qubit states are required to obtain α and β. Not possible
to transmit more than one classical bit of information per qubit.
Case II
Superdense coding protocol enables something similar to be done. (Key: quantum entanglement)
|0i H • X i2 Z i1 • H
|0i
• Alice then sends her qubit o Bob, who is now able to perform a measurement on the pair, which reveals
the values of i1 i2
i1 i2 = 00 |φ+ i → |φ+ i → 00
i1 i2 = 01 |φ+ i → |ψ + i → 01
i1 i2 = 10 |φ+ i → |φ− i → 01
i1 i2 = 00 |φ+ i → |ψ − i → 11
Summary
Superdense coding is a remarkable procedure because Alice only even comes in contact with one qubit, yet
still manage to convey two bits of classical infotmation.
Remark It is very good example of qunatum information process in action (entanglement as a resource)
Remark Superdense coding can be viewed as a statement about the interchangibility of physical resources.
B P William et al, Phys po Lett 118,050501 (2017) ”Superdence coding overs optical fibers line with complete
Bell-State measurement” ≈ 1.665 classical bits
Quantum Teleportation
Q: Can Alice transmit any arbitrary qubit quantum state to Bob using only 2 classical bits of infomation?
1. To specify two complete numbers of a qubit state to arbitrary precisions requires infinte amount of
information
2. Alice may not know what herqubit state is
21
By using quantum entanglement, it becomes possible!
1
|ψi ⊗ |ψ + i = (α |0i + β |1i) ⊗ √ (|01i + |10i)
2
α β
= √ (|001i + |010i) + √ (|101i + |110i)
2 2
α |φ+ i + |φ− i α |ψ + i + |ψ − i β |ψ + i − |ψ − i β |φ+ i − |φ− i
=√ ( √ ) |1i + √ ( √ ) |0i + √ ( √ ) |1i + √ ( √ ) |0i
2 2 2 2 2 2 2 2
1 1 1 1
= |ψ + i (α |0i + β |1i) + |ψ − i (α |0i − β |1i) + |φ+ i (α |1i + β |0i) + |φ− i (α |1i − β |0i)
2 2 2 2
1
Alice perform a Bell basis measurement with equal probability p = 4
|ψ + i → |01i Bob I
|ψ − i → |11i Bob Z
|φ+ i → |00i Bob X
|φ− i → |10i Bob ZX
22
6. Consistent with no-cloning theorey (No arbitray copying)
So the unknown quantum state |ψi vanishes in one place and reappears in another.
Measurements can be moved from an intermediate state of a quantum circuit to the end of the circuit.
If the measurement results are used at any state of circuit to conditionally control subsequent quantum gate
, then the classically controlled operation can be replaced by conditional quantum operation.
• •
=
U U
Remark Measurement commutes with quantum gates when the qubit being measured is a control qubit.
|ψi
|ψi • H •
|ψ + i
|0i H •
|1i X Z |ψi
Remark No communication but only teleportation
Function evalution
x1
x2
.. f f (x)
.
xn−1
xn
23
In general, can make it reversible if we add own ancillary and quantum mechanically
|x1 i |x1 i
|x2 i |x2 i
.. Uf ..
. .
|xn i |xn i
|yi |y ⊕ f (x)i
Uf2 |xi |yi = Uf |xi |y ⊕ f (x)i = |xi |(y ⊕ f (x)) ⊕ f (x)i = |xi |yi
Thus, Uf2 = I ⇒ Uf−1 = Uf . Let’s show Uf is Hamiltonian matrix element in computational basis
U (x, y; x0 , y 0 ) = hx| hy| Uf |x0 i |y 0 i = hx|x0 i hy|y 0 ⊕ f (x)i = δxx0 δy,y0 ⊕f (x)
Quantum parallelism
n=1
|0i+|1i
√
2 Uf
|0i
|0i + |1i 1
Uf ( √ ⊗ |0i) = √ (Uf |0i |0i + Uf |1i |0i)
2 2
1
= √ (|0i |0 ⊕ f (0)i + |1i |0 ⊕ f (1)i)
2
1
= √ (|0i |f (0)i + |1i |f (1)i)
2
Although Uf is applied once, the output state contains informations about both f(0) and f(1); it is almost
as if we have evaluated f(x) for the two values of x simultaneously, a feature known as quantum parallelism
n=2
|0i+|1i
√
2
|0i+|1i
√
2
Uf
|0i
1 1
Uf ( √ (|00i + |01i + |10i + |11i) |0i) = √ (|00i |f (00)i + |01i |f (01)i + |10i |f (10)i + |11i |f (11)i)
2 2 22
Remark We can do the 22 calculation simultaneously!!!
|0i H
|0i H Uf
|0i
24
Thus, for n-qubit
1 X
H ⊗n |0i = √ |xi ∀x is all possible value
2n x
|0i H
|0i H
Uf
.. .. P2n−1
H . √1 |xi |f (x)i
. 2n x=0
|0i
1 X
Uf (H ⊗n |0i ⊗ |0i) = √ |xi |f (x)i
2n x
In some sense, this massive quantum parallelism enables all possible values of the function f to be evaluated
simultaneously, even though we apparently only evalute
P Uf once. However, this quantum parallelism is not
immediately useful! (∵ Measurement of the state x |x, f (x)i would give only f (x) for a single value of
x = x(i) . Of course, a classical computer can do this easily!) Quantum computer requires something more
than just quantum parallelism to be useful; It requires the ability to extract useful information
P efficiently,
e.g. extract information about more than one value of f (x) from superposition state like x |x, f (x)i
Quantum algorithm
Deutsch’s algorithm
Deutsch’s problem: Given a ”black box” computing a function f : {0, 1} → {0, 1}. Our task is to deter-
mine whether f is a constant or balanced.
Deutsch’s algorithm: Combine quantum parallelism with quantum interference to solve the problem
by using the black box function f only once.
Idea: To put information about the function f in the phase of the quantum state.
√1 (|0i + |1i)
2
|0i H
Uf
|1i H
√1 (|0i − |1i)
2
|xi |xi
|0i−|1i Uf |f (x)i−|1⊕f (x)i
√ √
2 2
|0i − |1i
If f (x) = 0 ⇒ |xi √
2 |0i − |1i f (x) |0i − |1i
⇒ |xi √ → (−1) |xi √
|1i − |0i 2 2
If f (x) = 1 ⇒ |xi √
2
|0i+|1i
√
2 Uf
|0i−|1i
√
2
|0i + |1i |0i − |1i
if f (0) = f (1) : constant ± √ √
f (0) |0i f (1) |1i |0i − |1i 2 2
(−1) √ + (−1) √ √ =
2 2 2 |0i − |1i |0i − |1i
if f (0) 6= f (1) : balanced
± √ √
2 2
25
|0i H H
Uf
|1i H
|0i − |1i
if f (0) = f (1) : constant ± |0i √
2
|0i − |1i
if f (0) 6= f (1) : balanced
± |1i √
2
So by measureing 1st qubit, we may determine a global property f (0) ⊕ f (1) using one evaluation of f (x)
⊗n
|ψ0 i = |0i |1i
X |xi |0i − |1i
|ψ1 i = √ √
x∈{0,1}n
2n 2
X (−1)f (x) |xi |0i − |1i
|ψ2 i = √ √
x
2n 2
x·z+f (x)
X X (−1) |0i − |1i
|ψ3 i = |zi √
z x
2n 2
P x1 z1 +···+xn zn
(−1)xz z1 ···zn (−1) |z1 ···zn i x·z
P
(−1)
|zi ; H ⊗n |x1 · · · xn i = ; H ⊗n |xi =
P
Remark H |xi = z=0,1
√
2
√
2n
z√
2n
|zi
f (x)
⊗n
state, the amplitute is x (−1)
P
For |zi = |0i 2n
f (x)
1. If f is constant, x (−1) = ±1 x 21n = ±1 ∵ |ψ3 i is of unit length ⇒ all other amplitudes must be
P P
2n
zero.
f (x)
2. If f is balanced. x (−1)
P
2n = 0 (positive and negative contributions cancel) ⇒ A measurement must
yield a result ohter than zero on at least one aubit in the data register qubits.
⊗n
∴ If one measures all 0’s, |0i , then the function is constant otherwise the function is balanced.
Quantum F ourier transf ormation
Quantum phase estimation algorithm H gates
Controlled − U gates
26
Quantum Fourier transform (QFT)
• One of the most useful ways of solving a problem in mathematics and computer sicence is to transform
it into some other problem for which a solution if known.
• One such transformation is the discrete Fourier transform DFT takse as input a vector of N complex
number’s x0 , x1 · · · xN −1 and then outputs the sequence to y0 , y1 · · · yN −1 defined by
N −1 N −1
1 X 1 X
yk = √ xj e2πijk/N = √ xj ω jk , ∀ω = e2πi/N
N j=0 N j=0
−1
If we let x and y be N-by-1 vectors, then y = Dx ∀Dkj = √1 ω jk
N
and x = D−1 y ∀Dkj = √1 ω −jk
N
1 1 1 1 ··· ···
1 ω ω2 ω3 ··· · · ·
1 1 ω2 ω4 ω6 ··· · · ·
D= √
N1 ω3 ω6 ω9 ··· · · ·
. .. .. .. .. ..
.. . . . . .
• QFT: is a DFT of the amplitute of a quantum state. Suppose we have the state
QFT is defined to be a linear operator with the following action on the basis state
N −1
1 X 2πijk/N
QF T (|ji) = √ e |ki
N k=0
Thus
N −1 N −1 N −1 N −1 N −1
X X 1 X X X
QF T ( xj |ji) = xj QF T (|ji) = √ xj e2πijk/N |ki = yk |ki
j=0 j=0
N j=0 k=0 k=0
Example ! ! !
√2 √3
1 1 0 1 1
|ψi = √2 |0i + √1 |1i ; D = √1 1
; |ψ i = QF T (|ψi) = 2
√ 5 = 10
5 5 2 1 e2πi/2 1 −1 √1 √1
5 10
27
jl jl+1 jm
fraction: 0.jl jl+1 · · · jm = 2 + 22 ··· + 2m−l+1
n n
2 −1 2 −1
1 X 2πijk/2n 1 X 2πij Pnl=1 kl 2n−l /2n
QF T (|ji) = √ e |ki = √ e |ki
2n k=0 2n k=0
1 1 1
1 X X X Pn −l
=√ ··· e2πij l=1 kl 2 |k1 , k2 , · · · kn i
n
2 k =0 k =0 k =0
1 2 n
1 1 1
1 X X X −l
=√ ··· ⊗nl=1 e2πijkl 2 |kl i
2n k1 =0 k2 =0 kn =0
1
1 X −l
= √ ⊗nl=1 e2πijkl 2 |kl i
2n kl =0
1 h −l
i
= √ ⊗nl=1 |0i + e2πij2 |1i
2n
1 h i
=√ (|0i + e2πi0.jn |1i) ⊗ (|0i + e2πi0.jn−1 jn |1i) · · · ⊗ (|0i + e2πi0.j1 j2 ···jn |1i)
2n
n
Remark The trick about the Fast Fourier Transform (FFT) is that it only uses the terms of e2πixy/2
that correspond to the first circle, i.e. the terms for which 2xyn < 1
|j1 i H S T
|j2 i • H S
|j3 i • • H
! ! !
1 0 1 0 1 0 1 0
S= = 2 T = = 3 ∀j1 = 0 or 1
0 i 0 e2πi/2 0 eiπ/4 0 e2πi/2
1
|j1 i → √ (|0i + e2πi0.j1 j2 j3 |1i)
2
1
|j2 i → √ (|0i + e2πi0.j2 j3 |1i)
2
1
|j3 i → √ (|0i + e2πi0.j3 |1i)
2
!
1 0
Thus, if we can construct Rk = k
0 e2πi/2
– Need swap gates at the end which reverse the order of qubits. This is the desired output from
QFT
– This construction also proves that QFT is unitary since each gate in the circuit is unitary.
– The best classical algorithm (FFT), which computes the FT using O(n2n ) gates.
– How many gates does this QFT circuit use ?
n
(1H + (n − 1) conditional rotation gates) + (1H + (n − 2)) + · · · (1H) + 2 swap gate ≈ O(n2 )
Exponential speed up !!!
– Can we use QFT to speed up the computation of FT?
Unfortunately, the answer is not positive ∵ there is no known efficient way to do the following
28
1. Amplitutes in quantum state cannot be directly accessed by quantum measurement.
2. In general,
P no known way to efficiently prepare a generic initial state to be Fourier transformed
|ψi = j xj |ji
– Thus finding use for QFT is more subtle than we might have hope.
– Quantum algorithms find a way to use QFT and extract efficiently useful information from the
quantum state.
QFT is the key to a general procedure known as QPE, and QPE is the key to many quantum algorithms
(e.g. Quantum factoring, discrete logorithm, hidden subgroup problems)
Question: Suppose U is a unitary operator with eigenvector |ui and corresponding eigenvalue e2πiφu
U |ui = e2πiφu |ui
The goal of QPE is to obtain a good estimate of φu
The second stage: Apply the inverse QFT on the 1st register
The third stage: Read out the state of the 1st register by doing a measurement in the computational basis.
29
Performance and requirement (not ideal case)
Above analysis applies to the idea case where φ can be written exactly with a t-bit binary expression. What
happens when this is not the case? ⇒ Still produces a pretty good approximation to φ with high probability.
Let b be the integer in the range 0 to 2t − 1 such that
b
= 0.b1 b2 · · · bt is the best t-bit approximation to φ which is less than φ
2t
Suppose the outcome of the final measurement is m. We aim to bound the probability of obtaining |m−b| > e,
where e is positive integer characterizing our desired tolerance to error
1
P (|m − b| > e) ≤
2(e − 1)
e = 2t−n − 1 = 2p − 1 t = n + p qubits
Thus,
1
P (|m − b| > e) ≤
2[(2p − 1) − 1]
Then, the probability of obtaining an approximation correct to this accuracy is at least
1
1 − P (|m − b| > e) = 1 − =1−
2[(2p − 1) − 1]
Thus,
1
t = n + log 2 +
2
register will give us φ̃, where u is chosen at random with probability |cu |2 . This procedure allows us to avoid
preparing a (possibly unknown) eigenstate out the cost of introducing some additional randomness into the
algorithm.
Summary
Input:
30
Procedure:
⊗t
1. |0i |ui Initial state
P2t −1
√1
2. 2t j=0 |ji |ui Create superposition
P2t −1
3. √1 e2πijφu |ji |ui Apply black box
2t j=0
Public-key cryptosystem: Alice wishes to create a public key to enable people to send her message and
a matching private key with which she can read the message.
1. She chooses two very large enough prime number p and q and compute the product N=pq.
2. She also picks at a random number e < Φ(N ) = (p − 1)(q − 1), which is co-prime to Φ(N ), i.e.
gcd(e, Φ(N )) = 1
3. She computes d such that ed = 1 mod Φ(n)
4. She publishes the pair (N, e) as her public key, so any body has access to it and use it to send her
message.
5. The pair (N, d) is kept to herself as her private key, so only Alice can decrypt the messages that were
encrypted by means of the public key.
6. Suppose Bob wants to send a string of bits to Alice
(a) Breaks the message up into blocks of length log N bits each.
(b) Regards each single block of bits as encoding a number xi , 0 < xi < N ⇒ Use the public key
(N, e) to encode xi by xei mod N
7. To decode the encrypted block, Alice raise the message to the dth power, obtaining
(xei )d mod N = xi mod N
Shor’s Algorithm
Best current method to factor a large semi-prime number on a classical computer requires
1 2
exp O(n 3 log 3 n)
Shor’s algorithm
O(n2 log n log log n)
Equivalance of factoring and order finding
Shor’s algorithm hinges on a result from number theory. The function F (a) = xa mod N is a periodic
function, where x is an integer co-prime to N.
Suppose r is the period of F (a), we know x0 mod N = 1, xr mod N = 1 and x2r mod N = 1
(
gcd(xr/2 − 1, N ) = m1
(xr − 1) mod N = 0 ⇒ (xr/2 + 1)(xr/2 − 1) = kN = km1 m2 ⇒
gcd(xr/2 + 1, N ) = m2
Thus, it is equivalent to factoring N.
31
Order finding: For positive integers x and N, x < N , with no common factors, then order x mod N is
defined to be the least positive integer r such that xr = 1 mod N
• The order finding problem is to determine the order for some specified x and N
• The order finding problem is believed to be a hard problem in a classical computer.
• Caculating xa for an exponential number of a’s would take exponential time on a classical computer.
• Shor’s algorithm utilize quantum parallelism to perform the exponential number of operations in one
step!!
Solving order-finding using QPE
xr = 1 mod N
Consider the operator
U |yi = |xy mod N i ∀y ∈ {0, 1}L , L ≈ log2 N number of bits needed to specify N
Using a procedure known as modular exponentiation with which we can implement the entire se-
quence of C − U 2 operations applied by the QPE procedure using O(L3 ) gates.
Modular exponentiation:
In order finding algorithm, we wish to compute
t−1 1 0 t−1 1 0
|zi |yi → |zi U zt 2 · · · U z2 2 U z1 2 |yi = |zi |xzt 2 · · · xz 2 2 xz 1 2 y mod N i
z z
= |zi |x y mod N i = |zi |x mod N y mod N i
Classical computation:
(a) By square and multiply, a total of (t − 1) squaring operations at a cost of O(L2 ) each. The total
cost of O(L3 ) for the 1st stage.
t−1 t−2 0
(b) xz mod N = (xzt 2 mod N )(xzt−1 2 mod N ) · · · (xz1 2 mod N ) performing t-1 modular
multiplications with a cost of O(L ) for each multiplication. The total cost of O(L3 ) for the
2
second stage.
32
|yi / |yi
Uf
|zi / |z ⊕ f (y)i
2j −2j 2j j j
|y, 0i → |y, 0 ⊕ x y mod N i → |y ⊕ x (x y mod N ), x2 y mod N i = |y ⊕ y, x2 y mod N i
j
= |0, x2 y mod N i
1 st
In performing the QPE procedure, if we use t = n + log 2 + qubits in the 1 register (e.g. n=2L+1)
2
and prepare the second register in the state |1i, it follows that for each s chosen uniformly at random
from the range 0 ≤ s ≤ r − 1, we will obtain an estimate of the phase φ ≈ rs accurate to n=2L+1 bits,
with prob at least 1r (1 − )
The continued fraction expansion: How to obtain the desire answer, r, from the result of the QPE,
φ ≈ rs ? Given that we only know φ to n=2L+1 bits, but we also know that it is a rational number. If
we could compute the nearest such fraction to φ, we might obtain r.
s
Theorem Suppose r is a rational number such that
s 1
| − φ| ≤ 2
r 2r
Then rs is a convergent of continued fraction for φ and thus can be computed in O(L3 ) operations
using the CF algorithm.
To summerize, given φ the CF algorithm efficiently produces number s0 and r0 with no common factor
0
such that rs0 = rs . The number r0 is our candidate for the order. We can check to see whether it is the
0 0
order by calculating xr mod N and seeing if the result is 1, i.e, xr mod N ?1. If so, then r0 is the
order of x mod N , and we are done.
Definition A finite simple CF is defined by
1
[a0 , a1 , a2 · · · aM ] = a0 + 1
a1 + a2 + 1
..
. + a1
M
33
2. Must be able to efficiently prepare an eigenstate |us i with a non-trivial eigenvalue or at least a super-
position of such eigenstate.
Preparing |us i directly requires that we know r, so it is impossible. Fortunately, there is a clever
observation which allows us to circumvent this problem. The observation is
r−1 r−1
1 X X
√ |us i = |1i ∵ e−2πisk/r = rδk0
r s=0 s=0
P2t −1 Pr P2t
3. → √1 |ji |xj mod N i = √1 √1 e2πisj/r |ji |us i apply Ux,N
2t j=0 2t r s=0 j=0
Pr−1
4. → √1
r
s
s=0 | r i |us i apply QF T † to the 1st register.
sm
5. → r |us i measure the 1st register.
6. → r apply CF algorithm
Let us consider
|0i / H ⊗t • QF T †
|1i / xj mod N
Performing a measurement in the computational basis to determine the bit values in the 2nd register. Suppose
the result is m where m = xa mod N
34