QGSS'20 Lectures

Download as pdf or txt
Download as pdf or txt
You are on page 1of 381

20.07.

2020

geoeffneten
Introduction to Quantum
-5--2--2 Computing -0 -

Overview :
-

I) From bit to Dirac notation measurement Bloch


qubits :
, ,
sphere
E.) Quantum circuits :
single qabit & two gabit gates multipartite quantum
basic - -

,
states

Bell states Teleportation Q


sphere
II )
Entanglement : -

.
,

I. From b its to qubits


-T-mmmmmmmnm ab

classical states for amputation eitler


" " " "
.

are O or 1

quantum mechanics state be simultane ouslg and "

superposition
" " "

in ,
a can in i. e. in 0 1
, ,


super positions
all ow to
perform calcalations on states at the some time
many

quantum algorithmus with exponentiell speed -

up

state collapses to of its states


superposition
But once we measure the ,
it one

to all states
only get superposition)
"

and not all


"

(
→ we can one answer answer in the

it is not THAT
easy to design quantum algorithms ,
but we can use interferenc effects
( other out while the
" "

cand each right


" "

wrong answer , answer remai

Diracnotation
used to describe quantum states Led b E? ( 2- dimensionat vector with enties)
. :
a.
E
complex
-
Ket :
las -

I :) irre;"!!!!!
-

bra : < bl =
Ibst :
( Y) ! (bi bi)

-
bra.net : < BIÄÖÄD ten bit azbz "
"

=L albi c- E ↳
complex number)
" "
n

) an X

)
Gbi anbei
-
Ket bra - :
Iaxb , =

( azbi aab;
↳ 2×2 matrix) -


we define the states los : =
( I) and 11 ) : =

(9) ,
which are orthogonal : < 0113=1.0+01 :O

• all quantum states are normalized ,


i. e .
.
14143=1 ,
e.
g .
14 > :
¥ .

(to > TM ) =
Ii)
Measurement
FR.
choose we orthogonal bases to describe & measure quantum states ( →
projects measurement)

state will collapse state


during a meas .
on to the basis { los ,
In } ,
the into other

to > or Its →
as those are the eigenstates of Tz ,
we all this a Z -

measurement

e.
there are
infinity many different bases ,
but other commons ones are

{ Its : :
¥ ( los ths)
,
Is :-.
fz (los -
Hs)
} and { Iti ) Jan : :
Host ih ) , 1- is :<

f. (los -

it ) } ,

corresponding to the
eigen
states of a and sry .
respectirely .

Bonn rule that state 14> collapses during to the


the
probability a
project
-

: a in meas . on

basis { 1×7 Ixt > } to the state ↳


give by
is a
,

'
KXIYY
Plx ) =
.
? Plxi) 1 :

example s: 14>
ffn Host VI 11 ) is meas in the basis { 10 ? 11 > }

-
: .
:

'

Hoss rüttelt ? III ELI


→ Plo) :
Kol Fi
°
=

} →
pa) :
}
= =
-
14 > =
¥ ( to > HD -

is measured in the basis { Its ,


I s}
-
:

?
?
→ Ptt) = 1414>1 1¥ KOHN ) -

¥ -

Ho > -

Hs) /
=

¥ IEEE hofft Etf YI ?


,
-
-

O →
expected , as AM > = o

↳ PH =
# Y? -

orthogonal

Bloch sphere :
-
e -

We can write normal ized (


pure) state 14 > =
¥ to> teils in ¥11 )
any as ios
,

where y E [ 0,2T] desaibes the relative phase and OE [9T] determines the
probability to

measure los 1115 :


pltoD-cosez.pl/eD:sin2Ez .

all normal ized states be illustrated the surface of here with radius
sp
a
can
pure on

löst -1 which all the Bloch


,
we
sphere
the coordinates of such a state are
give by the Block vector : E
:(!!!!;)
examples.im -
los : 0=0 , 9 arbitrarg
→ F :

(%) *
, o>

: : : :: : f)
"

-
-

÷
.
.

-0
Ez :(§ )
t
↳ : :
T ö
'

y
:

-

X
- It is :
O :
Ez ,
y
:
Ez →
F (Y ) : n>

I i)
- :
O :
Ez .
y
:
Ez → E-
(%)
Beck On the Bloch sphere angles twice big in Hilbert
space
: are as as
. .

e.
g.
los & les are orthogonal ,
but on the Bloch sphere their angle
is 180° .
For a
general state 14 ) : Co Ost . .
.
→ -0 is the

angle on the Bloch sphere ,


while Ez is the actaal
angle in Hilbert
space !
to the
Z measurement
-

corresponds to a
projectin on Z axis
-
and analogons ly for X& Y
!
I. Quantum Circuits
FELLNER

of bnilding blocks that out elementary compilations called gates


" "

circuit model :
sequence carry ,

ifeng.rithn.FR -

Singlegebügeltes

Classical example : NOT I -
Do -
J

quantum example s : as
quantum theory is unitary ,
quantum gates are
represen ed ! by
unitary matrices : UTU = 11 recall
:( I;)
"
Dirac notation : U
u ; = UOOIOXOI tun 10×11

( )
O 1 +4^011×01 11×11
JX 10×11 11×01 um
*
= +
-
=

1 0 Dirac notation

↳ 5×10 > =

( ! f) (G) 113 5×117 10×11 t HXOI)


114--10×1,9 thx los
'

. : = =
,

bit flip I NOT -

gate ,
e.
g.
N) -
⑦ -
Iss rotation around x
-

axis
T
by
-

Tz =
(G !) =
10×01-11×11

↳ rz.lt > =
(J ! ) # / ! ) # (1) =/ .
: -
7 ,
TH -
s: (10×01-11×11) # .

(los IN )
-

phase flip rotation around


=
¥ Kath ) =
It>
z -

axisbyu
-

sry
:
| ! Ö) : i -

Ox Oz -
bit & phase flip
% , sry & Tz are the so -
called Pauli matrices and a?
-11=1 ! !) (does
nothing)
together with
identity 11 they forma basis of 2×2 matrices

(→ any 1-
qabit rotation can be written as a linear combination of them)
-
Hadamard gate :
one of the most
important gates for quantum circuits

H
:# ( ! ! ) Ii =
( IOXOI +10×111-11×01 -

11×11)

↳ HIO> =
In / ! ! ) / ! ) -
:
# (I) : It >
,
HI 1) =
# ( loxott 10×111-11×01 -

11×111.117 :# 1107 1) =/ - -
)

creates super position ! also HITS los HH Hs :


,
: used to
charge between X dt basis

similarly as 5=1^0 ! ) adds 98 to the phase q S


,
: . Hilti ) St > =/ i) ,
-

S H -

is
applied to charge from Z to Y basis
Multipamrtitenqaantamstatesm

we use tensor products to describe

state
multiple states : las ① Ibs =

(G) (!!) ⑦ :

| !! !)

example :
system A is in 11 ? and
system B is in state 1%

the total lbipartite) state is 110>„ ß : =


11h .
⑦ 1%
=
(9) (b)⑦ =

| !)
↳ remark : states of this form are called uncorrdated ,
but there are also bipartite states that cannot

be written as 14h .
⑦ Iy >ß .
Those states are correlated and sometimes even

entangled ( very strong


→ correlation) ,
e.
g
. 14 D= # kann.at In ) =

II | !)
a so
-
called Bell state ,
used for teleportation cryptographg
.
,
Bell tests etc ,
.

IEEE gates
classical
example XOR
J III × ⑦ irreversible
Agieren the output we cannot
• -

y
:

re the
cover
input )
BUT :
as
quantum theory is
unitary ,
we
only unsicher
unitary and therefore reversible
gates
quantum example
(0 0)=100×001
• : 1 O O O

( µ,
^
* 101×01 It I 10×1^1 tl ^^ ° !
0 0 0 1
0 0 1 0

f) | ! )

CNOT 100 > : CNOT .
= : too > + CNOT
1103×4 =
111 >xy
xy y ,

infantil
circuit
Y) Iaa
:

0 1 01
10 1 1 ± reversible XOR
11 1 0

we can show that


very function f can be described by a reversible circuit

quantum circuits can


perform .
an functions that can be cakulated classic
ally
Entanglement-n-m-g-lfaparestateIYS.rs
III.

on
systems A. B cannot be written as 14h
.
to } ,
it is
entangled
Bell states
e-

There are
for so -

called Bell states that are


maximallg entaagled and build

an orthonormal basis :

14 In (1005+1115) 14017 :(101 > t )


"
> =
,
:
Ko )

IT
"

-
¥ (1003-111) ,
14
"
>
:'-( 101 > -

Ho )
write 14J > Morini ) 14
"
>
in
general we can =

gefiel

Bellstatesmpiy.FI#JlyijsIj7s- AB

initial state
ltaoxdrdlijh.rs 14J >
Iij >
n.rs

1007 (1007+1107)/52 '


(1007+1117)/2=14 "
>

HA (NOT"

1015 ( 101 > t 111>3/5 →
( 101 ) +1103)4147

1103 400 ) -
110DM ( too > -1×1%2=14^0 >

1113 (1017-1113)/1 ( 1013 HOHNE -


: 14%


opposite direction : Bell measurement
n
-2mm

ijinon.ba !!!! )::


" "
Hi .
¥:*
⑤ -
Tele portationm
.

wants to send her lunhnown ) state


µ : Alice 10ns : =
dass TßH ? to Bob .

She can only send him two classical bit


though They .
both share the

maximales entangled state 14007 =

¥ ( 100>aßt 111>AB ) .

initieoftheysteni.IO/7s
# ⑦ 14 >AB
"
=
(al 000>SAß t a 1011 > saß tß 1100> SAß ß 1111 > SAB )
+

=
ITIL ( 1007, t 111)
"
) ( a 10 >ßt ßH >B) ( > satt10 >
101 t
sa ) ⑦( al 1) ßIO ) )

+
( 100 } , -

IM a) ⑦ ( NOK ßH >B) + (1017A - -

Hossa ) ④ ( HSB
a -

ßIO )
=
f- [ 14^7*0×10 > B t
140^4*4107,3 )
14 Isa (Tz 107,3 ) ④ Tz ]
"
+ Ox t 14^3 SA
⑤ to > B )


Protocol :


-

FIETE)
""
1 . Alice performsameas .

on sort in the Bell basis


Ae"
.

.
2 She sends her Classical
- . . . .
. . .

14003 _
.
. _ . . . . . .
.
. . . . . . . .
.
. . . . . . . . . . . . _ . . . .
.
.

Bob C- ② outputs i. j to Bob

(f) T.FI I ¢ >B


.

5×0 - -
3. Bob
apples riss to his
'

gab it and gets to > !


Alice 's measurement Bob 's state 2 Alice sends 3. Bob final state
1. → .

apples → Bob 's


ij
1400 ) 10 >ß 00 11 11043
1401 ) 5×10 >ß 01 & "


14^07 Gz Icf>ß 10 Tz u

14 " S 5×410/3,3 11 Tz ?
"

Note that Alice 's ,


state collapsed during the measurement ,
so she does not

have the initial state expected


Ips anymore
This is due to the no
cloniag
-

theorem state to Bob


,
as she cannot
copy her state ,
but just send her

when desto ging her own .


Espen
Bloch illastrate the state of qubit for multiple
sphere can
only 1 ab its Q
sphere

: -

formonenqunbi the north pole presents state state le >


"
the south
"

to >
pole
"
• "
: -
re
,

- the size of the blob is


proportional to the prob of
. mea
swing the respectin
state

-
the color indicates the relative phase compared to state to>

¥ to > NEIN

ÖÖÖ: ④

000
states
"

for n
qubits ,
there are 2 basis ,
e.
g. for n =3 we have 001 .
010
.
100
011 , 101, 110
those basis
we
plot states as
eqaally distributed point on a
sphere ,
^ ^^

"
Ü
"
"
the
"

north the south and all other states


"
with "

pole aligned
on
pole ,
1 on

parallel st the each latitade anstand and increasing from North South
"

of 1 's to
'

on s
,
. number on is

Eagle for y :3 :

size & color 0
f the blobs as before
000>

vii. no )
es '

Fill ""
:
""> +

*.
i.
gßE-_NT]
Eigentum!gerithmslf
21.07.2020

Oranien
I) Deutsch Jozsa -

algorithmen : Oracles , DJ theory implementation ,


with Qiskit

II. ) Grover 's algorithmen : Grover


theory amplitude amplification implementation with Qiskit
, ,

I. Deutsch Jozsa
algorithmentheorie -

nennen =n .

Orontes .

have oracle device that cannot lookinside ,



assume we access to an
,
e.
g. a
physica we

to which and which returns


we can
pass queries answers

goal determine
:
some property of the oracle
asing the minimal number of que
ries

"

on a classical computer ,
such an Oracle is
give by a fct f :{0,13
.

{0,15

the oracle meist be reversible


5%9 Etting

°" a
quantum computer ,
:

bit Oracle
IIII!! }
be
unitary which performs
0g : can seea as a

J
,

I the
µ map Oglxsly > =
Ixslytoflx) >


for f : { 0,13
"
→ { 0,13 we can contract Ug :
,

Fängt "
"

ancilla-
qubit

In
{ Jz
WHO ) Hs) Ixsly > if fix) :O
# ( Ix )
-
=

Of ↳ Ig > 10 ④flx ) > Ix> 11 ⑦ µ >


,
=
> - :

IM UN los)
Ixslg ) ifflx) 1
-
= =
-
,

f)
"
=
1×31 )
y

indep of Ig > Ug phase oracle which performs the map Uglxs


'#
.
:
, =L 1) f
-

Ix >
Hadamard
Tur m
on in
qubits
_
.

-
recall that It to> =
Its =

# Hatte>) ,
HH ) : ts
¥40 > -

)
k

f- Ä To > + HI
"

#
"

113)
for x E { 0,1} : Ixs -

THI -

Igs
=
( to > t
f- e) 4) =

¥ -

""
=
¥ Ego "
EN l k>
.
inner product
"

for '

HÄM
HD

{
{ 0,13 Ixo>

!!)
µ
x c- : -

"


"
"→
:
's - " " =

# E.„
lxn.is -
TH -

↳ ever
ylyis is eitler It > or ↳

Igs must be a
superposition of all possible
1×3=101 > bit
"
e.
g .
: 2
strings

J lys
'
% :
It> ⑤ I -
> =
Elias -
101 > tho> -

Hes)

Fur
Deutsch Jozsa algorithmen
-

g- -

function f :{0,1J
"
We
give a { 0,1J realized by oracle of which

are →
,
an ,

we know that it iseither con stand Hall inputs map to


the some
output) or

balanced ( inputs that map to and 1 equal)


' ' '

# O '
is

Goal : Determine whether f is anstand or balanced

'

Classical :
we need to ask the oracle at least twice but if we
get twice the ,
some

Output ,
we need to ask again .
. .
.

at most It 1=2^71
"

queries ,
n : # input bits ,
N 2
> : # realizable bit strings
"
demonstrative different to Throw the fair
example : 2 ways a coin → is coin ?

quantumsolution.im needs
only one
query !
"
÷:
"

"

° 1
2
14 )

Clair If the : out come


yequals the bitstring 00in ,
then fis con stand ,
otherwise it is balanced
Pre! Lotus check the state after every step :

"

14 > = 100 07 = 10 ) oo
;
- o

Mi
. .
.

X. Yo

IY > =3 ¥!
"
H '"
>
? ""
e =
.

",
n
"
.

!! „¥ ! "" 4. Ix> # ?"" HIN In


"
' " " "s " =
'
.

Elf ! ! }! ÄK
"

¥
""
# E.
" "

Mir H -
-

Mas =
H -
H Ixs = >
"„
"
"" "
=

! [ II.go.y.nl 1) -

Jlk > ; !" c. In =

""
-
= :
Ck

probability to measure the zero -

string too -07


.
.
:

OIÄ .EE/klf=koo....l2
"

Plug oo . . . oo . .
-014371 ! !! nen
1 h:
{
= ,
00
. . .
0

'

.gg !!!
orthogonal)
=/ In EN) ! {
1
O
.

-
.
if f balanced

{
"

=
+2
"
, if f) EO
2
if flxl Et
-

°
,
if flxl balanced PTT
II-rbafgorith.mn
g- U n - Umm

rother : find
elements
" " ×
.

algorithmöearching an unsorted database with N:2 in OCVÜ) time s .

t.gl#=1

classical
alg . needs on
average Nz = OCN) time

folx) :{1Qifdse
"

find w ff) :{ fg ife ;


""
oracle

goal :
,
gieren an
Ug with
f :
{ 0,13 → {0,13 , ,

F , ,

oracle Uflxs 1) MEIN


phase
:

Ug
105%105*1×3
Ich → Iws
Ug
: -
:
.

Vxtw 1×7 1×3 K¥00



1 ×> → -
.

GETEILT :
:
↳ Ug : 1- 2 IWXWI ↳
Ugo 210×010 =
"
-
11
DH : It

:*
107 -
=

."
:
:

:-.
Ist
repeat r times

Clair y
= w ( with high prob ) .

:# ¥,
"

Proof; Led usdefine uniform superposition state


"
the Is ) : > H 107
! xs
"
⑦"
Hot 210×05 !
" "
and V :=
H
"
-

Ugo .

H = .
H -
Hot! H "
= 21 SXSI - 11

"

Grover 's algorithm carrie s out the


operation ( V.
Ug ) on the state Is) .

Get I be the plane spanned by Iss and Iws and Kt lat ) be the state

orthogonal to ↳ in E :
Int) : =

¥77,1 ×>

VII Iwt
ftp./ws--:cosEIwtstsinEzIwsdefineO-s.t.sinzE:Izn-
Is > = > t

protocol :

0=2
arcsinfznn
- -

1.) Prepare Is >

Ä
tun [ " s>
2.) Apply Ug -11 -
21WXwl →
reflection at lat>

±:):::c: : :.ie?::::::.
" "

after r
applications of 2.) & 3.) the state , is
oH:→ Ups>
rotatedbyr.O-nea.ge
E EVT ( ru)

chooser.si .
rot ! E r
-
-

¥ E -

ü
=
I -

after r calls to the oracle ,


the final meas .
will result in state Iw> with min .

probability
plus ) > 1- sin ! =
1- ¥ µ
:
'Ä µ. ) n
Amplitude amplification
nun zum -
c-

The general idea behind Grover 's algorithmen is


amplitude amplification .
Let as have

a Cook at the amplitude at each


step in Grover 's
algorithmen :

1.) Is > : = H
⑦ "

10)
"
2.) Ug Is > = (1- 21wxwl) Is ) →
flip amplitude of ↳
amplitude amplitude

÷ -

I-E.in
EF I :p i
-

: :
-
-

.
¥: *
I-E.it
:

;] ¥ ;
-

:
-
-

÷ ü:{i :

t.vn
± -

3.) V. Ug Is > =L Ists I 1) Ug Iss


.
- - -

reflect amplitude about the
average amplitude
amplitude f- for VI 4>
14 > ÷

? Iis
yidds :

|
as
Ip (
di
3- E) •

|
KIND a) 145.2 E ! lj ) 7. <ht ? a- Ii)
? li>

¥:-, ¥
-

a:
- - . -

""
"
- - - -

g.
-

III. ¥ =

z.EE g. los ? .in .


-

,
.
=3.se is

by reporting step 2.) & 3.) ,


the
amplitude of
reflection of dj
average <
Gad tüten !! % .

=
ca>
SHIN
-

↳ will increase furth er


amplitude amplification !

Multiple marhed elements


-
-
-

When we have M marhed elements wi ,


we
define the mining state as

Iws Er ?! Iwie →
tut > IFF ¥ '

.. .. . . "
' "

Iss =

VIII. tut > t


FIT .
Iw > = :
cos E tut > + sin ! Iw >


sin ¥ VII =
angle becomes
lager !
r =

4.at#rmjy-E--O(VN-T)
→ we can see this
speed up also when
looking at the amplitude :

1.) 2.)


TÄTE Ä "
" " ":

§ §
lo ) h ) Iwie Iwz) IN-19
"

IÄÄ
¥
in

µ
-

;
goes faster
"

:÷i
ShorbAlgorithmiandQPEd
Lecture3

Roadway G Qubits Quantum states


b ft H Y
H
Elif x
lo
147 alo tbh
Lol 47 a
j 4147 b j
Bob measo Halt Rob me as 1 Hbk

all't Hbk I 2 implications

l Operations quantum stales need to preserve


on norm to 1
t
Norm preserving matrices unitary U U
Utu au EI
det u I I
unitary
2 For a single qubit can think of gates as rotations on the
surface of the Bloch sphere
3 Eigenvalues and eigenvectors of unitary matrices are special
Ca U la Has
Salut Laila
Sulu I Latitude Cal XIX.la 1 12 calx 1 12
1 12 1 XE e for some 0
eigenvalues of U are of the form e
b U Ix tsetse tatty then
if
U
ly Ay ly saly calutuly XyLady
txt Xy Lady l titty 0
agrees of diff edguals multiplybyXx exly
are orthonormal and use 1 121 Lady Xx Xy O
Also covered Deutsch Josza algorithm
constant 1balanced function in one shot
Grover's algorithm

unstructured search in N items with 0 rn

Today Preliminaries for Shor's algorithm


famous algorithm

Problem
given a function that is periodic find its period period
for la k kf
strict definition f fly sety iff
se
y
np
21T
easy example

hard example 5

µwh g

classically 0 exp 43
c n 13µg a
P has n bits
quantum Shor's algorithm 0 n'Clog n loglog n
little faster than 0hr3
Reason why this works 1 quantum Fouriertransform
2 modular exponentiation
Implication difficulty of factoring on a classical computer is basis
for security more tomorrow
f m

Today Quantum Fourier Transform


Quantum Phase Estimatoon
shores algorithm is really QPE in disguise

QFT is effectively a change of basis from the computational


basis to a Fourier basis
1 qubit states in computational basis are 10 and 117
eg
States in Fourier basis are H7 and I 7

lot ID

ta
lo 107

105 IT

117 117

multiple qubits go to Qishit demo


notice that bases on thetwo poles of the
going from
we are

Block sphere to a basis on the equatorial plane


Building the quantum circuit that applies QFT
1 Show QFT rigorously
2 show circuit to implement QFT expression

l m qubits 2 basis states Define N 2 Then

IT QFT be
p t
Fourierbasis computational basis
N I
zitisey
analogous to inverse discrete
Z ENT y Fourier transform
y o

eg 1 qubit case N 2

To
ta My ta IZ Y
lo HD

it in El n
lo C D 117

107 117

A note on notation formultiple qubits eg n 3

eatin8 231y y
IIe 11 of
gy o eg ly I't
4 22 l t 2 lo t 20 o
4
23 2417
12403 12
0323
N I Y Cycyrys Yun
Tse 210ft 2n y
tip foe
12 Yu
1
y

oe.TT
imi hiyn

shy
e4 IYu
Yuya ynk

fro e
i i
in
eating
go g
TIE
k 4 term to my
62 term to t Iti F ly
notice i D foe Nz Az An

ye 0 MHz kn l
2
OOH Uz Rn 2
Hq
Final
form't lost e EH lo e h

lost eat Eun y


Fatah se to
Example
n 3 qubits N 23 8

be 157
QFT la lost e EH lo e Em
eatiEhs
do
Notice 2mi E 2Ti
E tf
21T 21
z
since e2TiZ
1 forany integer Z
Tilt
e2Ti I 2
2
eati eti I
in eminently

Ez eatin'Enly
0
9 n k
Let's write y Yk2 y Yi Yn
zn y 2 yw
u
then y Yh 2k and we have
gn
n

ta 1µg
eat Emily ya yn
Yeo
n 21T t 12h

If II ly.y
e yn

remember
o j
to
127 1 to I Tn lost b
if
lo EI In

Notice that we went from


Isen to
be se I see
1st lo te 2H lo te 22HD lo te T1
TheQuantamCiraitthatimplementsQFTI
Notice that we went from
Ise I see Ise Ian to
1st lo te 2H lo te 24iD lo te T1
42k
each qubit went from Izzy to Io IT
aIions lyy.TW2Tifz Zzt tEJ
G lot contains terms like 2 e 11111 11117

Is e E E e

e too to Hints
phase is qubit dependent
e2TiH2t l lo oo needto add up more components with
1more 1

Two ingredients needed


107 117 he
D H1 seu E
4 k
lo 117 rz
Oort
toy e'time 117 r2
2lTiIk
E 2

G UROTulsej e lap
WROTE to 2k
211424
f
applies phase e
THI DURAI ITURot URoTn
i

tii

step 0 Ise uz seu


n
step 1 lo e 117 bez an

to e'Time seipp I
steps
i
step 3 lo t e e me Mµy
n
im
c
step n lost e e ly

1
exp
Ii
Fat KINI
t
My
recall se 2 se 2 2kt t I nu
t
age Zen
term above is 21T
exp if
after step ni lost e 711 being sen

reverted
order fromderivedform but ok otherwise
Part II Quantum Phase Estimation

Here we will use QFT to do a


very
useful thing

Problem Recall that a unitary matrix has eigenvalues of the


form ei0 and that it has eigenvectors thatform an
orthonormal basis

U ly ei04147
Can we extract 04 given the ability to prepare 147

Solution Yes Use QPE


Why do we care Hamiltonian evolution operator is unitary
implications for q simulation

QPE trick i controlled U


I g f l

107 i Dt t.TT
F
c
c q l

I
THX Duet 1
c
o I
2 3

step o to 147
step 1 107147 117147
t
step 2 lo 147 t 117 e04147
04 Go ID 143
step 3 f 107 1 117 47 t e

I to Hei 04 t H l e
4
147

measure qubit O

prob µte Y measure


almost 12 each but
I 1 with small shift
prob ez 12 measure

if 04 0 prob o cos z4
prob I sin Et
To measure precisely using this bit of
information need to do
lots of measurements
155
04 10 Pablo Prob D 09999,7 615
eg
04 100 n 0.9924 O 007596

not a good idea to to with


such low precision
try measure

Beller solution use multiple qubits to measure the phase

TF
i

he I ITEEFI 7u
2
step 0 1050 147
0
step I lo t 1177 147
GET
Before proceeding note 212 147 UE U 147

wite 04147
42
e 147
I E
step z lo tei I co Eat Ip
2g
D t e y
Us app
n
127 lo I In lost b
iz
lo e In

the form is the same but 04 at


02 so do inverse QFT

he
iF

T
TTT
ITEEFI Fug Tue
24
Measurement should yield
10
Lecture 4 shores Algorithm II Factoring to period finding
Abe Asfaw
Quickreviey
Yesterday covered QFT and QPE
G QFT basis change from computational basisto Fourier basis

one qubit QFT is


simply A gate

computational Fourier basis


basis O
107 It
I
It
go from two poles of Block sphere to equatorial plane

quick demo
circuit implementation

1
wrote
Expezia
o

target
fine control

CROI 11 x e l1xj7
Eder ofqubits Hln 7
lo7tg
Form of QFT n qubits NE 2 Ise 124 sen

QFT Ise L
in
lo te Tp
x oxz sen
lo t e 117 se ooses and
o Iii sea Coo osei
212thse

lo t e 117 toe
from H gate
fromoUR0Tn fromUROTz
Circuit implements o o

Ise lost exp


xn
13
xn it
2tztixr.tn xJlD

Recall se Ge uz seu

2 x 2 Zzz1 Inn
Ise lost exp 22in a 117
frompUROTny four H gate
9
lazy lost expf sent
fifteen it 12 sea ID

to
define se 0K22g Rn

2n o 12 2221 Isen
then above is se and we have
j
d
Iaa lost exp 2I 117
i
z In
se
Isen to exp
000 Own
2 Quantum Phase Estimation

Objective given a unotary U and its eigenstateEigenvector 14,7


U 147 e 04147
can we find 0 4 Assume prepare147
can

Phase estimation allows us to convert phase information into


amplitudes that we can measure

QPE protocol
E'T 0147 2h0 where
given UI QPE gives
n is the number of qubits used to estimate O

n
youI lo'T
T.i
1 THE 1
EEEnys.no

U lol
4
Etiology to this point
up
have QFT in input
subtleties i notice the zito register
in the QPE protocol

2 notice that we are doing QFTt not QFT


need to carefully build Recall
ABC d BtAt
3 yesterday's lab solution i used U X gale in
Qiskit and did QPE to find X
cath
Qishit textbook shorts algo
see
chapter for QFT 1 implementation
4 referenceQuantum counting
ShorisAlgorithull
Problem already discussed that factorong a number
N pq
where
poq are prime and large is classically difficult
OCexpfc.nl3 lognJ43 using
best known methods

2 Quick primer on modular arithmetic

b 3 quotient 1 355
3
remainder 2 2

5 2 mod 3

x I 2 3 4 5 6 7 8 9
2e I 2 0 I 2 0 I 2 0 mod 3

notice see 0 mod 3 x is a multiple 3


of
see 1 mod 3 se is 1 1 some multipleof 3

generally
y mod _3kt
y for some KEZ
2e 3 se

also notice the periodicity of modular arithmetic


se modN means
yE o l 2 N
y
eg mod 3 1,2
se
y means
YE 0
2 Solution
gcdCa N L
begin algorithm
CD pick a coprime with N pq
if unsure checkquickly if coprime
2 find the r of the function a mod N
order
smallest r such that are 1 mod N
3 if r is even

a Ark mod N

if sett 0 mod N then

p g gcd att N gcd a t N

else find another a

3 Concrete example factoring 15


15 1111 4 bits
coprime pick a 13
see 0 I 2 3 4 5 7
6
13 mod 15 1 13 4 7 1 13 4 7
Smallest r o s t 1311cmod 15 is n 4
or 4
given
se E 134k mod 15 4 mod 15

sett 5 0 mod 15

4 I att 3 5
p g
4 Quantum circuit for factoring 15 subtleties later for now
I I I follow aloyg
g
1M l
I t

t
DH QTT l I
i
1 I e I i
1 c l i l
w p
1
10504 T f T i

To l iz f3 4 s 5

be Iw be lwtofa.CH
04107
04
fan Cx a Cmod N
step 0 107
iz z
04
step 1 H 410504 103

102,1 1174 1274 1 t 115,2 1074

step 2 1074 00130 mod15 t 112100131 mod15


I
t

O 2 Z we have
Ya 11741137g t 1274142 t 1374177g
I 102411 t

1441174 t 15741137g t 1674142 t 1774177g

1841174 t 19741137g t 110741474 t 11174177g

1124112 t 113741137g t 114741474 t 115741774


step 3 after measuring register let's say we measured 7
a

1374 t tha t 11174 11574701774


note the normalization
step 4 apply QFT on the.se register

Recall N I 2
ay
1
QFT Ise 127
if 2 e ly
g op 2
QFT Ee In
M
ly
foe
2
QFT 132 Eno e 34
y
38
IT y0
e ly

H
QFT'T 7 a
I IIE ly
Y
QFT 111 a Ezo e ly
5
t
QFT 115 a ta of ly

QFT Ise f Ezo expti y exp fi g texpfi Igy


exp f i's y ly
show computer demo

4 i 1474 4184 4 i 1127g


f a
4104 t

step 5 measure the foe register get 107 on 147 or 187 or 1127
with equalprobability of 14
Analyze measured result i meas results peak near
j Nyforsomejez
10 is trivial If we measure 103 restart X
147 j kn 4 r 4 if j L r 4 is even good
42 2
mod 15 4
see a mod N 13
5
set I j g od C sett N 5
se I 3 j g od se l N 3

18 8 r 2 and j I 4 and
j 16g or r
j 2
d
works like above
131 mod 15 2
set 1 3 3
ged Catt
N
se i I
J
1 partial
god se l N

4 and 3 works like above


1127 j 16g 12 f j

Looks like 3 4 results work and we are able to extract thefactors


successfully

demo of Vandersypen Steffen et al paper


showing how to factor 15 on a quantumcomputer

caveats need 2in qubits at the input register for Ise


instead of just n
with probability will be and
Iz r even

ark 11 to modN
How to implement
Ufa n

Recall famCse at mod N

se ER Jez Rn 2 be 2 Zzz t 20seu

fa n se A mod N
be 12 best 25hm
q2 mod N
22 a2
af Ma2 mod N

se ooo

Jez

Nu
n 2
m

91 at a'and
o o

depth is polynomial
in n

9
can see Shor's algo is QPE in disguise

Also see Qiskit textbook chapter for an exampleof modular

exponentiation implemented in Qiskit


Introduction to Quantum Error Correction
James R. Wootton
Qubit Wrangler

IBM Quantum / © 2020 IBM Corporation


Why do we need QEC?
– Superconducting qubits don’t work exactly the way
they should

• Each gate is slightly wrong

• Qubits get poked by (small) external forces

• Measurements sometimes lie

– The same is true for spin qubits, topological qubits,


photonic qubits, …

– Any qubit made out of a real-life physical system will be


at least a little bit rubbish

IBM Quantum / © 2020 IBM Corporation 2


Why do we need QEC?
– But algorithms like Shor, Grover, etc assume that qubits
are perfect

– Run them with imperfect physical qubits, and you’ll get


nonsense out

– Instead we need qubits that are flawless incarnations of


the idea of quantum information

– Such ideal qubits are called logical qubits

– We need to somehow make perfect logical qubits out of noisy physical qubits

IBM Quantum / © 2020 IBM Corporation 3


Why do we need QEC?
– QEC is how we do this!

– Typically, many physical qubits are needed per logical qubit

– Using QEC in algorithms is therefore a long-term goal

– As are the algorithms that require it

– In the near term, we’ll try to make do and mitigate

IBM Quantum / © 2020 IBM Corporation 4


In this lecture
– We’ll look at the ideas behind error correction (classical and quantum)

– We’ll go through specific examples

• Repetition code

• Surface code

– We’ll see the most important techniques

• Syndrome measurements

• Decoding

• Logical operations

IBM Quantum / © 2020 IBM Corporation 5


What is Error Correction?

– Before we explain quantum error correction, we


should think about the general idea

– A simple example: you are talking on the phone, and


need to answer a question with ‘yes’ or ‘no’.

– Two important things to consider:

• How likely is it that you will be misheard?

p = probability that ‘no’ sounds like ‘yes’, etc

• How much do you care about being misunderstood?

Pa = maximum acceptable error probability

IBM Quantum / © 2020 IBM Corporation 6


What is Error Correction?

– Usually 𝑝 ≪ 𝑃𝑎 , so we don’t need to worry.

– But what if we are being asked life-or-death


questions over a noisy line?

– How can we make sure we are understood?

IBM Quantum / © 2020 IBM Corporation 7


The Repetition Code

– We could repeat ourselves.

– With a lot of ‘no’s, it’s obvious we mean ‘no’.

– Same for mostly ‘no’s with a few random ‘yes’s


thrown in.

– With this encoding of our message, it has become


tolerant to small faults

IBM Quantum / © 2020 IBM Corporation 8


The Repetition Code

– The receiver will need to decode the message.

– A sensible option is majority voting.

– A misunderstanding only happens when the majority of


copies are flipped

– For d repetitions
𝑑/2 𝑑/2
𝑑 𝑛 𝑝
𝑃= ෍ 𝑝 (1 − 𝑝)𝑑−𝑛 ~
𝑛 (1 − 𝑝)
𝑛=0

– P decays exponentially with d

– With enough repetitions, we can make P as small as we like

IBM Quantum / © 2020 IBM Corporation 9


Encoding and Decoding

– This example contained all the basic features of


any protocol for quantum error correction.

• Input: Some information to protect.

• Encoding: Transform the information to make it


easier to protect.

• Errors: Random perturbations of the encoded


message.

• Decoding: Trying to deduce the input from the


perturbed message

IBM Quantum / © 2020 IBM Corporation 10


Computation

– The example we just considered was one of communication, with errors occurring during transmission.

– For computation, errors are introduced whenever we perform an operation.

– We need to keep corrected errors as they are introduced.

– Can be done by constantly decoding and re-encoding

IBM Quantum / © 2020 IBM Corporation 11


Computation

– For example, here’s a single bit using the Repetition code

– The ‘noisy operation’ here is just doing nothing (with some errors)

– Here we don’t completely decode and re-encode, but just do it enough to find and fix the errors.

IBM Quantum / © 2020 IBM Corporation 12


Quantum Computation

– This method works great for bits, but not for qubits

– Suppose we wanted to encode some superposition state


𝑎 0ۧ + 𝑏 1ۧ → 𝑎 000ۧ + 𝑏 111ۧ

– Decoding requires measurement, and that destroys the superposition.

– To protect against one bad thing, we caused another!

IBM Quantum / © 2020 IBM Corporation 13


Quantum Computation

– To solve this, we need to be more careful with our measurements.

– We do need to measure, to get information about errors. But we must avoid learning
about the encoded information

– For this, note that we don’t actually need the bit values. We only need to know which
ones have a different value to the rest.

IBM Quantum / © 2020 IBM Corporation 14


Quantum Repetition Code
– Can be done with some extra qubits: one for each pair of code qubits.

– They are are initialized in state |0ۧ, and are used as the target for two CX gates

– The net effect is to measure the observable 𝑍𝑗 𝑍𝑗+1 : the Z basis parity of the two qubits

– In short: whether they are the same or different

cx 00ۧ = 00ۧ
cx 01ۧ = 00ۧ
cx 10ۧ = 11ۧ
cx 11ۧ = 10ۧ

IBM Quantum / © 2020 IBM Corporation 15


IBM Quantum / © 2020 IBM Corporation 16
IBM Quantum / © 2020 IBM Corporation 17
Quantum Repetition Code
– The parity measurements are repeated over the course of the computation

– The results are used to identify where errors likely occurred and how to remove their effects

– This is done by means of a classical algorithm: a decoding algorithm

– With this we can protect against bit flip errors


for an arbitrarily long time

IBM Quantum / © 2020 IBM Corporation 18


Syndrome Measurement
– This measurement is a syndrome measurement

– The result is known as the syndrome

– All codes have them

– They are ways to check that all the qubits


are doing what they should be

– Their form changes from code to code,


but their job is always the same

– They provide the clues that allow us


to detect and correct errors

IBM Quantum / © 2020 IBM Corporation 19


Decoding
– Start with an unrealistically simple case: errors between parity measurements only (not during)

– Focus on identifying errors for now (not correcting)

– Look for changes between rounds

– Errors create pairs of ‘defects’. Majority voting can be used to find a minimal pairing.

IBM Quantum / © 2020 IBM Corporation 20


Decoding
– Next, a simple model of noise in the measurements: they randomly lie

– Again, look for changes between rounds

– Bit flips create defects with space-like separation, measurement errors with time-like

– Pairing is now a 2D problem, majority voting won’t work

IBM Quantum / © 2020 IBM Corporation 21


Decoding
– There are many ways to do this, all with pros and cons

– One of the best is to think of the problem as a graph

• Defects are nodes

• The number of errors required to link them are weighted edges

– A likely set of errors corresponds to the ‘minimum weight perfect matching’ of the graph

– Efficiently computable using the ‘Blossom’ algorithm

IBM Quantum / © 2020 IBM Corporation 22


Decoding
– Here it is in action for a portion of the example from earlier

IBM Quantum / © 2020 IBM Corporation 23


Logical Operations
– If we wanted to manipulate the logical qubit, how could we do it?

– This requires a logical operation, made up of many


physical operations

– The logical X gate is easy for the repetition code

• do physical X gates on code qubits

• Code corrects imperfections

– An Rx gate essentially needs you to take the


code apart and put it back together again

• Not protected while unencoded


𝑅𝑥 2𝜃 0ۧ = cos 𝜃 0ۧ + sin 𝜃|1ۧ

→ cos 𝜃 |000ۧ + sin 𝜃|111ۧ


IBM Quantum / © 2020 IBM Corporation 24
IBM Quantum / © 2020 IBM Corporation 25
Quantum Repetition Code
– The limited set of fault-tolerant logical gates is a major
problem with the repetition code

– But it is not the only one!

– The code only allows us to detect and correct bit fips, and
only bit flips

– Though we made sure that it doesn’t cause superpositions


to collapse, it doesn’t protect them either

– The repetition code is a good first example of quantum error correction,


but it cannot give us fault-tolerant quantum computation

IBM Quantum / © 2020 IBM Corporation 26


IBM Quantum / © 2020 IBM Corporation 27
Towards a good quantum code
– The problem with the repetition code is that it treats z basis states very different to x and y basis states

– Example 1: z basis states are product states, the others are entangled

|0ۧ → |000ۧ
1 1
|+ۧ = (|0ۧ + 1ۧ → (|000ۧ + |111ۧ)
2 2

– Example 2: Distinguishing encoded z basis requires a single qubit measurement, distinguishing x basis
states requires d

– Example 3: Flipping between z basis states requires d gates, but the x basis only takes one

|0ۧ → |1ۧ ∶ 𝑋0 𝑋1 𝑋2 |000ۧ = |111ۧ


1 1
|+ۧ → |−ۧ ∶ 𝑍𝑗 (|000ۧ + 111ۧ = (|000ۧ − |111ۧ)
2 2

– It is not good when things are too easy, because they are easy for errors too!

IBM Quantum / © 2020 IBM Corporation 28


The Surface Code
– Quantum error correcting codes are defined by the measurements we make

– Let’s move beyond the simple 𝑍𝑗 𝑍𝑗+1 of the repetition code

– In the surface code we use a 2D lattice of code qubits, and define observables for plaquettes and vertices

IBM Quantum / © 2020 IBM Corporation 29


IBM Quantum / © 2020 IBM Corporation 30
Plaquette Syndrome
– First let’s focus on the plaquette syndrome

– These are similar to the two qubit measurements in the repetition code

– Instead we measure the parity around plaquettes in the lattice

– Can again be done with CX gates and an extra qubit

IBM Quantum / © 2020 IBM Corporation 31


IBM Quantum / © 2020 IBM Corporation 32
IBM Quantum / © 2020 IBM Corporation 33
Plaquette Syndrome
– We can define a classical code (storing only a bit) based on the plaquette syndrome alone

– Valid states are those with trivial outcome for all plaquette syndrome measurements:
Even parity on all plaquettes

– How to store a 0 in this?

– How about the state where every code qubit is |0ۧ?

IBM Quantum / © 2020 IBM Corporation 34


Plaquette Syndrome
– We can define a classical code (storing only a bit) based on the plaquette syndrome alone

– Valid states are those with trivial outcome for all plaquette syndrome measurements:
Even parity on all plaquettes

– How to store a 0 in this?

– How about the state where every code qubit is |0ۧ?

IBM Quantum / © 2020 IBM Corporation 35


Plaquette Syndrome
– We can define a classical code (storing only a bit) based on the plaquette syndrome alone

– Valid states are those with trivial outcome for all plaquette syndrome measurements:
Even parity on all plaquettes

– How to store a 0 in this?

– How about the state where every code qubit is |0ۧ?

IBM Quantum / © 2020 IBM Corporation 36


Plaquette Syndrome
– There are ‘nearby’ states that also have even parity on all plaquettes

– These can’t be a different encoded state: they are only a few bit flips away from our encoded 0 state

– We’ll treat them as alternative ways to store a 0

IBM Quantum / © 2020 IBM Corporation 37


Plaquette Syndrome
– Given any state for an encoded 0

• Pick a vertex

• Apply bit flips around that vertex

– Now you have another valid state for 0

– This generates an exponentially large family

IBM Quantum / © 2020 IBM Corporation 38


Plaquette Syndrome
– The states in this family can be very different

– But they all share a common feature

• Any line from top to bottom (passing along edges) has even parity

– This is how we can identify an encoded 0

– And it gives us a clue about how to encode a 1

IBM Quantum / © 2020 IBM Corporation 39


Plaquette Syndrome
– For our basic encoded 1, we use a bunch of 0s with a line from left to right (passing through plaquettes)

– This also spawns an exponentially large family

– All have odd parity for a line from top to bottom

– Unlike the repetition code, distinguishing encoded 0 and 1 requires some effort (which is good!)

IBM Quantum / © 2020 IBM Corporation 40


Logical X and Z
– Distinguishing 0 and 1 corresponds to measuring Z on the physical qubit

– The following observables detect what we need

– Or the same on any line from top to bottom

– Uses the edges has a nice advantage: we can think of them as large (unenforced) plaquettes

IBM Quantum / © 2020 IBM Corporation 41


Logical X and Z
– To flip between 0 and 1, we can flip a line of qubits

– Such lines of flips act as an X on the logical qubit

IBM Quantum / © 2020 IBM Corporation 42


Effects of Errors
– Applying an X to any code qubit changes
the parity of its two plaquettes

– An isolated X creates a pair of defects

– Further Xs can be move a defect, or


annihilate pairs of them

– A logical X requires many errors to stretch


across the lattice

– With the plaquette operators, we can


encode and protect a bit
IBM Quantum / © 2020 IBM Corporation 43
IBM Quantum / © 2020 IBM Corporation 44
Vertex Syndrome
– Now forget the plaquettes and focus on vertices

– These observables can also be measured using CX gates an an ancilla

– In this case they look at the |+ۧ and |−ۧ states, and count the parity of the
number of |−ۧs

IBM Quantum / © 2020 IBM Corporation 45


IBM Quantum / © 2020 IBM Corporation 46
Vertex Syndrome

– These operators also allow is to encode and protect a bit value

– In this case, let’s use + and - to label the two states

– They are encoded using suitable patterns of |+ۧ and |−ۧ states
for the code qubits

– As with the plaquettes, these also correspond to exponentially


large families of states

IBM Quantum / © 2020 IBM Corporation 47


IBM Quantum / © 2020 IBM Corporation 48
Logical X and Z
– What is the X operator (distinguish between |+ۧ and |−ۧ )?

– What is the Z operator (flip between |+ۧ and |−ۧ )?

– Turns out they are exactly the same as before!

IBM Quantum / © 2020 IBM Corporation 49


Effects of Errors
– Applying a Z to any code qubit changes the X
parity of its two vertices

– An isolated Z creates a pair of defects

– Further Zs can be move a defect, or annihilate


pairs of them

– A logical Z requires many errors to stretch across


the lattice

– With the vertex operators, we can encode and


protect a bit
IBM Quantum / © 2020 IBM Corporation 50
IBM Quantum / © 2020 IBM Corporation 51
Putting it all Together
– The plaquette and vertex operators commute

– This allows us to detect both X and Z errors

– Since Y~XZ, we can detect Y errors too

IBM Quantum / © 2020 IBM Corporation 52


IBM Quantum / © 2020 IBM Corporation 53
IBM Quantum / © 2020 IBM Corporation 54
Putting it all Together
– Encoded states now unique: superposition of all previous solutions

– For example, the encoded 0

– Satisfies 𝐴𝑣 |𝜓ۧ= |𝜓ۧ and 𝐵𝑣 |𝜓ۧ= |𝜓ۧ, so will give the 0 outcome for all stabilizer measurements

IBM Quantum / © 2020 IBM Corporation 55


Putting it all Together
– The Z and X operators on the encoded qubit are exactly the same as before

– These, and the Hadamard, can be performed fault-tolerantly

IBM Quantum / © 2020 IBM Corporation 56


Putting it all Together
– The states we need are highly entangled quantum states

– They are examples of topologically ordered states

– Though such things can be hard to make, we create and protect them with the syndrome measurements

IBM Quantum / © 2020 IBM Corporation 57


Putting it all Together
– We are not just protected against X and Z, but all local errors

– As mentioned earlier, Y~XZ

– Everything else can be expressed

𝐸 =𝑎𝐼+𝑏𝑋+𝑐𝑌+𝑑𝑍
– This creates a superposition of different types of error on the surface code

– Measuring the stabilizers collapses this to a simple X, Y or Z

IBM Quantum / © 2020 IBM Corporation 58


IBM Quantum / © 2020 IBM Corporation 59
Final Readout
– The logical operators are many-body observables

– So how do we read them out fault-tolerantly

– When you decide on a basis for final measurement,


you stop caring about some errors

– You can then measurement in a product basis

– Final readout and final stabilizer measurement can


be constructed from the result

– Measurement errors are effectively the same as


errors before measurement

IBM Quantum / © 2020 IBM Corporation 60


Decoding
– Given the measurement results, we need to work out what errors happened

– More specifically, the ‘equivalence class’ of errors

– This is the job of the decoding algorithm

IBM Quantum / © 2020 IBM Corporation 61


Decoding with MWPM
– A good option is MWPM

– Just as we considered for the repetition code

– Again we start with the simple and unrealistic case: errors only
between measurement

– Each round can be decoded separately, corresponding to MWPM on


a 2D graph

– Decoding for X and Z errors can also be done independently

IBM Quantum / © 2020 IBM Corporation 62


Decoding
– We need to be careful to account for the effects of the edges

– This is done by introducing extra ‘virtual nodes’


(also required for the repetition code, but we ignored it earlier)

IBM Quantum / © 2020 IBM Corporation 63


Imperfect Measurements

– Again, we have the problem of imperfect measurements

• The measurements might lie

• Errors on the additional qubit

• Errors in the CX gates

– We base the decoding using syndrome changes

– This leads to a 3D MWPM problem (2D space + time)

IBM Quantum / © 2020 IBM Corporation 64


Threshold
– Correcting according to the right class removes the effects of errors

– Correcting according to the wrong class causes an operation on the encoded qubit (without our knowing)

– What is the probability of such an error, P, given the probability on the qubits of the code, p?

– We find a phase transition as L is increased (for an LxL grid)

IBM Quantum / © 2020 IBM Corporation 65


More Logical Gates
– We’ve seen how to do logical X and Z

– A logical CX can be done without much trouble

– A logical H requires the lattice to be rotated, but that


can be done

– Other logical Clifford gates can be done with some


crazy tricks

– But that’s all! No other logical operations can be done


fault-tolerantly.

– A solution is magic state distillation, using the logical


gates we have to clean up the one we don’t

– But that’s beyond today’s lecture…

IBM Quantum / © 2020 IBM Corporation 66


Anyons in the Surface Code

– There are many variants on how qubits can be encoded


and manipulated in the surface code

– They all depend on the unique topological nature

– The ‘defects’ created by errors in the surface code


behave like particles

– All particles in our universe are either bosons or


fermions

– This due to topological restrictions in a 3D universe

IBM Quantum / © 2020 IBM Corporation 67


Anyons in the Surface Code
– The surface code is only a 2D ‘universe’, so doesn’t have these restrictions

– How do these particles behave?

IBM Quantum / © 2020 IBM Corporation 68


Anyons in the Surface Code
– Braiding a particle corresponds to applying a stabilizer

– Their eigenstates defines the braiding phase

– Neither bosons nor fermions, but anyons!

IBM Quantum / © 2020 IBM Corporation 69


Minimal Implementation
– The first surface code will probably be a small one

– The smallest that allows correction is d=3

– This requires ~17 qubits

– Who will be among the first to run and study this code?

– Maybe you!

IBM Quantum / © 2020 IBM Corporation 70


IBM Quantum / © 2020 IBM Corporation 71
Superconducting Qubits I:
Making Your First Qubit
From an Oscillator
Introduction to Circuit
Quantum Electrodynamics (cQED)

Zlatko K. Minev

IBM Quantum
IBM T.J. Watson Research Center, Yorktown Heights, NY

Image copyright:
@zlatko_minev zlatko-minev.com ZKM unless otherwise noted
What is a real qubit?

How can you design, control,


and measure a real qubit?

Why?

Illustration: IBM Qiskit Textbook Zlatko Minev — Qiskit Global Summer School 2020 (2)
On the road ahead
Qubit in the cloud cQED: Transmon qubit Unveiling the
quantum oscillator

Qubit from atom / oscillator Classical circuits & the LC Transmon qubit

* Road image: based on Freepik IBM Quantum


This Lecture

Introductory and skill reaffirming

Don't need to know much going in, but we will go far Advanced
material
Examples: simplest, most practical examples

Step by step

Ask questions!

Tightly integrated lab work by Dr. Nick Bronn and Co.!

Icons here by FreePik. Dangerous bend symbol based on Donald Knuth. Zlatko Minev — Qiskit Global Summer School 2020 (4)
Avoid firehose of information

Thanks to Fred Moxley for gif reference. IBM Quantum


Qubit

From Idea to Reality

THE BIG PICTURE


before calculations

Zlatko Minev — Qiskit Global Summer School 2020 (6)


Qubit: idea

Energy levels Hilbert space Quantum cloud?

|1⟩

|0⟩

* Images: Minev, arXiv:1902.10355; Illustration on right: IBM Qiskit Textbook; Zlatko Minev — Qiskit Global Summer School 2020 (7)
Qubit: idea and reality

Energy levels Hilbert space


Lab Fridge

|1⟩

|0⟩

* Images: Minev, arXiv:1902.10355; Illustration on right: IBM, Qiskit Textbook Zlatko Minev — Qiskit Global Summer School 2020 (8)
Qubit: idea and reality

Energy levels Hilbert space The Mona Lisa Case

|1⟩

|0⟩

* Images: Minev, arXiv:1902.10355; Illustration on right: IBM, Qiskit Textbook Zlatko Minev — Qiskit Global Summer School 2020 (9)
Operation at
15 mK (-273.13 °C)
Zlatko Minev — Qiskit Global Summer School 2020 (10)
qubit
qubit
readout
qubit
readout
qubit
readout qubit
readout

readout

Zlatko Minev — Qiskit Global Summer School 2020 (11)


Zlatko Minev — Qiskit Global Summer School 2020 (12)
cQED qubit in the cloud: Summary of flow

* Laptop image: rawpixel.com; Photos: IBM Zlatko Minev — Qiskit Global Summer School 2020 (13)
Qubit

From Idea to Reality

Concepts

Zlatko Minev — Qiskit Global Summer School 2020 (14)


From qubit representation to reality

Realization Energy levels Hilbert space*

|1⟩

|0⟩

* Bloch sphere is a mere geometrical representation of SO(3), but the density matrix ρ is in SU(2), a double cover of SO(3).
* A density matrix operator lives not in the Hilbert space H but in the Liouville space H ⊗ H.
Images: Minev, arXiv:1902.10355; atom art: Indoleces. Zlatko Minev — Qiskit Global Summer School 2020 (15)
Origins of quantum
e.g., atom cloud

individual
atom

(experiments until c. 1980)


Zlatko Minev — Qiskit Global Summer School 2020 (16)
Atomic emission of light

Image: Averill and Eldredge, Principles of General Chemistry


Atomic emission of light

Image: Averill and Eldredge, Principles of General Chemistry


Atomic emission of light

Image: Averill and Eldredge, Principles of General Chemistry


Atomic emission of light

Image: Averill and Eldredge, Principles of General Chemistry


Quantized levels
Atomic emission spectra Atoms are quantum:
discrete intrinsic energy levels*
Hydrogen
Energy


|3⟩
Helium
|2⟩
Neon
|1⟩
Sodium

|0⟩
Mercury
Quantization of energy
* The notion of an energy level was proposed by Bohr in 1913.
Image credit: NMSU, N. Vogt
Zlatko Minev — Qiskit Global Summer School 2020 (21)
The light of atoms

Image: Averill and Eldredge, Principles of General Chemistry


Atomic energy levels and transitions

Electron potential-energy landscape

Quantization of
energy

Radial distance from nucleus


Zlatko Minev — Qiskit Global Summer School 2020 (23)
Qubit from Atom
Anharmonic degree of
freedom and spin

Isolated from environment


Energy
and thermal bath

Low-loss
No level here
Level diagram allows for
qubit-specific control and
readout

There are always more than


two levels
Radius
Zlatko Minev — Qiskit Global Summer School 2020 (24)
Artificial atoms

capacitor inductor

Zlatko Minev — Qiskit Global Summer School 2020 (25)


Anharmonic d.o.f. and spin Harmonic oscillator
Energy Energy

Magnetic flux
Radius
Zlatko Minev — Qiskit Global Summer School 2020 (26)
non-linear
inductor

Anharmonic d.o.f. and spin Anharmonic oscillator


Energy Energy

anharmonicity

Magnetic flux
Radius
Zlatko Minev — Qiskit Global Summer School 2020 (27)
Big-picture connections

Idealization of Anharmonic Physical circuit Physical layout


qubit oscillator model

|1⟩

|1⟩
|0⟩ |0⟩

Idealization Physical reality


Zlatko Minev — Qiskit Global Summer School 2020 (28)
Circuit Quantum
Electrodynamics
(cQED)
Macro
overview

Zlatko Minev — Qiskit Global Summer School 2020 (29)


There are two kinds of physicists:

Those who believe all of physics is spins.


Those who believe all of physics is oscillators.

Zlatko Minev — Qiskit Global Summer School 2020 (30)


cQED Ingredients
Circuit elements Microwave oscillators

Combine …

Zlatko Minev — Qiskit Global Summer School 2020 (31)


cQED Ingredients
Small dissipation
Isolation from environment
Low temperature
Nonlinearity
Large vacuum fluctuations

Superconductivity
Nominally zero intrinsic dissipation and heat
Nominal temperature far below energy level splitting
Non-linear, robust Josephson tunnel junction effect

* Low energy dynamics. Microwave image: vectorpocket; Nobel photograph: Jonathunder; Josephson photograph: Nobel Foundation archive.
Wavelength (m)

Wavelength
scale

Frequency (Hz)

Effective
temperature

Order of 10-2 K 0.5 K, 10 GHz, 3 cm


magnitude

Spectrum image: Inductiveload, NASA


A few introductory reviews
And many more… check online or ask us for specific topic
Qiskit Textbook (2020; more chapters coming) Gambetta, J. M., Chow, J. M., & Steffen, M. (2017)
Building logical qubits in a superconducting quantum computing
Blais, A., Grimsmo, A. L., Girvin, S. M., & Wallraff, A. (2020) system. Npj Quantum Information, 3(1), 2
Circuit Quantum Electrodynamics (arXiv:2005.12667)
Girvin, S. M. (2011) Circuit QED: superconducting qubits coupled
Kjaergaard, M., Schwartz, … Oliver, W. D. (2020) to microwave photons. Quantum machines: measurement and
Superconducting Qubits: Current State of Play control of engineered quantum systems, 113, 2.
Annual Reviews of Condensed Matter Physics 11, 369-395
Clerk, A. A., Girvin, S. M., Marquardt, F., & Schoelkopf, R. J. (2010)
Krantz, P., Kjaergaard, M., Yan, F., … & Oliver, W. D. (2019) Introduction to quantum noise, measurement, and amplification
A quantum engineer’s guide to superconducting qubits Reviews of Modern Physics, 82(2), 1155–1208
Applied Physics Reviews, 6(2), 021318
Clarke, J., & Wilhelm, F. K. (2008)
Corcoles, A. D., Kandala, A., … Gambetta, J. M. (2019) Superconducting quantum bits. Nature, 453(7198), 1031–1042
Challenges and Opportunities of Near-Term Quantum
Computing Systems. Proceedings of the IEEE, 1–15. Devoret, M. H. (1997)
Quantum Fluctuations in Electrical Circuits.
Wendin, G. (2017) In Fluctuations Quantiques/Quantum Fluctuations (p. 351)
Quantum information processing with superconducting …
circuits. Reports on Progress in Physics, 80(10), 106001 Zlatko Minev — Qiskit Global Summer School 2020 (34)
Circuit Quantum
Electrodynamics

Introduction
Zlatko Minev — Qiskit Global Summer School 2020 (35)
To do quantum,

start with classical

Classical oscillator

Zlatko Minev — Qiskit Global Summer School 2020 (36)


Transmon qubit

Zlatko Minev — Qiskit Global Summer School 2020 (37)


Transmon qubit

Substrate Qubit pad


Dielectric Metal

Qubit inductor
Non-Linear
e.g., Josephson Junction

Zlatko Minev — Qiskit Global Summer School 2020 (38)


Transmon qubit: charge

Net positive charge Net negative charge


~ 1012 mobile e−

Zlatko Minev — Qiskit Global Summer School 2020 (39)


Electric field and voltage

Voltage

Electric field

Zlatko Minev — Qiskit Global Summer School 2020 (40)


Charge and capacitance
Constitute relationship

Capacitance

For a good discussion, see ”The Feynman Lectures on


Physics Vol. II Ch. 22: AC Circuits." Caltech. Zlatko Minev — Qiskit Global Summer School 2020 (41)
Conservation of charge Charge and current
Universal relationship
Caution: Passive
sign convention

Initial conditions

Zlatko Minev — Qiskit Global Summer School 2020 (42)


Magnetic flux and inductance
Faraday’s law of induction Constitute relationship
Universal relationship

Inductance

Initial conditions

Magnetic flux
For kinetic inductors,
~98% of qubit inductive energy is not
in stored magnetic fields, but in
kinetic inductance
Zlatko Minev — Qiskit Global Summer School 2020 (43)
Power and energy
Universal

Energy stored in Instantaneous


(delivered to) power flowing
component to component

Zlatko Minev — Qiskit Global Summer School 2020 (44)


Four fundamental manifestations of electricity

Zlatko Minev — Qiskit Global Summer School 2020 (45)


Four fundamental manifestations of electricity

Constitutive
elemental
relationships

Zlatko Minev — Qiskit Global Summer School 2020 (46)


Electromagnetic oscillator

capacitance value node of the circuit

inductance
value

inductor

capacitor
ground

Zlatko Minev — Qiskit Global Summer School 2020 (47)


Kirchhoff’s network laws*

Conservation of charge Faraday’s law of induction


Kirchhoff’s current law Kirchhoff’s voltage law

As we will see later, for the Lagrangian description in flux basis, KVL acts as a set of holonomic
constraints and KCL as the equations of motion
Zlatko Minev — Qiskit Global Summer School 2020 (48)
Oscillator analogy

Velocity

Deviation from equilibrium

Equilibrium position

Resonance
frequency Spring: Svjo
Zlatko Minev — Qiskit Global Summer School 2020 (49)
Lagrangian and Hamiltonian*

Kinetic energy − Potential energy

Canonically conjugate variable


(momentum; charge)

Euler-Lagrange equations, F = ma

Kinetic energy + Potential energy

* Temporarily going to assume some minimal knowledge of classical mechanics.


Since we eliminated the KVL constraints, this is a Lagrangian of the second kind. Zlatko Minev — Qiskit Global Summer School 2020 (50)
Energy The LC classical harmonic oscillator

Graph: Minev; Spring-mass: Svjo


Zlatko Minev — Qiskit Global Summer School 2020 (51)
“It is by logic that we prove,
but by intuition that we discover.”

Henri Poincaré

Photo by Eugène Pirou

Zlatko Minev — Qiskit Global Summer School 2020 (52)


Hamiltonian dynamics and phase space

with

Zlatko Minev — Qiskit Global Summer School 2020 (53)


Complex action-angle variable

Classical analog of the


bosonic ladder operator

Zlatko Minev — Qiskit Global Summer School 2020 (54)


Unveiling the quantum
Quantum harmonic oscillator

Zlatko Minev — Qiskit Global Summer School 2020 (55)


Unveiling the quantum

Dangerous bend
ahead on quantization

Zlatko Minev — Qiskit Global Summer School 2020 (56)


Drawing: Zurek, Physics Today (1991)

Zlatko Minev — Qiskit Global Summer School 2020 (57)


Dirac's canonical quantization

Quantum (commutator) Classical (Poisson bracket)

These look
a lot alike!

Source: Cambridge University,


Cavendish Laboratory / Wikimedia where where
Commons

Procedure: Supplant the Poisson brackets by commutators


“There is, however, a fairly general
method of obtaining quantum
conditions, applicable to a very large
class of dynamical systems. This is
the method of classical analogy”
P.A.M. Dirac
Zlatko Minev — Qiskit Global Summer School 2020 (58)
Dirac's canonical quantization: Quick exposure
Supplant classical Poisson bracket
and all quantum algebra follows…

Derivation: Dirac derives the quantum form of the Poisson bracket — the commutator — from
merely assuming that
1. Classical Poisson bracket rules hold (by analogy, the new theory must be consistent with the old!)
2. The dynamical variables do not commute; i.e., xp ≠ px
3. The Poisson bracket has a single result and single unique meaning

Problems:
• Operator ordering ambiguities.
Consider A and B are polynomials in x and p; e.g., x2×p or p×x2
• Curvilinear coordinate systems (potentially transmon if cos(Φ/φ0) considered wrapped)
• Quantum gravity …
Zlatko Minev — Qiskit Global Summer School 2020 (59)
Photo: F. Schmutzer

Zlatko Minev — Qiskit Global Summer School 2020 (60)


The classical and quantum oscillator

Classical Quantum

Zlatko Minev — Qiskit Global Summer School 2020 (61)


The classical and quantum oscillator
Classical Quantum

Hamiltonian

Phase space

(Heisenberg
picture)

Zlatko Minev — Qiskit Global Summer School 2020 (62)


Ladder operators and matrix representation
annihilation creation general hopping

Image: Griffiths, D.J.


Zlatko Minev — Qiskit Global Summer School 2020 (63)
Hand-written notes

Hamiltonian and energy Mean, variance, and RMS fluctuations

Zlatko Minev — Qiskit Global Summer School 2020 (64)


Calculations of the energy

Zlatko Minev — Qiskit Global Summer School 2020 (65)


Expectation value of magnetic flux and charge

Zlatko Minev — Qiskit Global Summer School 2020 (66)


Fluctuations of flux

Zlatko Minev — Qiskit Global Summer School 2020 (67)


Fluctuations of flux and charge

Zlatko Minev — Qiskit Global Summer School 2020 (68)


Wavefunctions of the quantum oscillator

Energy

Classically forbidden
region

Zlatko Minev — Qiskit Global Summer School 2020 (69)


Wavefunctions of the quantum oscillator

Energy /

Scaled
wavefunction
amplitude

Classically forbidden
region

Zlatko Minev — Qiskit Global Summer School 2020 (70)


Wavefunctions of the quantum oscillator

Energy /

Scaled
wavefunction
amplitude

Classically forbidden
region

Zlatko Minev — Qiskit Global Summer School 2020 (71)


Phase-space (Husimi Q function)

Zlatko Minev — Qiskit Global Summer School 2020 (72)


Pop-up question
The flux and charge operators are Hermitian
observables.

How can some expectations, such as

be imaginary?

Or, others be negative…?

Zlatko Minev — Qiskit Global Summer School 2020 (73)


Advanced questions

Will discuss
answers on my
blog sometime
soon
Zlatko Minev — Qiskit Global Summer School 2020 (74)
Quantum Harmonic Oscillator Applets

Energy levels of SHO applet from


https://www.st-andrews.ac.uk/physics/quvis

Wigner function
https://demonstrations.wolfram.com/WignerFunctionOfHarmonicOscillator/

Coherent states
https://demonstrations.wolfram.com/CoherentStatesOfTheHarmonicOscillator/

Zlatko Minev — Qiskit Global Summer School 2020 (75)


Linear harmonic oscillator summary

Zlatko Minev — Qiskit Global Summer School 2020 (76)


Energy
The LC quantum harmonic oscillator

Graph: Minev; Spring-mass: Svjo Zlatko Minev — Qiskit Global Summer School 2020 (77)
The LC quantum harmonic oscillator


wavefunction amplitude
Energy / Scaled

Classically
forbidden region
Zlatko Minev — Qiskit Global Summer School 2020 (78)
The road behind and ahead
Qubit in the cloud cQED: Transmon qubit Unveiling the
quantum oscillator

Qubit from atom / oscillator Classical circuits & the LC Transmon qubit

* Road image: based on Freepik IBM Quantum


Next steps

Tightly integrated lab work with Dr. Nick Bronn and Co.!
More depth on qubit control
Run experiments on real devices

Check out references, problems given in the lecture,


dangerous bends

Break away from the rules of today

Thank you!
Zlatko K. Minev
@zlatko_minev zlatko-minev.com IBM Quantum
Superconducting Qubits II
Transmon & Measurements

Introduction

Zlatko K. Minev

IBM Quantum
IBM T.J. Watson Research Center, Yorktown Heights, NY

Image copyright:
@zlatko_minev zlatko-minev.com ZKM unless otherwise noted
The road ahead
Transmon qubit Qubit and readout (/qubit) Lab

Qubit control On measurements

* Road image: based on Freepik IBM Quantum


Takeaways from Lecture I

(and building on)


“Quantum phenomena do not
occur in a Hilbert space, they
occur in a laboratory.”
Asher Peres
Qubit in the cloud

* Laptop image: rawpixel.com; Photos: IBM


Transmon qubit: physical picture
Net positive charge

Magnetic flux

Zlatko Minev — Qiskit Global Summer School 2020 (6)


A first approximation
Harmonic oscillator

Energy

Magnetic flux

Zlatko Minev — Qiskit Global Summer School 2020 (7/104)


Classical to quantum bridge
The LC quantum harmonic oscillator


wavefunction amplitude
Energy / Scaled

Classically
forbidden region
Graph: Minev; Spring: Svjo Zlatko Minev — Qiskit Global Summer School 2020 (9)
Phase-space (Husimi Q function)

Zlatko Minev — Qiskit Global Summer School 2020 (10)


The cloud of quantum uncertainty

Zlatko Minev — Qiskit Global Summer School 2020 (11)


Transmon Qubit

Introduction Zlatko Minev — Qiskit Global Summer School 2020 (12)


The transmon as a non-linear oscillator

Josephson
tunnel junction

Non-linear inductor

Zlatko Minev — Qiskit Global Summer School 2020 (13)


Josephson tunnel junction

generalized
magnetic
flux

SEM image: L. Frunzio

Circuit image: Minev et al., EPR to appear (2020)


Zlatko Minev — Qiskit Global Summer School 2020 (14)
The Transmon qubit

EJ

Energy
Classically
forbidden region
-EJ
-" 0 "
≈ 3.3 × 10−16 Wb Reduced magnetic flux Φ/!0
Image: Minev et al., EPR to appear (2020) Zlatko Minev — Qiskit Global Summer School 2020 (15)
Semi-classical intuition: phase space picture

Zlatko Minev — Qiskit Global Summer School 2020 (16)


The Transmon qubit

EJ

Energy
Classically
forbidden region
-EJ
-" 0 "
Reduced magnetic flux Φ/!0
Zlatko Minev — Qiskit Global Summer School 2020 (17)
Hand-written notes
Hand-written notes
The Transmon qubit

EJ

RWA or 1st
order PT

Energy
Due to nl & commutator Due to non-linearity (nl) Classically
forbidden region
where -EJ
-" 0 "
“Lamb shift” Anharmonicity Zero-point Reduced magnetic flux Φ/!0
due to ZPF fluctuations Zlatko Minev — Qiskit Global Summer School 2020 (20)
The Kerr Hamiltonian of the transmon
EJ

Energy
Solution known (SHO) New from nonlinearity

Classically
forbidden region
-EJ
-" 0 "
Reduced magnetic flux (Φ/!0)

1st order correction to energy: and to eigenstates:

To first order perturbation theory the eigenstates do not change! Only the energy changes. Dispersive.
Zlatko Minev — Qiskit Global Summer School 2020 (21)
Exploring a real transmon qubit
EJ

Energy
Solution known (SHO) New from nonlinearity

Classically
forbidden region
-EJ
-" 0 "
Experimental parameters Reduced magnetic flux (Φ/!0)

Zlatko Minev — Qiskit Global Summer School 2020 (22)


Exploring a real transmon qubit
EJ

Energy
Dispersive, states didn’t change to 1st order
“Lamb shift” due to ZPF
Classically
forbidden region
-EJ
Parameters used in figure (of a measured qubit) -" 0 "
Reduced magnetic flux (Φ/!0)

Zlatko Minev — Qiskit Global Summer School 2020 (23)


Quantum fluctuations of the transmon qubit

EJ

Energy
-EJ
-" 0 "
Reduced magnetic flux (Φ/!0)
Zlatko Minev — Qiskit Global Summer School 2020 (24)
Energy diagram and transition spectrum
Energy levels Transition spectrum

ωq

Zlatko Minev — Qiskit Global Summer School 2020 (25)


Ladder operators and matrix representation
annihilation creation general hopping

Image: Griffiths, D.J.


The Transmon qubit: restricting Hilbert space

Restrict to qubit subspace of |0> and |1>

Energy
0
0
Φ/!0

Zlatko Minev — Qiskit Global Summer School 2020 (27)


The Transmon qubit: restricting Hilbert space

Restrict to qubit subspace of |0> and |1>

Energy
Fock number Qubit Pauli Z Qubit Pauli X and Y
operator operator operators
0
0
Φ/!0

Zlatko Minev — Qiskit Global Summer School 2020 (28)


Drawing: Zurek, Physics Today (1991)
Zlatko Minev — Qiskit Global Summer School 2020 (29)
Calculating the energy-participation ratio

Energy stored in junction


!" =
Inductive energy stored in mode 5

Minev et al., EPR to appear (2020); Dissertation arXiv: 1902.10355 Zlatko Minev — Qiskit Global Summer School 2020 (30)
Energy participation-ratio: a bridge

What fraction of the energy of mode m


is stored in junction j?

for j>1, root requires sign bit smj = ±1


Minev et al., EPR to appear (2020); Dissertation arXiv: 1902.10355 Drawing: Zurek, Physics Today (1991)
All this explicated in
Minev dissertation Sec. 4.1 (arXiv: 1902.10355)

In detail, to appear soon in the EPR paper:


Transmon Qubit

Control and beyond Zlatko Minev — Qiskit Global Summer School 2020 (33)
Single-qubit quantum gates

IBM Quantum
Zlatko Minev — Qiskit Global Summer School 2020 (34)
Qubit control

input-output line
qubit (control, shaped signals, but also environment)
Zlatko Minev — Qiskit Global Summer School 2020 (35)
Qubit control: overview
qubit

Zlatko Minev — Qiskit Global Summer School 2020 (36)


Qubit control: overview
qubit

Zlatko Minev — Qiskit Global Summer School 2020 (37)


Qubit control: overview

Zlatko Minev — Qiskit Global Summer School 2020 (38)


Qubit control: Covered in Lab 1 by Nick Bronn & Co.

qubit

input-output line
(control, shaped signals, but also environment)
Zlatko Minev — Qiskit Global Summer School 2020 (39)
Control, noise, and dissipation go hand-in-hand
Can lead to uncontrolled, random bit and
phase flip.

Fluctuation-dissipation theorem* noisy environment

susceptibility, noise, and dissipation


always go hand-in-hand

Intrinsic and I-O channels, lead to


relaxation times:

T1 : energy
T2 : (coherence) transverse
Noisy environment, and
always zero-point quantum fluctuations
* This is a major topic in condensed matter physics;
we will only touch on it. Zlatko Minev — Qiskit Global Summer School 2020 (40)
Coherence in superconducting circuits
Isolation vs. control
Fluxonia
(Chicago, UMD)
(Yale) (Yale)
2-D Transmon
(IBM)
2-D Transmon
(IBM) multi-qubit
systems

Year
2020

Image reproduced Reagor (2015), an update of Devoret and Schoelkopf (2013), and updated
Zlatko Minev — Qiskit Global Summer School 2020 (41)
Is the junction phase/flux
compact or not?

Zlatko Minev — Qiskit Global Summer School 2020 (42)


Harmonic Approximation

Zlatko Minev — Qiskit Global Summer School 2020 (43)


Tight-binding model

Zlatko Minev — Qiskit Global Summer School 2020 (44)


Quantum measurement:

a very brief primer

Zlatko Minev — Qiskit Global Summer School 2020 (45)


Principal element of sensing: the measurement

Zlatko Minev — Qiskit Global Summer School 2020 (46)


A classical measurement example

Are there fumes in the oil barrel?

Example based on Wiseman and Milburn (2010)

Barrel image:freepik.com Zlatko Minev — Qiskit Global Summer School 2020 (47)
Two basic classes of measurements

Demolition Non-demolition

Caution: Classical
measurements can
also be disturbing!

e.g., photon absorption e.g., dispersive cavity


Both accessible in circuits, more on this later
Zlatko Minev — Qiskit Global Summer School 2020 (48)
Takeaways: Basic character of quantum measurements

Necessarily disturb system (back-action)


non-commuting
Heisenberg uncertainty
fundamental limits to precision, e.g., SQL, …
no joint probability distribution (over x, p)
quasi-probabilities (Wigner, Q)
no classical Fisher information
entropy-increasing
contextuality
….
Zlatko Minev — Qiskit Global Summer School 2020 (49)
Zlatko Minev — Qiskit Global Summer School 2020 (50)
Qubit measurement with circuits

Direct monitoring cQED dispersive

qubit qubit cavity

Demolition Quantum non-demolition* (QND)

Spontaneous emission Inhibited spontaneous emission


Blais et al., PRA (2004)
Clarke & Wilhelm, Nature (2008) Zlatko Minev — Qiskit Global Summer School 2020 (51)
Qubit coupled to resonator

Zlatko Minev — Qiskit Global Summer School 2020 (52)


Qubit coupled Qubit coupled
to resonator to qubit

Readout Two-qubit gates


Zlatko Minev — Qiskit Global Summer School 2020 (53)
Qubit and oscillator

Zlatko Minev — Qiskit Global Summer School 2020 (54)


Qubit measurement with circuits

Zlatko Minev — Qiskit Global Summer School 2020 (55)


Qubit and oscillator

Zlatko Minev — Qiskit Global Summer School 2020 (56)


Qubit and oscillator

Zlatko Minev — Qiskit Global Summer School 2020 (57)


Qubit and oscillator

Zlatko Minev — Qiskit Global Summer School 2020 (58)


Two coupled transmon qubits

Canonical charge is modified by coupling capacitor


Can use EPR to avoid issues

Minev et al., EPR to appear (2020); Dissertation arXiv: 1902.10355 Zlatko Minev — Qiskit Global Summer School 2020 (59)
Energy-participation eigenmode approach

Linearize

Minev et al., EPR to appear (2020); Dissertation arXiv: 1902.10355 Zlatko Minev — Qiskit Global Summer School 2020 (60)
Linearize

All linear
Easy to solve, classical problem
Eigenmode solutions

Minev et al., EPR to appear (2020); Dissertation arXiv: 1902.10355 Zlatko Minev — Qiskit Global Summer School 2020 (61)
Linearize
Solutions are eigenmodes (normal mode),
just more SHO. Their Eigenfrequencies are

The Hamiltonian of two SHO is

The non-linear part of the Hamiltonian is


Recall

The coupling capacitor CC effect is accounted for in


the definition of the eigenmode a and b operators.

We need the junction flux in mode operators.


Zlatko Minev — Qiskit Global Summer School 2020 (62)
Eigen-decomposition of junction flux
Eigen (dressed) coordinates

“Bare”
coordinates

Canonical transformation
eigenvectors (found classically)

Use in It follows

and, similarly, for the second junction flux

(second quantization in eigen basis of linearized circuit)


See Minev et al., EPR to appear (2020); Dissertation arXiv: 1902.10355 Zlatko Minev — Qiskit Global Summer School 2020 (64)
Partitioning the Hamiltonian

What fraction of the


where , and so on
energy of a mode m
is stored in the junction? and for weak coupling

See Minev et al., EPR to appear (2020); Dissertation arXiv: 1902.10355 Zlatko Minev — Qiskit Global Summer School 2020 (65)
Breakdown of the Hamiltonian

RWA. Notation: dropping ZPF and index for 1

Terms like those of isolated transmon

Drop small terms (cross-participation) …

Only new addition is this non-linear,


photon-number dependent coupling,
called the cross-Kerr.

Zlatko Minev — Qiskit Global Summer School 2020 (66)


Linearize system and find eigenmodes
Review of steps
1. Linearize and find eigenmodes
2. Taylor series of nl. potential to 4th order
3. RWA and normal order
4. Dispersive approximation

Using labels to q for qubit eigenmode and c for cavity


eigenmode, and
Zlatko Minev — Qiskit Global Summer School 2020 (67)
Joint spectrum

Transition
spectrum !q !q χqc
Recall that harmonic
oscillator has evenly spaced
levels

ωq -Δq ωc

Zlatko Minev — Qiskit Global Summer School 2020 (68)


Conditional cavity spectrum

Response qubit in |1> qubit in |0>


cavity
probe

Lorentzian peak
(response of cavity on irradiation)

Frequency Zlatko Minev — Qiskit Global Summer School 2020 (69)


cQED dispersive readout: measuring Z

Pointer states of measurement


apparatus (cavity) corresponding to
the qubit in the ground (g) and
excited (e) states

Zlatko Minev — Qiskit Global Summer School 2020 (70)


cQED dispersive readout: measuring Z

distinguishability

Integration time Tint


efficient, fast measurements
image: Clerk et al. (2010) Zlatko Minev — Qiskit Global Summer School 2020 (71)
The road behind
Transmon qubit Qubit and readout (/qubit) Lab

Qubit control On measurements

* Road image: based on Freepik IBM Quantum


Zlatko Minev — Qiskit Global Summer School 2020 (72)
Next steps

Tightly integrated lab work with Dr. Nick Bronn and Co.!
Run experiments on real devices

Check out references, problems given in the lecture,


dangerous bends

Break away from the rules of today

Thank you!
Zlatko K. Minev
@zlatko_minev zlatko-minev.com IBM Quantum
The important thing is not to stop questioning.
Curiosity has its own reason for existence.

One cannot help but be in awe when he


contemplates the mysteries of eternity, of life, of
the marvelous structure of reality.

It is enough if one tries merely to comprehend a


little of this mystery each day.
Photo: F. Schmutzer

@zlatko_minev zlatko-minev.com IBM Quantum


Simulating Chemistry on a
Quantum Computer
Part I

Antonio Mezzacapo
Qiskit Global Summer School 2020

IBM Quantum

TJ Watson Research Center


Yorktown Heights, NY
Topics covered IBM Quantum

Construct Qubit Hamiltonians for molecules

- Second quantization notation


- Basics of fermion to qubit mappings

Variational Quantum Algorithms

- Why they work


- Popular Variational Wavefunctions
- Open challenges
IBM Quantum
IBM Quantum

Molecular Hamiltonians
Molecular Hamiltonians IBM Quantum

Quantum
Speedup

Hardware Practical
economy applications

Quantum Chemistry: What can quantum computers do?

Reaction rates Molecular structure


Molecular Hamiltonians IBM Quantum

Electronic KE Nuclear KE Electron-nuclear Electron-electron Nuclear-nuclear


Coulomb Coulomb Coulomb
Molecular Hamiltonians IBM Quantum

Electronic KE Nuclear KE Electron-nuclear Electron-electron Nuclear-nuclear


Coulomb Coulomb Coulomb
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
Molecular Hamiltonians IBM Quantum
IBM Quantum

Fermion to qubit mappings


Fermion to qubit mappings IBM Quantum
Fermion to qubit mappings IBM Quantum
Fermion to qubit mappings IBM Quantum
Fermion to qubit mappings IBM Quantum
Fermion to qubit mappings IBM Quantum
Fermion to qubit mappings IBM Quantum
Fermion to qubit mappings IBM Quantum
Fermion to qubit mappings IBM Quantum
Fermion to qubit mappings IBM Quantum

Ho do we write the action of fermionic creation and annihilation operators in these


scrambled bases? Let’s identify three sets of qubits for each fermionic mode i:
The parity set, The update set, The flip set

The parity set: tells us the set of qubits that encodes the parity of the fermionic modes
with index less than i. The parity of this set of qubits will give us the global phase

The update set: the set of qubits that must be flipped when the fermionic mode i change
occupation

The flip set: the set of qubits that determines whether qubit i has the same or inverted
parity with respect to fermionic mode i
Fermion to qubit mappings IBM Quantum
H2 Hamiltonian (4 fermionic modes): 4–qubit to 1–qubit
Independent Pauli 3 single-qubit Pauli
Symmetries: with commutation rules

Build 3 Clifford operators

Apply the Clifford


unitaries to the H2
Hamiltonian
Fermion to qubit mappings IBM Quantum
IBM Quantum

Variational circuits
Variational circuits IBM Quantum
Variational circuits IBM Quantum
Variational circuits IBM Quantum
Fermionic Hamiltonian problem

Map the problem to qubits

Trial State prepared


on quantum chip
Optimization

Energy measurement
on quantum chip

Solution
Variational circuits IBM Quantum
Variational circuits IBM Quantum
Variational circuits IBM Quantum
Variational circuits IBM Quantum

0
10
Entanglers: 0
Entanglers: 1
Entanglers: 2
Entanglers: 3
-1 Entanglers: 4
10 Entanglers: 6
Entanglers: 8
Energy Error

10 -2

Chemical accuracy
-3
10

10 -4
10 -6 10 -5 10 -4 10 -3 10 -2
Noise Strength
Variational circuits IBM Quantum

QAOA on fixed
Qubit architectures
UCCSD
Hardware Efficient:
QAOA
Entanglers + Euler Rotations

Easier to realize Guided by physical/chemical


on quantum hardware intuition

Convergence to the exact ground state is never guaranteed in general


IBM Quantum

Optimization
Optimization IBM Quantum
Fermionic Hamiltonian problem

Map the problem to qubits

Trial State prepared


on quantum chip
Optimization

Energy measurement
on quantum chip

Solution
Optimization IBM Quantum

SPSA optimization: same level of accuracy


with 1/p less function calls, with stochastic
fluctuations
VQE on hardware IBM Quantum
Current challenges for using quantum computers to target
chemistry applications IBM Quantum
Measurement errors
Phase estimation algorithm
Control problems

Quantum dynamics Sampling speed


Hamiltonian simulation
Qubit reset/on chip
feedback
Variational algorithms
Coherence times
Hamiltonian averaging
Gate sequence
optimization
Subspace methods
Better bases
for excited states
Better qubit
Software (Theory) encodings
Error mitigation
Hardware (Experiment) schemes
Sampling problem
Topics covered IBM Quantum

Construct Qubit Hamiltonians for molecules

- Second quantization notation


- Basics of fermion to qubit mappings

Variational Quantum Algorithms

- Why they work


- Popular Variational Wavefunctions
- Open challenges
Notes IBM Quantum

Molecular Electronic-Structure Theory


Author(s): Trygve Helgaker Poul Jørgensen Jeppe Olsen

Advanced Quantum Mechanics


Authors: Schwabl, Franz

Modern Quantum Chemistry: Introduction to Advanced Electronic Structure Theory


Authors : Szabo, Ostlund
Notes IBM Quantum
Notes IBM Quantum
Notes IBM Quantum
Notes IBM Quantum
Notes IBM Quantum
Simulating chemistry on a quantum
computer II

Abhinav Kandala
[email protected]

IBM Quantum

QISKIT Global Summer School


July 29, 2020
IBM Research Frontiers
Institute 1
IBM Quantum

Motivations: Quantum hardware meets quantum algorithms


0.4

0.2

Energy (Hartree)
-0.2

-0.4

-0.6

-0.8

-1

-1.2
0 1 2 3 4
Interatomic distance (Angstrom)

2 © 2017 IBM Corporation


IBM Quantum

3 © 2017 IBM Corporation


IBM Quantum

Potential energy curve of a molecule


0.4
Unstable
0.2

Energy (Hartree) 0

-0.2

-0.4 Equilibrium Dissociation

-0.6

-0.8

-1
∆E Rate ∝ Exp(-∆E/kT)
-1.2
0 1 2 3 4
4 © 2017 IBM Corporation
Interatomic distance (Angstrom)
IBM Quantum

The Electronic Structure Problem


Interacting fermionic problems: A core challenge in modern computational physics
and HPC

N
X XN XM
1 2 ZA X 1
He = ri +
i=1
2 i=1
r iA j>i
r ij
A=1

H| Gi = EG | Gi

5 © 2017 IBM Corporation


Can we build a programmable,
well-controlled quantum system to
simulate the properties of other
natural quantum systems, like
molecules?
Natural atoms Artificial Atoms

10-9 m 10-3 m
Classical Quantum
0 0
Quantum Bits (“Qubits”) can be in
a superposition of 0 and 1

1 1

10110…1001
10110…1001 11010…1010
00100…1101
10110…1111
N bit number: 2N possible states Can be in a superposition of all
Always in 1 of those states 2N states
IBM Quantum

Quantum Circuits

Decompose unitary N
U 2 U(2 )
| i = U |0 . . . 0i

U= CNOT0,2 T0 T2 . . . X0 X1

Universal gate set: CNOT (two-qubit gate) and single qubit rotations

David DiVincenzo, Two-Bit Gates are Universal for Quantum Computation, PRA 15, 1015 (1995)
IBM Quantum
Short depth circuits

Approximate quantum computing with noisy quantum hardware

Time • Near-term quantum


hardware is noisy

Q0 • Fault tolerant architectures


not immediately accessible
Q1
• Novel algorithms focused on
Q2 using short depth circuits
that make best use of
Q3 coherence window

10 © 2017 IBM Corporation


Quantum Hardware recap ..
Artificial atom: Transmon

100 µm
Superconductor (Al)

Insulator (Al2O3)

Superconductor (Al)

JAP, 125(16), 165301, 2019


Artificial atom: Transmon

Superconductor (Al)
|2⟩
Energy

|1⟩ Insulator (Al2O3)


ℏ𝜔0
|0⟩
Superconductor (Al)

JAP, 125(16), 165301, 2019


F
Single qubit control: Rabi Oscillations

|2⟩
Energy

|1⟩
ℏ𝜔0

|0⟩

Image: QISKIT textbook


F
Single qubit control: Rabi Oscillations
Image: QISKIT textbook

|2⟩
Energy

|1⟩
ℏ𝜔0

|0⟩

F • Amplitude/duration of pulse controls angle of rotation.

• Phase of pulse controls axis of rotation


IBM Quantum
Two-qubit entangling gates

Apply operations on two qubit product states to create an entangled state,


i.e. one that cannot be factored into its individual qubit components.

Entanglement generated by conditional rotations i.e rotations of a qubit


(target) dependent on the state of the other (control).
IBM Quantum
Two-qubit entangling gates: Cross resonance

Q2

𝜔2

Q1

Can generate a CNOT with only microwave pulses


IBM Quantum
Dispersive readout
0
~!01 0 Qubit State dependent
H= ˆz + ~(!r + ˆz )↠â resonator frequency
2
Monitor transmission
at this peak frequency 0 0
Transmission
Cavity

Readout Tone Frequency


1 1
High transmission Low transmission
IBM Quantum

Superconducting quantum processor: ibmq_5_yorktown

19 © 2017 IBM Corporation


IBM Quantum

Device characterization

Frequency Single-qubit U2
Qubit T1 (µs) T2 (µs) (GHz) Readout error error rate CNOT error rate
cx0_1: 1.380e-2,
Q0 64.2 74.54 5.286 2.45E-02 6.49E-04 cx0_2: 1.430e-2
cx1_0: 1.380e-2,
Q1 77.35 83.17 5.238 1.75E-02 5.72E-04 cx1_2: 1.713e-2
cx2_0: 1.430e-2,
cx2_1: 1.713e-2,
cx2_3: 1.470e-2,
Q2 50.9 41.91 5.031 2.75E-02 8.32E-04 cx2_4: 1.708e-2
cx3_2: 1.470e-2,
Q3 60.04 47.72 5.296 3.35E-02 9.79E-04 cx3_4: 1.245e-2
cx4_2: 1.708e-2,
Q4 57.19 64.79 5.084 1.45E-02 4.17E-04 cx4_3: 1.245e-2

Q: Which 2 qubits would you choose for a H2 simulation?


20 © 2017 IBM Corporation
IBM Quantum

Device characterization

Frequency Single-qubit U2
Qubit T1 (µs) T2 (µs) (GHz) Readout error error rate CNOT error rate
cx0_1: 1.380e-2,
Q0 64.2 74.54 5.286 2.45E-02 6.49E-04 cx0_2: 1.430e-2

21 © 2017 IBM Corporation


Hardware errors
Errors

• Incoherent

• Leakage

• Coherent

• Measurement
Incoherent errors: Energy relaxation
• Initialize qubit in |1> state and probe its
decay to |0>

• How quickly does the qubit lose its


energy?

• P(|1>) = exp{-t/T1}

Sweep delay time


Xp Measure
24 © 2017 IBM Corporation
Incoherent errors: Dephasing
• Initialize qubit in superposition state

• How quickly does the qubit lose its phase


coherence?

• Characteristic time: T2

Sweep delay time


H H Measure
25 © 2017 IBM Corporation
Coherence budget

Single qubit gate time ~ 0.01 x 10-6 s

Two qubit gate time ~ 0.1 x 10-6 s

T1 , T2~ 100 x 10-6 s

26 © 2017 IBM Corporation


Leakage errors

• Transmon qubits are weakly


anharmonic (𝝎01- 𝝎12 ~ 0.330
GHz). Not true two-level
systems. PRL 116,020501 (2016)

• Can place limits on gate speed Square Pulse:

• Leakage out of
computational subspace
Gaussian Pulse:

• Pulse shaping is important


Coherent errors
-3
x 10
-0.8

-1

Signal (a.u.)
-1.2

-1.4

-1.6

-1.8
0 5 10 15 20
Number of Repetitions

Sheldon et al, PRA 93, 012301 (2016)

Example: Under/Over rotations


IBM Quantum
Measurement errors
0
~!01 0 Qubit State dependent
H= ˆz + ~(!r + ˆz )↠â resonator frequency
2
Example:
Transmission

Prepare ‘0’
Measured {‘0’ : 99% ‘1’: 1%}
Cavity

Prepare ‘1’
Readout Tone Frequency Measured {‘0’ : 5% ‘1’: 95%}

Monitor transmission Measurement fidelity: 97%


at this peak frequency
Back to chemistry
IBM Quantum
The Electronic Structure Problem

Interacting fermionic problems: A core challenge in modern computational physics


and HPC

N
X XN XM
1 2 ZA X 1
He = ri +
i=1
2 i=1
r iA j>i
r ij
A=1

H| Gi = EG | Gi

31 © 2017 IBM Corporation


IBM Quantum

The problem and its qubit representation

In general, problem of M electrons in N spin


orbitals (M<N) mapped onto N qubit- Hamiltonian
with O(N4) Pauli strings

Jordan Wigner, Brayvi-Kitaev, Parity mapping …


X
H =schemeshN↵spin(↵)
For standard second-quantization orbitals are mapped ontoxN qubits
y z ⌦M
↵ A 2 ±{I, , , }
32 © 2017 IBM Corporation
IBM Quantum
Variational Quantum Eigensolver (VQE)

Variational principle: the energy of any trial wave-function is


greater than or equal to the exact ground state energy

~
h (✓)|H| ~
(✓)i
EG
~ (✓)i
h (✓)| ~
<latexit sha1_base64="RvrZaf+U6pdsiZ0ltLPkNA3tPyM=">AAACXXicdVFLSwMxGMyu7/qqelDwEiyCXsquFNSbIKLHClaFppRs+m0bzGbX5FuhrP2T3vTiXzHdVlCxA4Fh5ps8JlGmpMUgePf8ufmFxaXllcrq2vrGZnVr+96muRHQEqlKzWPELSipoYUSFTxmBngSKXiIni7H/sMLGCtTfYfDDDoJ72sZS8HRSd0qsthwUTDFdV8Ba1p5xF5AMBwA8uPXm9e/EjPl5GhmZFaAsj4806tucT3qVmtB/bwEnZDTxpSchzSsByVqZIpmt/rGeqnIE9AoFLe2HQYZdgpuUAq3dYXlFjIunngf2o5qnoDtFGU7I3rolB6NU+OWRlqqPxMFT6wdJpGbTDgO7F9vLP7ntXOMzzqF1FmOoMXkoDhXFFM6rpr2pAGBaugIF0a6u1Ix4K5udB9ScSV8v5TOJvcn9TCoh7eN2sXetI5lsk8OyBEJySm5IDekSVpEkA+PeCtexfv0F/w1f2My6nvTzA75BX/3C3JUtt8=</latexit>

33 © 2017 IBM Corporation


IBM Quantum
Variational principle

34 © 2017 IBM Corporation


IBM Quantum
Variational principle

35 © 2017 IBM Corporation


IBM Quantum
Variational Quantum Eigensolver (VQE)

~
E(✓)
X
H= h↵ (↵)

Map problem onto Paulis
✓~ Use classical optimizer

Prepare guess state | ~


G (✓)i
Measure its energy
X
~ =
E(✓) h↵ h ~
G (✓)| ↵ | G (✓)i
~
Nat. Commun 5, 4213 (2014)

36
Nature 549, 242-246 (2017)
© 2017 IBM Corporation
IBM Quantum

Mapping fermions to qubits


Pauli string

H = h1 IXIY + h2 XZZX + h3 XZY Z


<latexit sha1_base64="XTHYuLInmxsZrQdawsErh/PgykE=">AAACAnicdVDLSgMxFM3UV62vqitxEyxCQSgztVC7EApu2l0F204fw5BJ005o5kGSEcpQ3Pgrblwo4tavcOffmE5HUNEDl3s4516Se5yQUSF1/UPLrKyurW9kN3Nb2zu7e/n9g44IIo5JGwcs4KaDBGHUJ21JJSNmyAnyHEa6zvRq4XdvCRc08G/kLCSWhyY+HVOMpJLs/FHj0rWNptnsnbl22ez3TdXPzX6vb+cLeqmWAC5JtZKSmgGNkp6gAFK07Pz7cBTgyCO+xAwJMTD0UFox4pJiRua5YSRIiPAUTchAUR95RFhxcsIcniplBMcBV+VLmKjfN2LkCTHzHDXpIemK395C/MsbRHJ8YcXUDyNJfLx8aBwxKAO4yAOOKCdYspkiCHOq/gqxizjCUqWWUyF8XQr/J51yydBLxnWlUC+mcWTBMTgBRWCAKqiDBmiBNsDgDjyAJ/Cs3WuP2ov2uhzNaOnOIfgB7e0TJSmV8A==</latexit>

Number of non-identity single qubit Pauli operators : weight of


the Pauli string

Larger weight Pauli strings are increasingly sensitive to


measurement error

Choice of fermion-qubit mapping important: Each fermionic


operator maps to O(N) qubits for JW, O(log N) for BK

37 © 2017 IBM Corporation


IBM Quantum

Tapering of qubits

H = h1 IXIY + h2 XZZX + h3 XZY Z


<latexit sha1_base64="XTHYuLInmxsZrQdawsErh/PgykE=">AAACAnicdVDLSgMxFM3UV62vqitxEyxCQSgztVC7EApu2l0F204fw5BJ005o5kGSEcpQ3Pgrblwo4tavcOffmE5HUNEDl3s4516Se5yQUSF1/UPLrKyurW9kN3Nb2zu7e/n9g44IIo5JGwcs4KaDBGHUJ21JJSNmyAnyHEa6zvRq4XdvCRc08G/kLCSWhyY+HVOMpJLs/FHj0rWNptnsnbl22ez3TdXPzX6vb+cLeqmWAC5JtZKSmgGNkp6gAFK07Pz7cBTgyCO+xAwJMTD0UFox4pJiRua5YSRIiPAUTchAUR95RFhxcsIcniplBMcBV+VLmKjfN2LkCTHzHDXpIemK395C/MsbRHJ8YcXUDyNJfLx8aBwxKAO4yAOOKCdYspkiCHOq/gqxizjCUqWWUyF8XQr/J51yydBLxnWlUC+mcWTBMTgBRWCAKqiDBmiBNsDgDjyAJ/Cs3WuP2ov2uhzNaOnOIfgB7e0TJSmV8A==</latexit>

38 © 2017 IBM Corporation


IBM Quantum

Tapering of qubits

39 © 2017 IBM Corporation


IBM Quantum

Trial State Preparation

• Unitary Coupled Cluster ansatz :


Offers physical intuition, focuses
ground state search in ”good”
space

• However, translates to very


expensive gate count

• Alternative approach: Keeping


hardware limitations in mind, do
what hardware can do best!

A. Kandala, A. Mezzacapo, et al,


40 Nature 549, 242-246 (2017)
© 2017 IBM Corporation
IBM Quantum

Trial State Preparation

41 © 2017 IBM Corporation


IBM Quantum
Trial state preparation: Arbitrary single qubit rotation

Software implemented Z-
gates
(Perfect, zero time)

Variational parameters:
• Pulse envelope
• Pulse length
• Amplitude
• Phase
42 © 2017 IBM Corporation
IBM Quantum

Trial State Preparation

• Sequence of interleaved
arbitrary single qubit rotations
and naturally available
entangling gates

• Depth set by available quantum


coherence (incoherent errors)

• N(3d+2) variational parameters

• This structure offers some


robustness to coherent errors

A. Kandala, A. Mezzacapo, et al,


43 Nature 549, 242-246 (2017)
© 2017 IBM Corporation
IBM Quantum

Energy measurement : Measuring expectation values

Post
rotations

44 © 2017 IBM Corporation


IBM Quantum

Energy measurement : Measuring expectation values

Post
rotations

45 © 2017 IBM Corporation


IBM Quantum

Energy measurement : Measuring expectation values

Post
rotations

46 © 2017 IBM Corporation


IBM Quantum

Energy measurement: Measurement Basis

47 © 2017 IBM Corporation


IBM Quantum

Energy measurement: Measurement Basis

48 © 2017 IBM Corporation


IBM Quantum

Energy measurement: Pauli Grouping

49 © 2017 IBM Corporation


IBM Quantum

Energy measurement: Shot noise


000
0 N=100
N=100 N=1000
N=1000 N=10000
N=500
N=500 N=100 N=1000

Even if ground state


69e+00
369e+00 <E>=-1.042582e+00
<E>=-1.042582e+00 <E>=-1.063855e+00
<E>=-1.063855e+00 <E>=-1.061010e+00
<E>=-1.068369e+00
<E>=-1.061010e+00 <E>=-1.042582e+00 <E>=-1.063855e+00
8840e-05
40e-05 Evar=3.146017e-03
Evar=3.146017e-03 Evar=1.415262e-04
Evar=1.415262e-04 Evar=4.441416e-04
Evar=1.458840e-05
Evar=4.441416e-04 Evar=3.146017e-03 Evar=1.415262e-04
1414 1515 1515
7 14 15

preparation is perfect,
estimating <O> will still
1212 6 12

1010
1010
5
1010
10
have error 10
8 8 4 8
Counts
Counts

Counts
Counts

Counts
Counts

Counts

Counts
6 6 3 6

5 5 5 5 5
4 4 2 4

2 2 1 2

0 0 0 0 000 0 0
-1 -1 -1.2
-1.2 -1.1
-1.1 -1 -1 -1.2
-1.2 -1.1
-1.1 -1 -1 -1.2
-1.2
-1.2 -1.1
-1.1
-1.1 -1-1-1 -1.2 -1.1 -1 -1.2 -1.1 -1
gy Energy
Energy Energy
Energy Energy
Energy
Energy
Can affect accuracy of
Energy Energy

100 1000 10000 classical optimizer


Number of shots N
50 © 2017 IBM Corporation
Classical optimizer

arXiv:1712.09913
Classical optimizer: Simultaneous Perturbation Stochastic
Approximation (SPSA) a b

Need to reduce of calls to Quantum computer


c
Gradient approx.: Regardless of dimension of
optimization problem, utilizes only two
measurements per iteration

[1] J. C. Spall, Multivariate stochastic approximation using a


simultaneous perturbation gradient approximation, IEEE Transactions A. Kandala, A. Mezzacapo, et al,
on Automatic Control 37, 332 (1992) Nature 549, 242-246 (2017)
Classical optimizer

arXiv:1712.09913
IBM Quantum

Run time overhead

• Number of energy estimations per


iteration

• Number of Pauli strings in the


Hamiltonian

• Number of shots

• System initialization

54 © 2017 IBM Corporation


Putting it all together ..
Experimental optimization of a 6 Qubit Hamiltonian
-13.6 Xq ( q,0,
2
) Zq ( q,0,
3
) Zq ( q,1,
1
) Xq ( q,1,
2
) Zq ( q,1,
3
)
a b
-13.8
(Radians)

Energy (Hartree)
/2 -7.

-7
-14
0
-7.
-14.2 -7
Energy (Hartree)

q,i,

- /2
j

-7.
-14.4
- c 0.

0
-14.6

E (Hartree)
0 100 200 0 100 200 0 100 200 0 100 200 0 100 200
0.
Iteration Iteration Iteration Iteration Iteration
-14.8 0

0.
-15

-15.2
Final Exp. Result
-15.4
Exact
-15.6
0 50 100 150 200 250
Iteration A. Kandala, A. Mezzacapo, et al,
Nature 549, 242-246 (2017)
Application to quantum chemistry : H2

HA: 1s1 HB: 1s1


4 spin orbitals mapped to 2 qubits
-0.6 d=4 Å
Equilibrium d = 0.735 Å
-0.8
H = (-1.05237)II+(0.39735)ZI+(0.39735)IZ+

Energy (Hartree)
(0.11279)ZZ+(0.18093)XX -1
d=0.735 Å
Dissociation d = 4 Å -1.2

H = (-0.70461)II+(0.00012)ZI+(0.00012)IZ+ -1.4
(1.6673e-10)ZZ+(0.33438)XX
-1.6

-1.8

0 100 200 300 400 500


Trial Step
Application to quantum chemistry : H2

HA: 1s1 HB: 1s1 0.4


100
4 spin orbitals mapped to 2 qubits Q6 Q1
0.2
50
Equilibrium d = 0.735 Å
0 Q5 Q4 Q3
0
H = (-1.05237)II+(0.39735)ZI+(0.39735)IZ+

Energy (Hartree)

C
R
2-
(0.11279)ZZ+(0.18093)XX -0.2

4
Q7 Q2

-0.4 H H
Dissociation d = 4 Å
-0.6
H = (-0.70461)II+(0.00012)ZI+(0.00012)IZ+
(1.6673e-10)ZZ+(0.33438)XX
-0.8

-1
a
-1.2
0 1 2 3 4
Interatomic distance (Angstrom)
IBM Quantum

Application to quantum chemistry : Going beyond period 1 ....


XZXZ XXXX
ZZZZ XZZX
-0.0026669416291266101 0.02892604472017965 ZXZX XXZX
0.080333850925909334 -0.0012708408559466877
XZII XXII -0.0074989926703520624
IIII -0.0093271960584065342
-0.012585096432460004 -0.029639606309848882 XIZX
-0.20665748323683217 ZXII
II XIII IXII 0.0012708408559466877
ZIII 0.0027917513494058743 YYZX
-1.05237 0.012585096432460002 0.0027917513494058743 IZZX
-0.096022179507889355 IIZX 0.0074989926703520624
ZI IIXZ IIXX 0.0080251584900907554
ZZII -0.0027917513494058726
0.39735 0.012585096432460008 -0.029639606309848868
-0.20612801807987652 ZIZX
IZ IIXI IIIX ZZZX
IZII -0.016781393784256322
0.39735 0.012585096432460006 0.0027917513494058743 0.009769353678915493
0.36474560607027956 ZIIX
ZZ XIXX XXZZ
IIZI XZXI 0.016781393784256322
0.11279 -0.0081947444613071196 -0.0028953260749665956 ZXXZ
0.096022179507889077 -0.0026669416291266101 ZXZI
XIIX XXZI
IIZZ XIXZ -0.016781393784256322 -0.001270840855946688
-0.0012708408559466877 -0.03915481859276021 ZXXI
-0.20612801807987641 0.0026669416291266101 IXZI
XX XXXI XXIZ -0.001270840855946688
IIIZ XIXI -0.016781393784256322
0.18093 -0.0081947444613071196 0.024279988585959714 ZXIZ
-0.36474560607027956 0.0026669416291266101 ZXIX
XXIX IXZZ 0.0080251584900907554
ZIZI XZIZ 0.0093271960584065342 -0.0097693536789154965
H2: 5 Pauli -0.14543788191435422 0.0072647375176923996
XIIZ
0.0074989926703520624
IXXI
IXZX
-0.0093271960584065342
IXIZ
ZIZZ 0.0080251584900907554 ZXXX
terms, 2 sets 0.056040328985617657 -0.0072647375176923996
IZXZ
-0.001270840855946688
IXXX YYXZ 0.0074989926703520624
ZIIZ XZZZ
0.0072647375176923988 0.0074989926703520624 - 0.0081947444613071196
0.11081066572357191
IZXI IXIX 0.00024654966581589405 YYXI ZXYY
ZZZI
0.0072647375176923988 0.0093271960584065342 XZZI 0.0081947444613071196 -0.0074989926703520624
-0.056040328985617643
ZZIZ -0.011962198277325331
0.063672720404946023 XIZI YYYY XXXZ
IZZI ZZXZ ZZXX 0.011962198277325331 0.02892604472017965 -0.0081947444613071196
0.11081066572357193 -0.0028953260749665956 XIZZ YYII IXXZ
0.000246549665815894
IZZZ ZIXZ ZIXX 0.00024654966581589405 0.029639606309848882 -0.001270840855946688
-0.063672720404946037 -0.011962198277325331 0.039154818592760203 IIYY
YYZZ
IZIZ ZIXI ZZIX 0.029639606309848868
0.0028953260749665956 ZZYY
-0.095215796658694896 -0.011962198277325331 -0.009769353678915493 YYZI 0.0028953260749665956
ZZXI IZXX 0.03915481859276021 ZZYY ZIYY
0.000246549665815894 -0.02427998858595971
YYIZ 0.0028953260749665956 -0.039154818592760203
XZXX IZIX
-0.024279988585959714 ZIYY IZYY
0.0081947444613071196 -0.0080251584900907554
XZIX YYXX -0.039154818592760203 0.02427998858595971
0.0012708408559466877 -0.02892604472017965 XZYY IZYY
YYIX XXYY 0.02427998858595971
-0.0081947444613071196
-0.0074989926703520624 -0.02892604472017965
XIYY
IXYY
59 -0.0074989926703520624
0.0081947444613071196
LiH: 100 Pauli terms,
© 2017 IBM25 sets
Corporation
IBM Quantum

VQE for quantum chemistry

0.4 -6.6 -12


100 40
40
Q6 Q1 Q6 Q1 Q6 Q1
0.2 -6.8 -12.5

C
5
C
50 20

6-

R
R
20

1-
R
1-

3
3
CR2-1

CR2-1
0 Q5 Q4 Q3 Q5 Q4 Q3 Q5 CR4-5 Q4 Q3
0 -7 0 -13
0

Energy (Hartree)
Energy (Hartree)

Energy (Hartree)
C

C
R

R
2-

2-

2-
-0.2
4

4
Q7 Q2 Q7 Q2 -13.5 Q7 Q2
-7.2
H H Be
-0.4 H H
-14
-7.4 Li H
-0.6
-14.5
-7.6
-0.8
-15
-1 -7.8
a b -15.5 c
-1.2 -8
0 1 2 3 4 1 2 3 4 5 1 2 3 4 5
Interatomic distance (Angstrom) Interatomic distance (Angstrom) Interatomic distance (Angstrom)
H2: 2 qubits LiH: 4 qubits BeH2: 6 qubits
5 pauli terms, 2 sets 100 pauli terms, 25 sets 165 pauli terms, 44 sets

• Decoherence • Accuracy of the classical


• Sampling error optimizer A. Kandala, A. Mezzacapo, et al,
60 • Limited iterations • Insufficient depth Nature 549, 242-246 (2017)
© 2017 IBM Corporation
IBM Quantum
Performance trade-off: Decoherence v/s Circuit depth

10 0
Entanglers: 0
Entanglers: 1
Entanglers: 2
Entanglers: 3
Entanglers: 4
10 -1 Entanglers: 6
Entanglers: 8
Energy Error

10 -2

Chemical accuracy

10 -3

-4
10
10 -6 10 -5 10 -4 10 -3 10 -2
Noise Strength
A. Kandala, A. Mezzacapo, et al,
61 Nature 549, 242-246 (2017)
© 2017 IBM Corporation
The longitude problem IBM Quantum

H1 H2 H3 H4
1730-1735 1737-1739 1740-1759 1755-1759
Invention of
Bimetallic strip
62 http://collections.rmg.co.uk
© 2017 IBM Corporation
Error mitigation
IBM Quantum

Zero-noise extrapolation
Expectation value of observable of interest:
n
X
⇤ k
EK ( ) = E + ak + Rn+1 ( , L, T )
k=1
Assume experimentalist has exquisite control over incoherent noise (T1, T2)
EK ( ) = E ⇤ + aK + O( 2 )
⇤ 2 2
EK (c ) = E + aK c + O(c )
2 cEK ( ) EK (c ) ⇤ 2
ÊK ( )= = E + O( )
c 1
N
With N measurements, can reduce error in estimate to O( )
How
64
does one measure E(ci ) ?? © 2017 IBM Corporation
IBM Quantum

When two wrong’s make a right


Amplifying noise strength equivalent to to rescaling dynamics under the assumption of
time invariant noise.

65 © 2017 IBM Corporation


IBM Quantum

Error Mitigation: 1Q trajectory

|1> |1> |1>


1 1

0.5 0.5

0 0

-0.5 -0.5

-1 -1
1 1

0 0 0
-0.5 -1 -1 -0.5
0 0 -0.5 0
0.5
|0> |0>
0.5 0.5 -1
|0>
-1 1 -1 1 1

66 © 2017 IBM Corporation


IBM Quantum

Error Mitigation in molecular simulation: 4Q LiH

Li H Li H

Kandala et al Kandala et al
Nature
67 549, 242-246 (2017) Nature 567, 491–495 (2019) © 2017 IBM Corporation
IBM Quantum

What we’ve covered today

0.4 -6.6 -12


100 40
40
Q6 Q1 Q6 Q1 Q6 Q1
0.2 -6.8 -12.5

C
5
C
50 20

6-

R
R
20

1-
R
1-

3
3
CR2-1

CR2-1
0 Q5 Q4 Q3 Q5 Q4 Q3 Q5 CR4-5 Q4 Q3
0 -7 0 -13
0

Energy (Hartree)
Energy (Hartree)

Energy (Hartree)
Techniques go
C

C
R

R
2-

2-

2-
-0.2
4

4
Q7 Q2 Q7 Q2 -13.5 Q7 Q2
-7.2
H H Be

beyond just
-0.4 H H
-14
-7.4 Li H
-0.6

chemistry …
-14.5
-7.6
-0.8
-15
-1 -7.8
a b -15.5 c
-1.2 -8
0 1 2 3 4 1 2 3 4 5 1 2 3 4 5
Interatomic distance (Angstrom) Interatomic distance (Angstrom) Interatomic distance (Angstrom)
68 © 2017 IBM Corporation
THANK YOU

You might also like