scieee Open visual document viewer

Classes of Quantum Complexity

Lobillo Olmedo, Javier

Abstract

This work aims to ensure a digital functioning of the world of trading cards that we are already familiar with. For this purpose, a significant portion of the functions associated with trading cards has been transferred to the application, such as acquiring or exchanging them. The developed functions are comprehensive, starting with organized storage by collections. With this feature, users will be able to track which cars from a collection they possess and which ones they are missing. As a result, users can search for collections to subscribe to and begin collecting. The method for obtaining new cards is based on exchanges with other users or purchasing packs. These packs offer 3 cards from the selected collection and can be bought using coins that can be earned by answering questions correctly. Everything related to the cards and collections is created, modified, or deleted by the creators, who have their own panel to interact with their creations. The application is designed to be used in a web browser on our computer, developed using HTML/PHP, and with an SQL database.

Full text

Classes o Quan um Complexi y. Clases de complejidad cuán ica. Bachelo ’s hesis in Compu e Science Double majo in Compu e Science and Ma hema ics Facul ad de In o ma ica Uni e sidad Complu ense de Mad id Yea 2022-2023 Ja ie Lobillo Olmedo Supe ised by Albe o An onio del Ba io Ga cía and Angelo Lucia Con en s Acknowledgemen s Abs ac ii Resumen ix In oduc ion xi I A model o Quan um Mechanics 1 I.1 B a-Ke and s a e space . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 II Classical and quan um ci cui s 5 II.1 ClassicalCi cui s............................... 5 II.2 Quan umCi cui s .............................. 14 III Sho ’s Algo i hm 25 III.1 Some Quan um Algo i hms . . . . . . . . . . . . . . . . . . . . . . . . . 25 III.2Pe iodici y .................................. 31 III.3 Fac o ing as pe iod inding . . . . . . . . . . . . . . . . . . . . . . . . . . 38 IV Real Wo ld Implemen a ions 43 IV.1 Sho ’s Algo i hm implemen a ion . . . . . . . . . . . . . . . . . . . . . . 43 IV.2QFTimplemen a ion............................. 46 Resul s 55 iii Acknowledgemen s To my mo he , and o hose who a e no he e ei he , o aking ca e o me e e yday. To my u o s, Albe o and Ángelo, o hei pa ience and guidance. To Se gio, my iend and pa ne in many ad en u es h oughou hese yea s in uni e si y. To my amily and iends, o suppo ing me and lo ing me. Abs ac This bachelo ’s hesis is abou quan um complexi y classes, which a e he quan um analogues o classical complexi y classes. We s a by in oducing he basic ma hema ical concep s ha suppo quan um compu ing, such as he b a-ke no a ion, he s a e space, and he quan um ga es. Then, in he second chap e , we s udy some classical complexi y heo y, such as classical complexi y classes and he P s NP p oblem. A e wa ds, we in oduce he quan um complexi y classes, and we s udy he ela ionship be ween hem and he classical complexi y ones, specially he ela ionship be ween BPP, BQP and PSPACE. We see ha one is con ained in he nex one. In he hi d chap e we s udy some quan um algo i hms, such as Deu sch’s algo i hm, Simon’s algo i hm, and Sho ’s algo i hm. We show appa en di e ences be ween he classical and he quan um wo ld, such as he ac ha quan um compu e s can sol e he ac o ing p oblem in polynomial ime, while classical compu e s a e no known o be able o do so. Finally, in he ou h chap e , we implemen Sho ’s algo i hm in se e al quan um simula o s, and we s udy how i wo ks in p ac ice, compa ing he di e en backends. Addi ionally, we implemen he quan um Fou ie ans o m and un i in di e en eal quan um backends. Keywo ds: Quan um Compu ing, Quan um Algo i hms, Complexi y Theo y, BPP, BQP, QFT, Sho ’s Algo i hm. ii Resumen Es e abajo de in de g ado a a sob e las clases de complejidad cuán ica, que son el análogo cuán ico de las clases de complejidad clásica. Empezamos en el p ime capí ulo in oduciendo los concep os ma emá icos básicos que sus en an la compu ación cuán ica, como la no ación b a-ke , el espacio de es ados y las pue as cuán icas. Después, en el segundo capí ulo, es udiamos algo de eo ía de complejidad clásica, como las clases de complejidad clásicas y el p oblema P s NP. Después in oducimos las clases de complejidad cuán icas, y es udiamos la elación en e ellas y las clases de complejidad clásicas, especialmen e la elación en e BPP, BQP y PSPACE, iendo que una es á con enida en la siguien e. En el e ce capí ulo es udiamos algunos algo i mos cuán icos, como el algo i mo de Deu sch, el algo i mo de Simon y el algo i mo de Sho . Mos amos di e encias apa en es en e el mundo clásico y el mundo cuán ico, como el hecho de que los o denado es cuán icos pueden esol e el p oblema de ac o ización de un nume o na u al en iempo polinomial, mien as que los o denado es clásicos no se sabe que puedan hace lo. Finalmen e, en el cua o capí ulo, log amos implemen a el algo i mo de Sho en a ios simulado es cuán icos, y es udiamos cómo unciona en la p ác ica, compa ando los di e en es backends. Además, implemen amos la ans o mada cuán ica de Fou ie y la ejecu amos en a ios o denado es cuán icos eales. Palab as cla e: Compu ación Cuán ica, Algo i mos Cuán icos, BPP, BQP, Teo ía de la Complejidad, QFT, Algo i mo de Sho . ix 2 I.1. B a-Ke and s a e space De ini ion I.1.4. A ay is an equi alence class o ec o s de ined by he nex equi alence ela ion: |x⟩∼|y⟩i and only i |x⟩=α|y⟩ o some α∈Cwi h α= 0. We will choose a ep esen a i e o he equi alence class, x, such ha ⟨x|x⟩= 1. Now, he s a e space ha we will conside as a model o quan um compu a ion will be he se o all ays in Cn, o p ojec i e Hilbe space. De ini ion I.1.5. As a e is a no malized ay in a Hilbe space. I is impo an o no e ha he o e all phase o a s a e is i ele an : |x⟩and eiθ |x⟩ desc ibe he same s a e, whe e θ∈Rand |eiθ|= 1. De ini ion I.1.6. Aqubi is an isola ed quan um sys em wi h a wo-dimensional s a e space. We wil usually ix an o hono mal basis {|0⟩,|1⟩} o he s a e space o a qubi . The e o e, a s a e o a qubi is o he o m |ψ⟩=α|0⟩+β|1⟩wi h α, β ∈Cand |α|2+|β|2= 1. Now ha we ha e de ined an n-dimensional Hilbe space, and we ha e ou small elemen s, called qubi s, om which we will build ou la ge Hilbe spaces, we need o p o ide a way o cons uc ing his la ge sys ems om ou smalle b icks. P oposición I.1.7. Le H1, H2be wo Hilbe spaces wi h o hono mal bases {|ui⟩}i∈Iand {| j⟩}j∈J espec i ely. Then, H1⊗H2is a Hilbe space wi h o hono mal basis {|ui⟩ ⊗ | j⟩}(i,j)∈I×J. Once we ha e ound ou sel es in a p ojec i e Hilbe space, we will need ways o ope a e inside i . This is done h ough uni a y ope a o s, which will ac as he ga es o ou quan um ci cui s. De ini ion I.1.8. Auni a y ope a o Uon a Hilbe space His a linea ope a o o ma ix U:H→Hsuch ha U†U=UU†I, whe e U†is he adjoin o U, and Iis he iden i y ope a o . The eason we use uni a y ope a o s is ha hey p ese e he no m o he ec o s, and he e o e hey ake ep esen a i es o he ays (o no m 1) o ep esen a i es o ays. P oposición I.1.9. Le H1, H2be wo Hilbe spaces wi h o hono mal bases {|ui⟩}i∈Iand {| j⟩}j∈J espec i ely, and le U1and U2be uni a y ope a o s on H1and H2 espec i ely. Then, U1⊗U2is a uni a y ope a o on H1⊗H2gi en by U1⊗U2(|ui⟩⊗| j⟩) = U1|ui⟩⊗U2| j⟩. In addi ion, i we w i e he ma ices like U1= (uij), hen he ma ix ep esen a ion o U1⊗U2is gi en by U1⊗U2= (uijU2). I. A model o Quan um Mechanics 3 Las ly, we need o de ine wha a measu emen is. This is he way we will ex ac in o ma ion om ou quan um sys em. De ini ion I.1.10. We say ha he compu a ional measu emen o a quan um s a e sys em o dimension N= 2nwi h s a e |ψ⟩= N−1 X i=0 αi|i⟩, is a disc e e andom a iable such ha P(X=|i⟩) = |αi|2. Now we should men ion some uni a y ope a o s ha will be use ul o us in he u u e. De ini ion I.1.11. The Hadama d ga e is he uni a y ope a o on a qubi gi en by H=1 √21 1 1−1. De ini ion I.1.12. The con olled-no ga e is he uni a y ope a o on wo qubi s gi en by CNOT =    1 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0     . De ini ion I.1.13. The SWAP ga e is he uni a y ope a o on wo qubi s gi en by SWAP =    1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1     . De ini ion I.1.14. The Pauli-X ga e is he uni a y ope a o on a qubi gi en by X=0 1 1 0. The Pauli-Y ga e is he uni a y ope a o on a qubi gi en by Y=0−i i0. The Pauli-Z ga e is he uni a y ope a o on a qubi gi en by Z=1 0 0−1. Chap e II Classical and quan um ci cui s In his chap e we will p ecise ou model o quan um compu ing, we will poin ou some basic p ope ies o he model, and a e wa ds we will in es iga e he powe o he model. In o de o do so in he second pa o he chap e , we ha e o begin, in he i s chap e , wi h he s udy o wha a classical compu e does. This chap e is based on he i h chap e o [5]. II.1 Classical Ci cui s We s a wi h he de ini ion o a classical compu e ocusing on wha i does. La e in he subsec ion his will ansla e his o wha i is in e ms o ci cui s. Uni e sal ga es De ini ion II.1.1. A (de e minis ic) classical compu e e alua es a unc ion :{0,1}n→ {0,1}m, which akes n-bi s o inpu and p oduces m-bi s o ou pu . A unc ion wi h an m-bi ou pu can be seen as a unc ion wi h m unc ions wi h a 1-bi ou pu . The e o e, we can assume ha m= 1. This p oduces he ollowing de ini ion: De ini ion II.1.2. A Boolean unc ion is a unc ion :{0,1}n→ {0,1}, which akes n-bi s o inpu and p oduces 1-bi o ou pu . We may hink o one Boolean unc ions as a bina y s ing o leng h 2n, whe e each bi is he ou pu (x)o he unc ion o one o he 2npossible inpu s x. I is clea ha he e a e 22ndi e en Boolean unc ions o n a iables, which is a e y la ge numbe . Fo example, o n= 5 he e a e 225= 232 = 4,294,967,296 di e en Boolean unc ions. 5 6 II.1. Classical Ci cui s De ini ion II.1.3. We say ha a Boolean unc ion accep s an n-bi s ing xi (x)=1, and ejec s xi (x)=0. The e o e we may ega d a Boolean unc ion as he subse Σcon aining all he accep ed s ings. The e alua ion o a Boolean unc ion can be educed o a sequence o simple logical ope a ions. To see how, we deno e he n-bi s ings accep ed by as Σ = x(1), x(2), x(3), . . ., and no e ha o a gi en x(a)we can de ine a unc ion (a):{0,1}n→ {0,1}, x 7→ (1i x=x(a) 0o he wise, which accep s only x(a). Then we can w i e as (x) = (1)(x)∨ (2)(x)∨ (3)(x)∨. . . , whe e ∨deno es he logical OR ope a ion. In bina y a i hme ic, he OR ope a ion may be ep esen ed x∨y=x+y−x·y, which has he alue 0i xand ya e bo h 0, and 1o he wise. Now, we conside he e alua ion o (a). We may exp ess he n-bi s ing x(a)as x(a)=x(a) n−1x(a) n−2. . . x(a) 1x(a) 0. I x(a)= 11 . . . 1, we may simply w i e (a)(x) = xn−1∧xn−2∧···∧x1∧x0, whe e ∧deno es he logical AND ope a ion. In bina y a i hme ic, he AND ope a ion is he p oduc x∧y=x·y. I x(a)has a 0in he i- h posi ion, we may apply he NOT (¬) ope a ion o he i- h bi o x, and hen w i e (a)as he same exp ession as abo e. In bina y a i hme ic, he NOT ope a ion is he sub ac ion ¬x= 1 −x. Fo example (a)(x) = . . . (¬x3)∧x2∧(¬x1)∧x0, i x(a)=. . . 0101. We ha e now cons uc ed he unc ion o m h ee elemen a y logical ope a ions: NOT, AND and OR. The exp ession we ob ained is deno ed he disjunc i e no mal o m o . O cou se, we ha e implici ly used ano he ope a ion INPUT(xi) which inpu s he i- h bi o x. II. Classical and quan um ci cui s 7 Now we a e eady o ans o m he de ini ion o a unc ion o ha o a ci cui model o classical compu a ion. A compu a ion is a ini e sequence o elemen a y ope a ions, aci cui , applied o a speci y inpu . Each ope a ion is called a ga e. The esul o he compu a ion is he inal alue o he emaining bi s a e he las ga e has been applied. Fo a Boolean unc ion, he e is only one ou pu bi . A ci cui can be seen as a di ec ed acyclic g aph, whe e each node is a ga e and he di ec ed edges ep esen he low o bi s h oughou he ci cui , wi h he di ec ion speci ying he o de in which he ga es a e applied. Finally, we say ha he ga e se {NOT, AND, OR, INPUT} is uni e sal o classical compu a ion, which means ha any unc ion may be compu ed by building a ci cui om only hese ga es. I is a ema kable ac ha any a bi a y compu a ion can be pe o med using such simple building blocks. Mos unc ions equi e la ge ci cui s Ou p e ious DNF cons uc ion shows ha any Boolean unc ion can be e alua ed wi h no mo e ha 2nOR ga es, n2nAND ga es, n2nNOT ga es and n2nINPUT ga es, wi h a o al o (3n+ 1)2nga es. Al hough some Boolean unc ions can be compu ed wi h a smalle numbe o ga es, i is clea ha mos unc ions equi e an exponen ially la ge (in n) numbe o ga es. How many ci cui s a e he e wi h Gga es ac ing on a n-bi inpu ? Conside ing he ga e se om which we cons uc ed he DNF, we will also allow impu ing o a cons an bi (ei he 0o 1) as an inpu . The e o e he e a e n+ 5 di e en ga es: AND, OR, NOT, INPUT(0), INPUT(1) and INPUT(xi) o i= 0,1, . . . , n −1. Each wo-bi ga e ac s on a pai o bi s which a e ou pu s o p e ious ga es, and he e a e G such ga es, so his pai can be chosen in ewe ha G2ways. The e o e, he o al numbe o size-Gci cui s is a mos Nci cui (G)≤((n+ 5)G2)G. I we ake G=c2n 2nwhe e cis a cons an independen o n, hen log2Nci cui (G)≤G(log2(n+ 5) + 2 log2G) = c2n1 + 1 2nlog2c2(n+ 5) 4n2≤c2n, whe e he second inequali y holds o nsu icien ly la ge. Compa ing wi h he numbe o Boolean unc ions, N unc ion(n) = 22n, we see ha log2Nci cui (G) N unc ion(n)≤c2n−2n= (c−1)2n, o nsu icien ly la ge. The e o e, o any c < 1, he numbe o ci cui s is smalle han he numbe o unc ions by a huge ac o . Al hough we did his analysis o one pa icula 8 II.1. Classical Ci cui s uni e sal ga e se , he esul would ha e no been e y di e en o any o he uni e sal ga e se . We conclude ha o any ε > 0 hen mos Boolean unc ions equi e ci cui s o size a leas (1 −ε)2n 2nga es. The ci cui size is so la ge because mos unc ions ha e no s uc u e ha can be exploi ed o cons uc a mo e compac ci cui . We basically canno do much be e han consul ing a “look-up able” o he unc ion alues o all possible inpu s, which is essen ially wha he DNF cons uc ion does. Ci cui complexi y So a we ha e only conside ed a compu a ion ha ac s on a ixed inpu (consis ing o n bi s), bu we may also conside amilies o ci cui s ha ac on inpu s o di e en leng hs. Ci cui amilies p o ide a use ul scheme o analyzing and classi ying he complexi y o compu a ions, a scheme ha will ha e a na u al gene aliza ion o quan um compu a ion. Boolean unc ions a ise na u ally in he s udy o compu a ional complexi y. A Boolean unc ion is said o encode he solu ion o a “decision p oblem” - he unc ion examines he inpu and e u ns 1i he answe is “yes” and 0i he answe is “no”. O en wha migh no be s a ed colloquially as a decision p oblem can be e o mula ed as one. Fo example, he unc ion ha de ines he FACTORING p oblem is (x, y) = (1i in ege xhas a ac o zsuch ha 1< z < y, 0o he wise. Knowing (x, y) o all xand yis equi alen o knowing he comple e ac o iza ion o x. Ano he example o a decision p oblem is he HAMILTONIAN PATH p oblem: le he inpu be an l- e ex g aph, ep esen ed by i s l×ladjacency ma ix (a 1in he i, j en y means ha he e is an edge be ween e ices iand j). The unc ion is (x) = (1i he g aph has a Hamil onian pa h, 0o he wise. A Hamil onian pa h is a pa h ha isi s each e ex exac ly once. Fo he FACTORING p oblem he size o he inpu is he numbe o bi s needed o ep esen he in ege s xand y, while o he HAMILTONIAN PATH p oblem he size o he inpu is he numbe o bi s needed o ep esen he adjacency ma ix. The e o e each p oblem eally de ines a amily o Boolean unc ions wi h a iable inpu size. We deno e such a unc ion amily as :{0,1}∗→ {0,1}, whe e {0,1}∗is he se o all ini e bi s ings. When xis an n-bi s ing, by w i ing (x) we mean he Boolean unc ion in he amily ha co esponds o he inpu size n. The se Lo s ings accep ed by a unc ion amily L={x∈ {0,1}∗: (x)=1}, II. Classical and quan um ci cui s 9 is called a language. We can quan i y he ha dness o a p oblem by s a ing how he compu a ional esou ces equi ed o sol e i scale wi h he size o he inpu n. In he ci cui model o compu a ion, i is na u al o use he numbe o ga es as a measu e o he compu a ional esou ces equi ed. Al e na i ely we could be in e es ed in how much ime i akes o do he compu a ion i many ga es can be execu ed in pa allel; he dep h o he ci cui is he numbe o ime s eps equi ed, assuming ha ga es ac ing on dis inc bi s can be execu ed in pa allel ( ha is, he dep h is he maximum leng h o a di ec ed pa h om he inpu o he ou pu o he ci cui ). The wid h o he ci cui is he maximum numbe o ga es ha in any one ime s ep, and quan i ies he s o age space equi ed o do he compu a ion. We wan o di ide he decision p oblems in wo classes: easy and ha d. Howe e i is no possible o gi e a p ecise de ini ion o wha easy and ha d should be. We will conside decision p oblems wi h a iable inpu size and we will examine how he size o he ci cui ha sol es he p oblem scales wi h he inpu size. I we use he scaling beha io o a ci cui amily o cha ac e ize he complexi y o a p oblem, he e is a sub le y ha we mus add ess. I would be chea ing o hide he di icul y o he p oblem in he design o he ci cui . The e o e we should es ic a en ion o ci cui amilies ha ha e accep able “uni o mi y” p ope ies - i mus be “easy” o cons uc he ci cui wi h n+ 1 bi s o inpu once we ha e cons uc ed he ci cui wi h an n-bi inpu . Associa ed wi h a amily o unc ions { n}(whe e nhas n-bi inpu ) is a amily o ci cui s {Cn}whe e Cnis a ci cui ha compu es n. De ini ion II.1.4. We say ha a ci cui amily {Cn}is polynomial-size uni o m i he size |Cn|o he ci cui Cng ows wi h nno as e han a powe o n, |Cn| ≤ poly(n), whe e poly deno es a polynomial. Then we na u ally de ine: De ini ion II.1.5. Pis he se o decision p oblems ha can be sol ed by a polynomial-size uni o m ci cui amily. Now, he na u al choice is o de ine p oblems in Pas “easy” and p oblems no in Pas “ha d”. No ice ha Cncompu es n(x) o e e y possible n-bi inpu x, and he e o e, i a decision p oblem is in Pwe can ind he answe o he p oblem e en o he “wo s -case” inpu using a ci cui o size no g ea e han poly(n). As no ed be o e, we implici ly assume ha he ci cui amily is “uni o m” so ha he design o he ci cui can i sel be sol ed by a polynomial- ime algo i hm. Unde his assump ion, sol abili y in polynomial ime by a ci cui amily is equi alen o sol abili y in polynomial ime by a uni e sal Tu ing machine. O cou se, o de e mine he size o a ci cui ha compu es n, we mus know wha he elemen a y componen s o he ci cui a e. Fo una ely, hough, i u ns ou ha he p ecise choice o elemen a y componen s does no ma e . We can use any uni e sal se o ga es 10 II.1. Classical Ci cui s o e icien ly simula e any o he uni e sal se o ga es, as long as he ga e se is ini e and each ga e ac on a cons an numbe o bi s. The way o dis inguishing be ween easy and ha d p oblems migh seem a he a bi a y. I |Cn| ∼ n1000 we migh conside he p oblem o be in ac able in p ac ice, e en hough i is in P. On he o he hand, i |Cn| ∼ nlog log log nwe migh conside he p oblem o be easy in p ac ice, al hough he scaling is “supe polynomial”. Fu he mo e, e en i |Cn|scales like a modes powe o n, he cons an ac o in on o he powe migh be so la ge ha he ci cui is oo big o be p ac ical. Ne e heless, such pa hological cases a e a e, and he dis inc ion be ween easy and ha d p oblems is use ul in p ac ice. O pa icula in e es a e decision p oblems ha can be answe ed by p o iding an example o a solu ion ha is easy o check. Fo example, gi en xand y < x, i is ha d (in he wo s case) o de e mine i xhas a ac o less han y, bu i we a e gi en a ac o z < y o x, i is easy o check ha zis indeed a ac o o x. Simila ly i is ha d o ind a Hamil onian pa h in a g aph, bu i we a e gi en a Hamil onian pa h, i is easy o check ha i is indeed a Hamil onian pa h. The concep o a p oblem ha is ha d o sol e bu a gi en solu ion can be easily checked is o malized as ollows: De ini ion II.1.6. A language Lis in he class NP i and only i he e is a polynomial-size e i ie V(x, y)such ha : (1) I x∈L, hen he e exis s ysuch ha V(x, y)=1(comple eness). (2) I x /∈L, hen o all y,V(x, y)=0(soundness). The e i ie Vis he uni o m ci cui amily ha decides L. Comple eness means ha i xis in he language, hen he e is a “wi ness” ysuch ha he e i ie accep s he inpu i he wi ness is p o ided. Soundness means ha i xis no in he language, hen no ma e wha wi ness is p o ided, he e i ie ejec s he inpu . I is immplici ha he wi ness is o polynomial leng h since he e i ie has a polynomial numbe o ga es, including inpu ga es. NP s ands o “nonde e minis ic polynomial ime”, name which is used o his o ical easons. The name comes om he ac ha he e i ie Vcan be hough o as a nonde e minis ic Tu ing machine ha guesses he wi ness yand hen checks ha i is co ec in polynomial ime. I is easy o see ha P⊆NP. I Lis in P, hen he e is a polynomial-size ci cui C ha decides Lwi hou any wi ness wha soe e . Ne e heless, he e a e p oblems in NP ha a e no known o be in P. Na u ally a ises he conjec u e upon which he much o he ield o complexi y heo y is based: Conjec u e: P=NP. I his conjec u e was alse, ha is i P=NP, ha would mean ha we could easily ind a solu ion o any p oblem whose solu ions a e easy o e i y. Fo example, we could disco e all ma hema ical heo ems which ha e sho p oo s. I P=NP, hen ou compu e s would II. Classical and quan um ci cui s 11 ne e achie e such powe and he me e exis ence o a succin p oo o a s a emen would no ensu e ha we could ind i in any easonable amoun o ime. An impo an example o a Boolean p oblem ha is in NP bu no known o be in Pis CIRCUIT-SAT. In his p oblem, he inpu is a Boolean ci cui Cand he ques ion is whe he he e is an inpu xsuch ha C(x)=1. The p oblem is in NP because i he answe is yes, hen we can p o ide he inpu xas a wi ness which can be easily checked as he ci cui C is o polynomial size. The p oblem is no known o be in Pbecause we do no know how o ind he inpu xin polynomial ime. In his case, he unc ion o be e alua ed is (C) = (1i he e exis s xsuch ha C(x)=1, 0o he wise. The p oblem CIRCUIT-SAT is pa icula ly impo an because i we ha e a machine ha sol es CIRCUIT-SAT in polynomial ime, hen we can use i o sol e any p oblem in NP in polynomial ime. We say ha e e y p oblem in NP us (e icien ly) educible o CIRCUIT- SAT. Mo e gene ally, we say ha p oblem B educes o p oblem Ai a machine ha sol es Acan be used o sol e Bas well. De ini ion II.1.7. I Aand Ba e Boolean unc ion amilies, hen B educes o Ai he e is a unc ion amily R, compu ed by polynomial-size ci cui s, such ha B(x) = A(R(x)) o all x. Wha his de ini ion says, in o he wo ds, is ha Baccep s xi and only i Aaccep s R(x). In pa icula , hen, i we ha e a polynomial-size ci cui amily ha sol es A, we can hook Aup wi h R o ob ain a polynomial-size ci cui amily ha sol es B. Thus, any p oblem Bcan be e ec i ely educed o CIRCUIT-SAT. This educ ion is possible because p oblem Bpossesses a polynomial-size e i ie V(x, y)which accep s xi and only i a alid wi ness yexis s, sa is ying V(x, y)=1. To cla i y, o each ixed x, he ques ion o whe he such a wi ness yexis s becomes an ins ance o CIRCUIT-SAT. Consequen ly, he exis ence o a poly-size ci cui amily capable o sol ing CIRCUIT-SAT would also imply he abili y o sol e p oblem Bby u ilizing he same ci cui amily. De ini ion II.1.8. We say a p oblem A∈NP is NP-comple e i e e y p oblem in NP educes o A. Wi h he abo e de ini ion, we can say ha CIRCUIT-SAT is NP-comple e. The NP- comple e p oblems a e he “ha des ” p oblems in NP in he sense ha i we can sol e any one o hem in polynomial ime, hen we can sol e e e y NP p oblem in polynomial ime. Fu he mo e, o show ha any p oblem is NP-comple e, i su ices o show ha i is in NP and ha i educes o any o he NP-comple e p oblem. In ac , i Cis any p oblem in NP and Bis NP-comple e, hen he e is a polynomial-size educ ion Rsuch ha C(x) = B(R(x)), and i Bis educ ible o A hen he e is ano he polynomial-size educ ion R′such ha B(y) = A(R′(y)). Hence C(x) = A(R′(R(x))) and, since he composi ion o wo polynomial-size ci cui s is also polynomial-size, we see ha an a bi a y p oblem Cin NP educes o A, and he e o e Ais NP-comple e. NP-comple eness is a use ul concep 18 II.2. Quan um Ci cui s The e o s cause he ac ual s a e o he quan um compu e o wande away om he ideal s a e. How a does i wande ? A e one s ep, he ideal s a e would be |φ1⟩=U1|φ0⟩, Bu i he ac ual ans o ma ion ˆ U1whe e applied ins ead, he s a e would be ˆ U1|φ0⟩=U1|φ0⟩+|E⟩1=|φ1⟩+|E1⟩, whe e |E1⟩= ( ˆ U1−U1)|φ0⟩, is an unno malized ec o . Al hough we could also suppose ha he ini ial s a e de ia es om |φ0⟩by some small e o ec o which con ibu es an adi ional e o o he compu a ion ha does no depend on he ci cui size, we will igno e his possibili y o we a e ying o unde s and how he e o scales wi h he ci cui size. Now i ˆ U deno es he ac ual ga e applied a s ep ,|ˆφ ⟩ he ac ual s a e o he compu e a e s ep , and |φ ⟩ he ideal s a e, hen we ha e |ˆφ ⟩=U |φ −1⟩+ ( ˆ U −U )|φ −1⟩+ˆ U (|ˆφ −1⟩−|φ −1⟩) =|φ ⟩+|E ⟩+ˆ U (|ˆφ −1⟩−|φ −1⟩), whe e |E ⟩= ( ˆ U −U )|φ −1⟩. Hence we ha e |ˆφ2⟩=ˆ U2|ˆφ1⟩=|φ2⟩+|E2⟩+ˆ U2|E1⟩, |ˆφ3⟩=ˆ U3|ˆφ2⟩=|φ3⟩+|E3⟩+ˆ U3|E2⟩+ˆ U3ˆ U2|E1⟩, and so on. We can see ha a e Ts eps we ob ain |ˆφT⟩=|φT⟩+|ET⟩+ˆ UT|ET−1⟩+ˆ UTˆ UT−1|ET−2⟩ +···+ˆ UTˆ UT−1. . . ˆ U2|E1⟩. The e o e we ha e exp essed he di e ence be ween |ˆφT⟩and |φT⟩as a sum o T emainde e ms. The wo s case e o is ob ained when he emainde e ms a e all lined up in he same di ec ion, so ha he e o s add up. The e o e we conclude ha ∥|ˆφT⟩−|φT⟩∥ ≤ ∥|ET⟩∥+∥|ET−1⟩∥+···+∥|E1⟩∥, whe e he no m o han uni a y ma ix is 1. Le ∥A∥sup deno e he sup no m o he ma ix A, ha is, he maximum o he eigen alues o √A†A. We hen ha e ∥|E ⟩∥ =∥(ˆ U −U )|φ −1⟩∥ ≤ ∥ˆ U −U ∥sup, since ∥|φ −1⟩∥ = 1. Now suppose ha , o each alue o , he e o in ou quan um ga e is bounded by ∥ˆ U −U ∥sup ≤ϵ;(II.1) II. Classical and quan um ci cui s 19 hen, a e Ts eps, he e o in he inal s a e is bounded by ∥|ˆφT⟩−|φT⟩∥ ≤ Tϵ. (II.2) In his sense, he accumula ed e o in he s a e g ows linea ly wi h he leng h o he compu a ion. The dis ance bounded in (II.1) can equi alen ly be exp essed as ∥W −I∥sup, whe e W =U† ˆ U . Since W is uni a y, i s eigen alues ha e uni modulus, and each one o hem is a phase eiθ , and he co esponding eigen alue o W −Ihas modulus |eiθ −1|= (2 −2 cos θ)1/2, so ha (II.1) is he equi emen ha each eigen alue sa is ies cos θ >1−ϵ2 2. o |θ |< ϵ o ϵ≪1. The o igin o equa ion (II.2) is clea . In each ime s ep, |ˆφ ⟩is o a ed by an angle o o de ϵa wo s , and he dis ance be ween e ec o inc eases by a mos o o de ϵ. How much accu acy is good enough? In he inal s ep o ou compu a ion, we pe o m an o hogonal measu emen , and he p obabili y o ob aining ou come a, in he ideal case, is pa=|⟨a|φT⟩|2. Because o he e o , he ac ual p obabili y is ˆpa=|⟨a|ˆφT⟩|2. I can be p o en, al hough we will no do so he e, ha he L1dis ance be ween he ideal and ac ual p obabili ies is bounded by 1 2∥ˆp−p∥1=1 2X a|ˆpa−pa| ≤ ∥|ˆφT⟩−|φT⟩∥ ≤ Tϵ. (II.3) The e o e, i we keep Tϵ ixed and small as Tinc eases, he e o in he p obabili y o he ou come will be ixed and small. I we use a quan um compu e o sol e a decision p oblem, we wan he ac ual quan um ci cui o ge he igh answe wi h p obabili y 1 2+ˆ δ, whe e ˆ δ > 0. I he ideal quan um ci cui has Tga es and success p obabili y 1 2+δwhe e δ > 0, hen eq. (II.3) shows ha ˆ δ is also posi i e p o ided ϵ < δ/T. We should be able o sol e ha d p oblems using quan um compu e s as long as we can imp o e he accu acy o he ga es linea ly wi h he ci cui size. This is s ill a demanding equi emen , since pe o ming e y accu a e quan um ga es is a daun ing challenge o he ha dwa e builde . Fo una ely, we will be able o show, using he heo y o quan um aul ole ance, ha physical ga es wi h cons an accu acy (independen o T) su ice o achie e logical ga es ac ing on encoded quan um s a es wi h accu acy imp o ing like 1/T, as is equi ed o uly scalable quan um compu ing. 20 II.2. Quan um Ci cui s BQP ⊂PSPACE A andomized classical compu e can simula e any quan um compu e i we g an he classical compu e enough ime and s o age size. Bu how much memo y does he classical compu e equi e? Nai ely, since he simula ion o an n-qubi ci cui in ol es manipula ing ma ices o size 2n, i may seem ha we need an amoun o memo y space exponen ial in n. Howe e , we will now show ha he classical simula ion o a quan um compu e can be done o accep able accu acy (al hough e y slowly indeed) in polynomial space. This means ha he quan um class BQP is con ained in he class PSPACE o p oblems ha can be sol ed wi h polynomial space on a classical compu e . The p ima y objec i e o he andomized classical simula ion is o gene a e samples om a p obabili y dis ibu ion ha closely app oxima es he dis ibu ion o measu emen ou comes o he gi en quan um ci cui . Rema kably, ou classical simula ion goes beyond me e sampling, as i ackles an e en mo e challenging ask – es ima ing he p obabili y p(a) o each po en ial ou come ao he inal measu emen , which can be exp essed p(a) = |⟨a|U|0⟩|2, whe e U=UTUT−1. . . U1, is a p oduc o Tquan um ga es. Each Ui, ac ing on he nqubi s, can be ep esen ed by a2n×2nuni a y ma ix, cha ac e ized by he complex ma ix elemen s ⟨y|U |x⟩, whe e x, y ∈ {0,1,...,2n−1}. W i ing ou he ma ix mul iplica ion explici ly we ha e ⟨a|U|0⟩=X {x : =1,...,T−1}⟨a|UT|xT−1⟩⟨xT−1|UT−1|xT−2⟩. . . ⟨x1|U1|0⟩.(II.4) Eq. (II.4) is a so o “pa h in eg al” ep esen a ion o he quan um compu a ion - he p obabili y ampli ude o he inal ou come ais exp essed as a cohe en sum o ampli udes o each o a as numbe 2n(T−1) o possible compu a ional pa hs ha begin a 0and e mina e a aa e Ts eps. Ou classical simula o is o add up he 2n(T−1) complex numbe s in eq. (II.4) o compu e ⟨a|U|0⟩. The i s p oblem we ace is ha ini e size classical ci cui s do in ege a i hme ic, while he ma ix elemen s ⟨y|UT|x⟩need no be a ional numbe s. The classical simula o mus he e o e se le o an app oxima e calcula ion o easonable accu acy. Each e m in he sum is a p oduc o Tcomplex ac o s, and he e a e 2n(T−1) e ms in he sum. The accumula ed e o in he sum is he e o e small i we exp ess he ma ix elemen s o an accu acy o mbi s, whe e mis a la ge numbe compa ed o nT log T. The e o e we can eplace each complex ma ix elemen by pai s o signed in ege s - he bina y expansions, each o leng h m, o he eal and imagina y pa s. Ou simula o will need o compu e each e m in he sum (II.4) and accumula e a o al o all he e ms. Howe e , each addi ion equi es only a modes amoun o sc a ch space, II. Classical and quan um ci cui s 21 and u he mo e, since we only need o s o age he accumula ed sum o an accu acy o m bi s, no much space is needed o sum all he e ms, e en hough he e a e exponen ially many o hem. The e o e i only emains o conside he e alua ion o a ypical e m in he sum, a p oduc o Tma ix elemen s. In o de o do his, we will need a classical ci cui ha compu es ⟨y|U |x⟩; his ci cui ecei es he 2n-bi inpu (x, y), and ou pu s he 2m-bi app oxima ion o he complex ma ix elemen . Gi en a ci cui ha pe o ms his unc ion, i will be easy o build a ci cui ha mul iplies he complex numbe s oge he wi hou using much space. This ask would be di icul i U we e an a bi a y 2n×2nuni a y ma ix. Howe e , we can exploi he p ope ies ha we demanded o ou quan um ga e se - he ga es om a disc e e se , and each ga e ac s on a bounded numbe o qubi s. Because he e a e a ixed ini e numbe o ga es, he e a e only a ixed numbe o ga e sub ou ines ha ou simula o needs o be able o call. And because each ga e ac s on a ew qubi s, nea ly all o i s ma ix elemen s anish (when nis la ge), and he alue ⟨y|U |x⟩can be compu ed o he equi ed accu acy by a simple ci cui equi ing only a small amoun o memo y. Fo example, in he case o a single qubi ac ing on he i s qubi , we ha e ⟨yn−1. . . y1y0|U |xn−1. . . x1x0⟩= 0 i yn−1. . . y1=xn−1. . . x1. A simple ci cui can compa e x1wi h y1,x2wi h y2, and so on, and i any o he bi s disag ee, he ci cui ou pu s 0. In he e en o an equali y, he ci cui ou pu s one o he ou complex numbe s ⟨y0|U |x0⟩, o mbi s o accu acy. A simple classical ci cui can encode he 8mbi s o his 2×2 complex- alued ma ix. Simila ly, a simple ci cui , equi ing only space polynomial in m, can e alua e he ma ix elemen s o any ga e o ixed size. We conclude hen, ha a classical compu e wi h memo y space scaling like nT log T can simula e a quan um ci cui wi h Tga es ac ing on nqubi s. I we wished o conside quan um ci cui s wi h supe polynomial size T, we would need a lo o memo y, bu o quan um ci cui amilies wi h size polynomial in n, a polynomial amoun o memo y su ices. We ha e he e o e p o ed ha BQP is con ained in PSPACE. Bu i is also e iden ha he simula ion is no e icien , as i equi es exponen ial ime, because we need o e alua e he sum o 2n(T−1) complex e ms (whe e each e m in he sum is a p oduc o Tcomplex numbe s). Though mos o hese e ms a e ze o, we s ill need o e alua e an exponen ial numbe o non anishing e ms. Mos uni a y ans o ma ions equi e la ge quan um ci cui s We saw ha any gi en Boolean unc ion can be compu ed by an exponen ial size classical ci cui , and also ha exponen ial size ci cui s a e equi ed o compu e mos unc ions. Wha a e he co esponding s a emen s abou uni a y ans o ma ions and quan um ci cui s? 22 II.2. Quan um Ci cui s We will no discuss how la ge a quan um ci cui su ices o compu e a gi en uni a y ans o ma ion, ocusing ins ead on showing ha quan um ci cui s wi h exponen ial size a e necessa y o compu e mos uni a y ans o ma ions. The ques ion abou quan um ci cui s is di e en han he co esponding ques ion abou classical ci cui s, because he e is a ini e se o Boolean unc ions ac ion on nbi s, bu he e is a con inuum o uni a y ans o ma ions ac ing on nqubi s. Since he quan um ci cui s a e coun able (i he quan um compu e ’s ga e se is ini e), and he uni a y ans o ma ions a e no , we canno each a bi a y uni a ies wi h ini e-size ci cui s. We will be sa is ied o accu a ely app oxima e an a bi a y uni a y. As no ed in ou discussion o quan um ci cui accu acy, o ensu e ha we ha e a good app oxima ion in he L1no m o he p obabili y dis ibu ion o any measu emen pe o med a e applying a uni a y ans o ma ion, i su ices o he ac ual uni a y ˜ U o be close o he ideal uni a y Uin he sup no m. The e o e we will say ha ˜ Uis δ-close o Ui ∥˜ U−U∥sup ≤δ. How la ge should he ci cui size Tbe i we wan o app oxima e any a bi a y n-qubi uni a y o accu acy δ? I we conside balls o adius δ(in he sup no m) cen e ed a each uni a y achie ed by some ci cui wi h Tga es, hen he balls should co e he uni a y g oup U(N), whe e N= 2n. The numbe Nballs o balls needed sa is ies Nballs ≥Vol(U(N)) Vol(δ−ball), whe e Vol(U(N)) is he olume o he uni a y g oup U(N)wi h espec o he sup no m and Vol(δ−ball)is he olume o a ball o adius δ. The geome y o U(N)is ac ually cu ed, bu we may sa ely app oxima e i by a la space and igno e ha sub le y - all we need o know is ha U(N)con ains a ball cen e ed a he iden i y wi h a small bu cons an edius C(independen o N). Igno ing he cu a u e, because U(N)has eal dimension N2, he olume o his ball (a lowe bound on he olume o U(N)) is ΩN2CN2, whe e ΩN2 deno es he olume o a uni ball in la space; likewise, he olume o a δ-ball is ΩN2δN2. The e o e we ha e ha Nballs ≥C δN2 . On he o he hand, i ou uni e sal ga e se con ains a cons an numbe Go quan um ga es (independen o n), and each ga e ac on no mo e han kqubi s, whe e kis a cons an , hen he numbe o ways o choose he quan um ga e a s ep is a mos Gn k= poly(n). The e o e he numbe NTo quan um ci cui s wi h Tga es ac ing on n-qubi s is a mos (poly(n))T. We conclude ha i we wan o each e e y elemen o U(N) o accu acy δwi h ci cui s o size T, hence NT≥Nballs, hen we mus ha e T≥22nlog(C/δ) log(poly(n)), i.e. he ci cui size mus be exponen ial in n. Wi h polynomial-size quan um ci cui s, we can II. Classical and quan um ci cui s 23 achie e a good app oxima ion o uni a ies ha occupy only an exponen ially small ac ion o he olume o U(N). Reaching any desi ed quan um s a e by applying a sui able quan um ci cui o a ixed ini ial (e.g., p oduc ) s a e is easie han eaching any desi ed uni a y, bu s ill ha d, because he olume o he 2n-dimensional n-qubi Hilbe space is exponen ial in n. The e o e, ci cui s wi h size exponen ial a e equi ed. Fu u e quan um enginee s will know he joy o explo ing Hilbe space, bu no ma e how powe ul hei echnology, mos quan um s a es will emain o e e ou o each. Chap e III Sho ’s Algo i hm The main goal o his chap e is o in oduce and explain he algo i hm Pe e Sho p esen ed o he wo ld in [9]. This chap e is based on he six h chap e o [5]. III.1 Some Quan um Algo i hms Al hough we a e no able o p o e ha BPP ⊊BQP, he e a e h ee app oaches ha we can ake o s udy he di e ences be ween he capabili ies o classical and quan um compu e s: (1) Nonexponen ial speedup. We can ind quan um algo i hms ha a e as e han he bes classical algo i hm, bu no exponen ially as e . These algo i hms shed no ligh on he con en ional classi ica ion o complexi y. Howe e hey do demons a e a ype o sepa a ion be ween asks ha classical and quan um compu e s can pe o m. Fo example, we can men ion G o e ’s quan um speedup o he sea ch o an unso ed da a base, as can be s udied in [4]. (2) “Rela i ized” exponen ial speedup. We can conside he p oblem o analyzing he con en s o a “quan um black box”. This is a de ice ha pe o ms an a p io i unknown uni a y ans o ma ion on an inpu s a e. We can p epa e said inpu o he box, and we can measu e he ou pu , bu we canno see inside he box. Ou ask is o ind wha he box does. I is possible o p o e ha quan um black boxes, o o acles, exis wi h his p ope y. By eeding quan um supe posi ions o he box, one can lea n wha is inside wi h an exponen ial speedup, ela i e o how long i would ake i we we e only allowed classical inpu s. We could say BQP ⊇BPP ela i e o he o acle. Fo example, we can men ion Simon’s exponen ial quan um speedup o inding he pe iod o a 2- o-1 unc ion. (3) Exponen ial speedup o “apa en ly” ha d p oblems. We can exhibi a quan um algo i hm ha sol es a p oblem in polynomial ime, whe e he p oblem appea s o be ha d o classical compu e s, so ha i is s ongly suspec ed ( hough no p o en) ha he p oblem is no in BPP. Fo example, we can men ion Sho ’s exponen ial quan um speedup o ac o ing in ege s. 25 26 III.1. Some Quan um Algo i hms Deu sch’s p oblem We will discuss examples o each o he h ee app oaches. Bu i s , we will in oduce a simple p oblem ha will be use ul o illus a ing he powe o quan um compu a ion. Deu sch’s algo i hm o dis inguishing be ween cons an and balanced unc ions :{0,1} → {0,1}. We a e p esen ed wi h a quan um black box ha compu es (x); ha is, i enac s he wo-qubi uni a y ans o ma ion U :|x⟩|y⟩→|x⟩|y⊕ (x)⟩, which lips he second qubi i and only i (x) = 1. Ou mission is o de e mine whe he (0) = (1) o no . I we a e es ic ed o he “classical” inpu s |0⟩and |1⟩, we need o access he box wice (x= 0 and x= 1) o ge he answe . Howe e i we a e allowed o inpu a cohe en supe posi ion o hese “classical” s a es, hen one is enough. The quan um ci cui ha sol es he p oblem is: Figu e III.1: Ci cui o Deu sch’s p oblem He e Hdeno es he Hadama d ans o m H:|x⟩ 7→ 1 √2X y (−1)xy |y⟩, o H:|0⟩ 7→ 1 √2(|0⟩+|1⟩), |1⟩ 7→ 1 √2(|0⟩−|1⟩), ha is, His he 2×2ma ix H: 1 √2 1 √2 1 √2−1 √2!. The ci cui akes he inpu |0⟩|1⟩ o |0⟩|1⟩ 7→ 1 2(|0⟩+|1⟩)(|0⟩−|1⟩) 7→ 1 2(−1) (0) |0⟩+ (−1) (1) |1⟩(|0⟩−|1⟩) 7→ 1 2(−1) (0) + (−1) (1)|0⟩ +(−1) (0) −(−1) (1)|1⟩1 √2(|0⟩−|1⟩). III. Sho ’s Algo i hm 27 Then when we measu e he i s qubi , we ind he ou come |0⟩wi h p obabili y one i (0) = (1) (cons an unc ion) and he ou come |1⟩ he p obabili y one i (0) = (1) (balanced unc ion). A quan um compu e enjoys an ad an age o e a classical compu e because i can use quan um pa allelism. Because we inpu a supe posi ion o |0⟩and |1⟩, he ou pu is sensi i e o bo h he alues o (0) and (1), e en hough we an he box jus once. Deu sch-Jozsa p oblem Now we will conside some gene aliza ions o Deu sch’s p oblem as was exposed in [3]. We will con inue o assume ha we a e o analyze a quan um o acle. Howe e , in he hope o lea ning some hing abou complexi y, we will imagine ha we ha e a amily o o acles, wi h a iable inpu size. We a e in e es ed in how he ime needed o ind ou wha is inside he box scales wi h he size o he inpu (whe e “ ime” is measu ed by how many imes we que y he box). In he Deu sch-Jozsa p oblem we a e p esen ed wi h a quan um o acle ha compu es a unc ion aking nbi s o 1, :{0,1}n→ {0,1}, and we ha e in good au ho i y ha is ei he cons an ( (x) = c∀x) o balanced ( (x) = 0 o exac ly hal o he inpu s). Ou mission is o de e mine which o he wo cases holds. In ac we can sol e his p oblem also wi h a single que y o he back box, using he same ci cui as o Deu ch’s p oblem, bu wi h ninpu qubi s ins ead o jus one. We no e ha i we apply nHadama d ga es in pa allel o nqubi s, H(n)=H⊗H⊗···⊗H, hen he n-qubi s a e ans o ms as H(n):|x⟩ 7→ n Y i=1   1 √2X yi={0,1} (−1)xiyi|yi⟩ ≡1 √2n 2n−1 X y=0 (−1)x·y|y⟩, whe e x, y ep esen n-bi s ings and x·yis he bi wise inne p oduc modulo 2o AND x·y= (x1∧y1)⊕(x2∧y2)⊕···⊕(xn∧yn). Ac ing on he inpu |0⟩n|1⟩, he ac ion o he ci cui is |0⟩n|1⟩ 7→ 1 √2n 2n−1 X x=0 |x⟩!1 √2(|0⟩−|1⟩) 7→ 1 √2n 2n−1 X x=0 (−1) (x)|x⟩!1 √2(|0⟩−|1⟩) 7→ 1 2n 2n−1 X x=0 2n−1 X y=0 (−1) (x)(−1)x·y|y⟩!1 √2(|0⟩−|1⟩). (III.1) 34 III.2. Pe iodici y Mo e gene ally we may sum he geome ic se ies A−1 X j=0 eiθj =eiAθ −1 eiθ −1,(III.4) using θy=2πy mod N N. The e a e p ecisely alues o yin {0,1, . . . , N −1}such ha − 2≤y mod N≤ 2.(III.5) To see his, imagine ma king he mul iples o and Non a numbe line anging om 0 o N −1. Fo each mul iple o N, he e is a mul iple o no mo e han dis ance /2 away. Fo each o hese alues, he co esponding θysa is ies −π n≤θy≤π n. Now, since A−1<N , o hese alues o θyall o he e ms in he sum o e jin eq. (III.4) lie in he same hal -plane o he complex plane, so ha he e ms in e e e cons uc i ely and he sum is subs an ial. We know ha |1−eiAθ|≤|θ|, because he s aigh -line dis ance om he o igin is less han he a c leng h along he ci cle, and o A|θ| ≤ πwe ha e |1−eiAθ| ≥ 2A|θ| π, because we can see ha his dis ance is a con ex unc ion. We ac ually ha e A < N + 1, and hence Aθy< π(1 + N)bu by applying he abo e bound o  ei(A−1)θ−1 eiθ −1+ei(A−1)θ≥ ei(A−1)θ−1 eiθ −1−1, we can s ill conclude ha  ei(A−1)θ−1 eiθ −1≥2(A−1)|θ| π|θ|−1 = 2A π−(1 + 2 π). Igno ing a possible co ec ion o o de 2/A hen, we ind ha P(y)≥4 π21 , III. Sho ’s Algo i hm 35 o each o he alues ha sa is y eq. (III.5). Thus, wi h a p obabili y o , a leas , 4/π2, he measu ed alue o ywill sa is y kN −1 2≤y≤kN +1 2, o k −1 2N≤y N≤k +1 2N, whe e k∈ {0,1, . . . , −1}. The ou pu o he compu a ion is easonably likely o be wi hin dis ance 1/2o an in ege mul iple o N/ . Suppose ha we know ha < M ≪N. Thus, we know ha N/ is a a ional numbe wi h a denomina o smalle han M. Two dis inc a ional numbe s wi h denomina o s less han Mcanno be close han 1/M2. Thus, i we measu e y o be wi hin dis ance 1/2 om an in ege mul iple o N/ , hen he e is a unique alue o k/ (wi h < M) de e mined by y/N, p o ided ha N≥M2. This alue o k/ can be e icien ly ex ac ed om he measu ed y/N by con inued ac ions. Now, wi h p obabili y exceeding 4/π2, we ha e ound a alue o k/ whe e Kis selec ed om {0,1, . . . , −1}. I is easonably likely ha kand a e ela i ely p ime, so ha we ha e succeeded in inding . Wi h a que y o he o acle, we may check whe he (x) = (x+ ). Bu i gcd(k, )= 1, we ha e ound only a ac o 1o . In he case whe e we do no ini ially succeed in inding using he quan um algo i hm, we ha e a ious s a egies o imp o e he chances o success. Fo ins ance, we can es nea by alues o ysince he measu ed alue migh be close o he ange − /2≤y mod N≤ /2, bu no p ecisely wi hin i . Addi ionally, ying a ew mul iples o ( he alue o gcd(k, ), i no 1, is p obably no la ge) can also help e ine ou esul . I he abo e a emp s do no yield he desi ed ac o , we can eso o epea ing he quan um ci cui o ob ain a new alue k′/ wi h a p obabili y exceeding 4/π2. A his poin , k′migh sha e a common ac o wi h , leading us o de e mine ano he ac o 2 o . Howe e , i is easonably likely ha gcd(k, k′)=1, in which case we can compu e = lcm( 1, 2). We can es ima e he p obabili y ha andomly selec ed kand k′a e ela i ely p ime. Since a p ime numbe pdi ides a ac ion 1/p o all in ege s, he p obabili y ha pdi ides bo h kand k′is 1/p2. Con e sely, kand k′a e ela i ely p ime i no p ime di ides bo h k and k′. Thus, he p obabili y ha kand k′a e ela i ely p ime is gi en by: P(k, k′cop ime) = Y pp ime 1−1 p2=1 ζ(2) =6 π2≈0.61, whe e ζis he Riemann ze a unc ion. Hence, a e some cons an numbe o epe i ions o he algo i hm, he p obabili y o success in inding becomes signi ican ly high, hanks o he epea ed ials and he likelihood o kand k′being ela i ely p ime. This makes he quan um algo i hm a p omising app oach o ac o ing la ge numbe s e icien ly. 36 III.2. Pe iodici y F om FFT o QFT Now le ’s conside he implemen a ion o he quan um Fou ie ans o m. The Fou ie ans o m X x (x)|x⟩ 7→ X y 1 √NX x e2πixy/N (x)!|y⟩, is a mul iplica ion by an N×Nuni a y ma ix. In said ma ix, he (x, y)ma ix elemen is (e2πi/N )xy. Nai ely, his ans o ms equi es O(N2)elemen a y ope a ions. Howe e he e is a well-known and e y use ul classical p ocedu e ha educes he numbe o ope a ions o O(Nlog N). Assuming N= 2n, we s a by exp essing xand yin bina y as x=xn−1·2n−1+xn−2·2n−2+···+x0, y =yn−1·2n−1+yn−2·2n−2+···+y0. In he p oduc o xand ywe may disca d any e ms con aining no mo e powe s o 2, as he e is no con ibu ion o e2πixy/N om such e ms. Thus, we may w i e xy 2n≡yn−1(.x0) + yn−2(.x1x0) + ···+y0(.xn−1. . . x0),(III.6) whe e he ac o s in pa en heses a e bina y exp essions; e.g. .x2x1x0=x2·2−1+x1·2−2+x0·2−3. We can now e alua e ˜ (x) = 1 √NX y e2πixy/N (y), o each o he 2n alues o x. Howe e he sum o e y ac o s in o nsums o e yk= 0,1, which can be done sequen ially in a ime o o de n. Wi h quan um pa allelism, we can do a be e . F om eq. (III.6) we ob ain QFT :|x⟩ 7→ 1 √NX y e2πixy/N |y⟩ 7→ 1 √2n(|0⟩+e2πi(.x0)|1⟩)(|0⟩+e2πi(.x1x0)|1⟩) . . . (|0⟩+e2πi(.xn−1...x0)|1⟩). The QFT akes each compu a ional basis s a e o an unen angled s a e o nqubi s; hus i is easonable o an icipa e ha i can be e icien ly implemen ed. Indeed, le ’s conside he case n= 3. We can eadily see ha he ci cui Figu e III.2: Ci cui o he QFT. III. Sho ’s Algo i hm 37 does he job. No e ha he o de o he bi s has been e e sed in he ou pu . Each Hadama d ga e ac s as H:|xk⟩ 7→ 1 √2(|0⟩+e2πi(.xk)|1⟩). The o he con ibu ions o he ela i e phase o |0⟩and |1⟩in he k- h qubi a e p o ided by he wo-qubi condi ional o a ions, whe e Rd=1 0 0eπi/2d, and d= (k−j)is he “dis ance” be ween he qubi s. In he case n= 3, he QFT is cons uc ed om h ee Hga es and h ee con olled-R ga es. In gene al, he QFT is cons uc ed om nHga es and n 2=n(n−1)/2con olled Rga es. A wo-qubi ga e is applied o each pai o qubi s, again wi h con olled ela i e phase π/2d, whe e dis he dis ance be ween he qubi s. Thus he ci cui amily ha implemen s he QFT has a size o o de log(N)2. We can u he educe he ci cui complexi y o linea in log(N)by accep ing an implemen a ion wi h ixed accu acy. The wo-qubi ga es ac ing on dis an qubi s con ibu e only exponen ially small phases, allowing us o d op ga es ac ing on pai s o qubi s sepa a ed by mo e han mqubi s. Consequen ly, each e m in equa ion (III.6) is eplaced by an app oxima ion wi h mbi s o accu acy. The esul ing e o in xy/2nis no wo se han n2−m, enabling us o achie e an accu acy o εin xy/2nwi h m≥log(n/ε). By e aining only he ga es ac ing on qubi pai s wi h dis ances smalle han m, he ci cui size becomes o o de mn ∼mlog(n/ε). In ac , i we plan o measu e in he compu a ional basis immedia ely a e he Quan um Fou ie T ans o m (QFT), he e a e u he simpli ica ions we can exploi . No ably, he e is no need o apply any wo-qubi ga es a all. The con olled-Rdga e exhibi s a symme ic ac ion on he wo qubi s: i ac s i ially on s a es |00⟩,|01⟩, and |10⟩, while modi ying he phase o s a e |11⟩by eiθd. Consequen ly, we can in e change he con ol and a ge bi s wi hou a ec ing he ga e’s ac ion. Wi h his change, ou ci cui o he 3-qubi QFT becomes: Figu e III.3: Ci cui o he QFT, wi h in e change. Once we ha e measu ed |y0⟩, we know he alue o he con olled bi in he con olled- R1ga e ha ac ed on he i s wo qubi s. The e o e, we will ob ain he same p obabili y 38 III.3. Fac o ing as pe iod inding dis ibu ion o measu emen ou comes i , ins ead o applying he con olled-R1and hen measu ing, we ins ead measu e y0 i s and only hen apply (R1)y0 o he nex qubi , condi ioned on he ou come o he measu emen o he i s qubi . Simila ly we can eplace he con olled-R1and con olled-R2ac ing on he hi d qubi by he single qubi o a ion (R2)y0(R1)y1, ha is, a o a ion wi h ela i e phase π(.y1y0), a e he alues o y0and y1ha e been measu ed. Al oge he hen, i we a e going o measu e a e pe o ming he QFT, only nHadama d ga es and n−1single qubi o a ions a e equi ed. The ci cui size o he QFT is ema kably simple. Howe e , we should no e ha , howe e in e es ing hese esul s a e, such simpli ica ions a e cu en ly e y a o being implemen ed. Such o a ion ga es a e cons uc ed om he p imi i e ones ha he co esponding backend has. And his is no expec ed o change in a long ime. III.3 Fac o ing as pe iod inding Wha does he ac o ing p oblem ha e o do wi h pe iodici y? The e is a well-known andomized educ ion o ac o ing o de e mining he pe iod o a unc ion. Al hough his educ ion is no di ec ly ela ed o quan um compu ing, we will discuss i he e o he comple eness o his wo k, and because he p ospec o using a quan um compu e o ac o la ge numbe s has gene a ed so much exci emen . Suppose ha we wan o ind a ac o o he n-bi numbe N. Selec pseudo- andomly a < N and compu e he Euclidean algo i hm, which has cos O(log(N)3)in o de o ge gcd(a, N). I gcd(a, N)= 1, hen we ha e ound a ac o o N. Le ’s s udy he case in which gcd(a, N) = 1. We know ha he numbe s which a e cop ime o N o m a g oup unde mul iplica ion modulo N. The e o e, ahas an o de , which is he smalles posi i e in ege such ha a ≡1 mod N. The o de is he pe iod o he unc ion N,a(x) = axmod N. As we ha e seen, he pe iod o a unc ion can be ound e icien ly using he QFT. Thus, i we can compu e N,a(x)e icien ly, we can ind he o de o ae icien ly. Compu ing N,a may look di icul a i s , since he exponen xcan be e y la ge. Howe e , we can use he bina y ep esen a ion o x o compu e N,a e icien ly. We can w i e xas x=xm−1·2m−1+xm−2·2m−2+···+x1·2 + x0, III. Sho ’s Algo i hm 39 and we ha e axmod N= (a2m−1)xm−1·(a2m−2)xm−2···(a2)x1·ax0mod N. Each a2jcan be compu ed e icien ly by a classical compu e using epea ed squa ing: a2jmod N=(ai j= 0 (a2j−1)2mod Ni j > 0. So only m−1classical mul iplica ions mod Na e equi ed o assemble a able o all a2j’s. The compu a ion o axmod Nis accomplished by mul iplying oge he he ele an en ies om he able. This p ocess equi es a maximum o m−1 mod Nmul iplica ions, wi h each mul iplica ion necessi a ing a mos an o de o (log(N))2ope a ions. As < N, selec ing m∼2 log Np o ides a easonable chance o inding . Consequen ly, he o al cos o compu ing N,a is app oxima ely (log(N))3. This analysis highligh s he e iciency o he algo i hm and i s polynomial complexi y in e ms o log(N). Schema ically, he ci cui has he o m: Figu e III.4: Ci cui o calcula ing N,a(x). Mul iplica ion by a2jis pe o med i he con ol qubi xjis 1. Le ’s suppose now ha we ha e ound he pe iod o N,a. I is e en, hen we ha e N|a −1=(a /2−1)(a /2+ 1). We know ha Ndoes no di ide a −1, since i i did, he o de o awould be smalle han /2. Thus, i i is also he case ha Ndoes no di ide a /2+ 1, o a /2=−1 mod N, hen Nmus ha e a non i ial common ac o wi h each o a /2±1. The e o e, we gcd(N, a /2+ 1) = 1 is a non i ial ac o o Nand we a e done. We see ha , once we ha e ound , we succeed in ac o ing Nunless ei he is odd o is e en and a /2≡ −1 mod N. How likely is success? Le ’s suppose ha Nis a p oduc o wo p ime ac o s p=q, which is ac ually he leas a o able case. N=pq. 40 III.3. Fac o ing as pe iod inding Fo each a < pq, he e exis a1< p and a2< q such ha a≡a1mod p, a≡a2mod q. Choosing a andom a < N is, he e o e, equi alen o choosing wo andom numbe s a1< p and a2< q. Now le 1and 2be he o de s o a1and a2modulo pand q, espec i ely. The Chinese Remainde heo em ells us ha sol ing a ≡1 mod Nis equi alen o a 1≡1 mod p, a 2≡1 mod q. The e o e, = lcm( 1, 2). I 1and 2a e bo h odd, hen so is and we lose. Howe e , i ei he 1o 2is e en, hen is e en and we ha e a chance o success. I a 1/2≡ −1 mod p, a 2/2≡ −1 mod q, (III.7) hen we ha e a /2≡ −1 mod Nand we lose. O he wise, i ei he a /2≡ −1 mod p, a /2≡1 mod q, (III.8) o a /2≡1 mod p a /2≡ −1 mod q, (III.9) hen a /2≡ −1 mod Nand we succeed. Suppose ha 1= 2s1 ′ 1, 2= 2s2 ′ 2, whe e ′ 1and ′ 2a e odd and s1> s2. Then = lcm( 1, 2) = 2 2·in ege , so ha a /2≡1 mod qand eq. (III.8) is sa is ied and we win. Analogously, s2> s1implies ha eq. (III.9) is sa is ied and we win as well. Bu i s1=s2, hen = 1·odd = 2·odd′so ha eq. (III.7) is sa is ied and we lose. The e o e i all comes down o: o s1=s2we lose and o s1=s2we win. Wha is he p obabili y o s1=s2? We know ha he mul iplica i e g oup Z∗ pis cyclic o o de p−1 and has a gene a o elemen . Suppose ha p−1 = 2k·c, whe e cis odd, and conside he o de s o all he elemen s o he g oup. Fo b e i y, we will discuss only he case k= 1, which is he leas a ou able case o us. Then i bis a gene a o o Z∗ p, he e en powe s o bha e odd o de , and he odd powe s o bha e o de 2·odd. In his case, hen, = 2 ·odd III. Sho ’s Algo i hm 41 whe e ∈ {0,1}, each occu ing wi h equal p obabili y. The e o e, i p, q a e bo h o his un a o able o m, and a1and a2a e chosen a andom, hen he p obabili y o s1=s2is 1/2. Hence, once we ound , he p obabili y o inding a ac o is, a leas 1/2, i Nis a p oduc o wo p imes. I Nhas mo e han wo p ime ac o s, he p obabili y o success is e en highe . The me hod ails i Nis a p ime powe , bu p ime powe s can be e icien ly ac o ed by o he me hods. Chap e IV Real Wo ld Implemen a ions This las chap e will be di ided in wo sec ions. In he i s sec ion, we will discuss he cu en s a e o he a o quan um compu ing, implemen ing Sho ’s algo i hm o ac o ize a numbe and unning i in h ee di e en simula o s. In his pa we will s udy how long i akes igh now o ac o a numbe using Sho ’s algo i hm and he size o he numbe s we will be able o ac o ize. In he second sec ion, we will implemen he Quan um Fou ie T ans o m in a eal quan um compu e , and we will discuss he esul s ob ained. We will s udy he noise o he cu en open-sou ce IBM quan um compu e s. IV.1 Sho ’s Algo i hm implemen a ion As we ha e p e iously p o en, he e is a ime-e icien way o ac o ize a numbe using a quan um compu e . On he o he hand, we do no know any polynomial ime algo i hm o ac o ize a numbe using a classical compu e . In his chap e , we will implemen Sho ’s algo i hm and un i in h ee quan um compu e simula o s made by IBM Quan um using he Qiski en i onmen . A good and use ul ex book and u o ial can be ound in [6] and [7]. We ha e based ou code in he implemen a ion by Qiski a [8]. This guide implemen s he algo i hm using n+ 4 qubi s. This means ha , in o de o implemen he algo i hm o ac o he numbe 15 as he guide does, we would need 8qubi s. We ha e chosen a simula o ins ead o a eal quan um compu e because he e is no any decen size open- sou ce quan um compu e a ailable ye . In ac , none o hem o e mo e han 7qubi s. A lo o p og ess need o be made in his ma e . Howe e , his will do he job as a p oo o concep . Simula o s Ou goal will be o obse e he di e en ime pe o mances o he h ee simula o s and y o unde s and why hey a e he way hey a e. The h ee simula o we will use a e: •simula o _s a e ec o : This simula o compu es he wa e unc ion o he qubi ’s 43 50 IV.2. QFT implemen a ion Execu ions and esul s Once we ha e he code, we need o decide he numbe o qubi s we wan o use, as well as he bound o he o a ions in he second implemen a ion. Howe e , ou aim is o s udy how he noise a ec s he QFT, so we ha e decided o ake a s a is ical app oach in o de o s udy his phenomenon. We ha e decided o execu e he QFT o nqubi s, wi h n anging om 3 o 7, bo h included. Also, we ha e chosen he bound o he o a ions in he second implemen a ion o be 1≤m≤n−2. This is because i he bound is n−1o highe , he bounded ci cui will end up being he gene ic ci cui . Each execu ion was epea ed 8000 imes, and he esul s we e s o ed in di e en diag ams, as men ioned be o e. We can obse e, as expec ed, ha he execu ion on he simula o is pe ec in he sense ha i shows no e o a all. All he uns in his backend p o ide he esul 0, which is he expec ed one. Because o his, we will only show he esul s ob ained o he gene ic QFT o 3qubi s in he simula o , as hey a e exac ly he same as he esul s ob ained o he o he numbe o qubi s. This is shown in igu e IV.3. Howe e , when we wo k wi h he eal quan um compu e , we s a o see how he noise a ec s he esul s. Two examples o his og ams o his ype a e he igu es IV.4 and IV.5. In o de o show how noise a ec s in all s udied cases, we p esen he ollowing able wi h he esul s ob ained o each possible QFT implemen a ion and each quan um backend. In he columns we p esen wha pe cen age o imes he esul 0was ob ained and wha posi ion does he esul 0occupy in he p obabili y dis ibu ion o measu emen esul s. In he ows we p esen he di e en backends used, as well as he numbe o qubi s used and he bound o he bounded QFT. Figu e IV.3: Simula o _S a e ec o : gene ic QFT o 3qubi s in he simula o . IV. Real Wo ld Implemen a ions 51 Figu e IV.4: IBMQ_Jaka a: gene ic QFT o 3qubi s in IBMQ_Jaka a. Figu e IV.5: IBMQ_Nai obi: gene ic QFT o 3qubi s in IBMQ_Nai obi. 52 IV.2. QFT implemen a ion Backend Pe cen age Posi ion Q= 3 IBM_Lagos 86.58% 1 IBM_Nai obi 80.51% 1 IBM_Pe h 79.21% 1 IBMQ_Jaka a 86.2% 1 Q= 3, B = 1 IBM_Lagos 90.25% 1 IBM_Nai obi 85.96% 1 IBM_Pe h 84.39% 1 IBMQ_Jaka a 90.74% 1 Q= 4 IBM_Lagos 48.21% 1 IBM_Nai obi 48.59% 1 IBM_Pe h 45.01% 1 IBMQ_Jaka a 58.18% 1 Q= 4, B = 1 IBM_Lagos 81.84% 1 IBM_Nai obi 64.15% 1 IBM_Pe h 66.36% 1 IBMQ_Jaka a 83.04% 1 Q= 4, B = 2 IBM_Lagos 71.46% 1 IBM_Nai obi 39.49% 1 IBM_Pe h 52.96% 1 IBMQ_Jaka a 67.65% 1 Q= 5 IBM_Lagos 11.35% 3 IBM_Nai obi 8.55% 4 IBM_Pe h 21.6% 2 IBMQ_Jaka a 32.05% 1 Q= 5, B = 1 IBM_Lagos 61.79% 1 IBM_Nai obi 69.5% 1 IBM_Pe h 47.56% 1 IBMQ_Jaka a 68.0% 1 Q= 5, B = 2 IBM_Lagos 25.28% 1 IBM_Nai obi 34.56% 1 IBM_Pe h 24.68% 1 IBMQ_Jaka a 41.1% 1 Backend Pe cen age Posi ion Q= 5, B = 3 IBM_Lagos 6.2% 5 IBM_Nai obi 8.74% 4 IBM_Pe h 8.66% 3 IBMQ_Jaka a 30.4% 1 Q= 6 IBM_Lagos 2.8% 11 IBM_Nai obi 2.69% 14 IBM_Pe h 2.33% 17 IBMQ_Jaka a 5.96% 2 Q= 6, B = 1 IBM_Lagos 20.66% 2 IBM_Nai obi 42.91% 1 IBM_Pe h 28.94% 1 IBMQ_Jaka a 51.65% 1 Q= 6, B = 2 IBM_Lagos 10.73% 2 IBM_Nai obi 6.73% 4 IBM_Pe h 6.53% 4 IBMQ_Jaka a 18.39% 1 Q= 6, B = 3 IBM_Lagos 2.03% 25 IBM_Nai obi 9.65% 2 IBM_Pe h 4.96% 2 IBMQ_Jaka a 7.24% 2 Q= 6, B = 4 IBM_Lagos 2.23% 16 IBM_Nai obi 3.18% 10 IBM_Pe h 2.91% 6 IBMQ_Jaka a 9.35% 2 Q= 7 IBM_Lagos 1.24% 31 IBM_Nai obi 2.7% 1 IBM_Pe h 1.74% 6 IBMQ_Jaka a 1.43% 27 Q= 7, B = 1 IBM_Lagos 7.38% 4 IBM_Nai obi 22.51% 1 IBM_Pe h 19.94% 1 IBMQ_Jaka a 40.19% 1 IV. Real Wo ld Implemen a ions 53 Backend Pe cen age Posi ion Q= 7, B = 2 IBM_Lagos 3.25% 9 IBM_Nai obi 5.23% 4 IBM_Pe h 2.21% 10 IBMQ_Jaka a 7.53% 2 Q= 7, B = 3 IBM_Lagos 1.95% 15 IBM_Nai obi 7.29% 1 IBM_Pe h 2.93% 7 IBMQ_Jaka a 4.3% 5 Q= 7, B = 4 IBM_Lagos 1.1% 37 IBM_Nai obi 3.33% 2 IBM_Pe h 2.46% 7 IBMQ_Jaka a 2.24% 7 Q= 7, B = 5 IBM_Lagos 1.46% 18 IBM_Nai obi 2.34% 4 IBM_Pe h 2.19% 2 IBMQ_Jaka a 1.89% 15 Table IV.3: Resul s o he di e en qubi s, bound and backend choices. All esul s can be seen in he ollowing link: h ps://gi hub.com/Ja iLobillo/TFG_ Quan um_Complexi y/ ee/main/Resul s None heless we can in e p e he esul s ob ained in a mo e gene al way. All main poin s in his ega d a e: •Fi s and mos impo an , we can see ha he noise is so high igh now ha i is no use ul o wo k wi h eal quan um compu e s ye . Many ad ancemen s in he building o quan um compu ing a e coming and hey will be welcome in o de o change he cu en s a u quo. •IBMQ_Jaka a seems o be he mos accu a e backend o mos o he cases, al hough i is s ill no e en nea o be accu a e enough o be use ul. Howe e , he ac ha i is he mos accu a e seems somehow coun e -in ui i e because, al hough all ou quan um backends sha e he same Falcon 5.11H ype a chi ec u e, IBMQ_Jaka a has he leas quan um alue wi h a alue o 16, compa ed o he o he ’s alue o 32. These, and o he pa ame e s, can be seen in Table IV.2. This would mean ha IBMQ_Jaka a should be less accu a e, and we see i is no he case. Howe e , when we wo k wi h such inaccu a e machines, he ac ha one has mo e o less accu acy can be di icul o a ibu e o a pa icula eason, beyond gene al lack o accu acy. Fu he mo e, hese pe o mance measu es lose eliabili y when we conside , 54 IV.2. QFT implemen a ion o example, he ac ha he quan um compu e s need o be con inuously calib a ed, so he la ge he ime om las calib a ion induces la ge accu acy loss. Also, no e e y ci cui uses he esou ces in he same way, so accu acy pa ame e s can a y om ci cui o ci cui ( he QFT being jus one o he possible ones). •We can see ha he mo e qubi s we use, he mo e noise we ge . This is because he mo e qubi s we use, he mo e ga es we need o apply, and hence he mo e noise we ge . This p oblem becomes e en mo e impo an as he igh esul is no e en he mos p obable one o mos o he 5qubi s (o mo e) implemen a ions. •Using he bounded QFT ins ead o he gene ic one educes he noise signi ican ly. This is because he bounded QFT uses less ga es han he gene ic one, and hence he noise is educed. This migh be coun e -in ui i e, as heo e ically his would be a less accu a e implemen a ion o he QFT. A bound alue o 1and 2makes he 5qubi QFT o accu a e enough as o make he igh esul o 0 he mos p obable again o all backends. Backend IBM_Lagos IBM_Pe h IBM_Nai obi IBMQ_Jaka a P ocesso ype Falcon 5.11H Falcon 5.11H Falcon 5.11H Falcon 5.11H Qubi s 7 7 7 7 QV 32 32 32 16 CLOPS 2.7K 2.9K 2.6K 2.4K Median T1 113.19 µs 174.07 µs 101.23 µs 124.11 µs Median T2 60.61 µs 86.27 µs 62.52 µs 39.66 µs Table IV.4: Pa ame e s o he di e en backends. The able con ains he main physical pa ame e s ha di e en ia e he ou quan um backends. QV means Quan um Value and CLOPS s ands o Ci cui Laye Ope a ions Pe Second. Median T1 and median T2 a e also included. T1 is he elaxa ion ime, he ime i akes o decay and lose i s ampli ude alue. T2 is he dephasing ime, he ime i akes o lose he phase cohe ence. As we men ioned be o e, one could hink ha IBMQ_Jaka a ough o be he wo s pe o ming backend, and expe imen al esul s ell us o he wise. Resul s and conclusions This Bachelo ’s hesis has p esen ed i sel as an oppo uni y o be e unde s and he new wo ld which has been p esen ed o us in he las ew yea s, ha is, he wo ld o quan um compu ing. The bes way we can y o unde s and his wo ld is by i s ha ing a backg ound esea ch on i s heo e ical bases and hen y o wo k in a mo e p ac ical way wi h wha i can o e . And ha is exac ly how his wo k was conduc ed. The i s chap e was dedica ed o he heo e ical backg ound o quan um compu ing. We ha e seen how quan um mechanics can be used o pe o m compu a ions in a di e en way han he classical one. We ha e seen as well how he qubi is he quan um equi alen o he classical bi , and how he quan um ga es a e he quan um equi alen o he classical ga es. Finally we ha e seen how he quan um ga es can be ep esen ed by uni a y ma ices. This app oach has p o ided a men al s uc u e o unde s and he quan um ci cui s and algo i hms ha we would s udy la e on. This men al s uc u e was necessa y as he beginne quan um compu ing s uden is no expec ed o hink in e ms o his s uc u e as luidly as he does in e ms o classical compu ing. In he second chap e we p o ided he basis o unde s anding how classical and quan um ci cui s wo k. This base is c i ical as all complexi y heo y ha came in he hi d chap e is based on ci cui design and size a he han ime complexi y. We go o ca ego ize he complexi y o a p oblem in e ms o he complexi y o he ci cui s ha sol e i , bo h in he classical and quan um case. We ha e ela ed he complexi y o a p oblem o he complexi y o he ci cui s ha sol e i . Also we ha e seen how we can ela e he dep h o a ci cui o he ime complexi y o he p oblem i sol es. We go o explici ly di e encia e easy p oblems om ha d p oblems, which is c ucial o unde s and he impo ance o quan um compu ing. Finally we go o ela e quan um and classical complexi y classes. In he hi d chap e we ha e seen he main esul s o quan um compu ing. We ha e seen how we can use quan um ci cui s o sol e p oblems in cons an ime ha would ake linea ime o sol e classically, al hough as bo h cases a e conside ed o be easy, his was only o in oduce Simon’s and Sho ’s algo i hms. Sho ’s algo i hm, which uses he quan um Fou ie ans o m, is he mos impo an quan um algo i hm o da e, as i p o ides a polynomial ime algo i hm o ac o ize numbe s, which is a p oblem ha is belie ed o be ha d classically. I he ac o ing p oblem is con i med o be classically ha d, his would mean ha we ha e ound a p oblem ha can be sol ed in polynomial ime using a quan um compu e bu no using a classical one. We ha e seen ha he whole s uc u e o he wo k leads us o unde s and one o he 55 56 IV.2. QFT implemen a ion easons why quan um compu ing is so impo an , which is ha i can sol e p oblems ha a e belie ed o be ha d classically in polynomial ime. The whole hesis wo ks cons uc i ely, gi ing all he b icks necessa y, in o de o build he unde s anding o he eade o he poin whe e he can unde s and how impo an Sho ’s algo i hm and quan um compu ing is. Chap e ou o he p ojec ocuses on wo dis inc p oo s o concep . The i s p oo o concep in ol es he implemen a ion o Sho ’s algo i hm wi hin a quan um simula o . While his app oach o e s he ad an age o es ing he main algo i hm discussed in his wo k, i ’s wo h no ing ha a simula ion does no e lec he algo i hm’s ue e iciency. The second p oo o concep cen e s a ound he implemen a ion o he quan um Fou ie ans o m, a c ucial componen o Sho ’s algo i hm. Unlike he i s implemen a ion, his one is execu ed on eal quan um compu e s. I s p ima y pu pose is o analyze how noise in luences he esul s. Consequen ly, his second app oach o e s aluable insigh s in o he cu en s a e o quan um compu ing echnology. Bibliog aphy [1] S. Aa onson. In oduc ion o Quan um In o ma ion Science Lec u e No es, 2018. Online PDF a h ps://www.sco aa onson.com/qclec.pd . [2] E. Be ns ein and U. Vazi ani. Quan um complexi y heo y. SIAM Jou nal on Compu ing, 26(5):1411–1473, 1997. [3] D. Deu sch and R. Jozsa. Rapid solu ions o p oblems by quan um compu a ion. Royal Socie y, 439(1907), 1992. [4] L. K. G o e . A as quan um mechanical algo i hm o da abase sea ch. In P oceedings o he Twen y-Eigh h Annual ACM Symposium on Theo y o Compu ing, STOC ’96, page 212–219, New Yo k, NY, USA, 1996. Associa ion o Compu ing Machine y. [5] J. P eskill. Lec u e No es o Physics 219: Quan um Compu a ion, 1997-2022. Online PDF a h p:// heo y.cal ech.edu/~p eskill/ph219/index.h ml#lec u e. [6] Qiski . Qiski Tex book, 2023. h ps://qiski .o g/lea n. [7] Qiski . Qiski Tu o ials, 2023. h ps://qiski .o g/documen a ion/ u o ials. h ml. [8] Qiski . Sho ’s Algo i hm, 2023. h ps://lea n.qiski .o g/cou se/ ch-algo i hms/sho s-algo i hm. [9] P. W. Sho . Polynomial ime algo i hms o p ime ac o iza ion and disc e e loga i hms on a quan um compu e . SIAM J. Sci. S a is . Compu ., 26:1484, 1997. [10] D. R. Simon. On he powe o quan um compu a ion. SIAM Jou nal on Compu ing, 26(5):1474–1483, 1997. 57