ebook img

Quantum Computing for Programmers PDF

375 Pages·2022·3.544 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Quantum Computing for Programmers

QuantumComputingforProgrammers Thisintroductiontoquantumcomputingfromaclassicalprogrammer’sperspectiveis meantforstudentsandpractitionersalike.Morethan25fundamentalalgorithmsare explainedwithfullmathematicalderivationsandclassicalcodeforsimulation,using anopen-sourcecodebasedevelopedfromthegroundupinPythonandC++. After presenting the basics of quantum computing, the author focuses on algo- rithms and the infrastructure to simulate them efficiently, beginning with quantum teleportation,superdensecoding,Bernstein–Vazirani’salgorithm,andDeutsc–Jozsa’s algorithm.Coverageofadvancedalgorithmsincludesthequantumsupremacyexperi- ment,quantumFouriertransform,phaseestimation,Shor’salgorithm,Grover’salgo- rithm with quantum counting and amplitude amplification, quantum random walks, and the Solovay–Kitaev algorithm for gate approximation. Quantum simulation is explored with the variational quantum eigensolver, quantum approximate optimiza- tion,andtheNP-completeMax-CutandSubset-Sumalgorithms. The book also discusses issues around programmer productivity, quantum noise, errorcorrection,andchallengesforquantumprogramminglanguages,compilers,and tools,withafinalsectiononcompilertechniquesfortranspilation. RobertHundtisaDistinguishedEngineeratGoogle,whereheledsoftwaredevelop- mentforGoogle’sTPUsupercomputers,theXLAcompilerforTensorFlow,anopen- source CUDA compiler, and currently the high-level synthesis toolchain XLS. He has more than 25 scientific publications, holds more than 35 patents, and is a senior memberofIEEE. Quantum Computing for Programmers ROBERT HUNDT UniversityPrintingHouse,CambridgeCB28BS,UnitedKingdom OneLibertyPlaza,20thFloor,NewYork,NY10006,USA 477WilliamstownRoad,PortMelbourne,VIC3207,Australia 314–321,3rdFloor,Plot3,SplendorForum,JasolaDistrictCentre, NewDelhi–110025,India 103PenangRoad,#05–06/07,VisioncrestCommercial,Singapore238467 CambridgeUniversityPressispartoftheUniversityofCambridge. ItfurtherstheUniversity’smissionbydisseminatingknowledgeinthepursuitof education,learning,andresearchatthehighestinternationallevelsofexcellence. www.cambridge.org Informationonthistitle:www.cambridge.org/9781009098175 DOI:10.1017/9781009099974 ©RobertHundt2022 Thispublicationisincopyright.Subjecttostatutoryexception andtotheprovisionsofrelevantcollectivelicensingagreements, noreproductionofanypartmaytakeplacewithoutthewritten permissionofCambridgeUniversityPress. Firstpublished2022 PrintedintheUnitedKingdombyTJBooksLimited,PadstowCornwall AcataloguerecordforthispublicationisavailablefromtheBritishLibrary. LibraryofCongressCataloging-in-PublicationData Names:Hundt,Robert,author. Title:Quantumcomputingforprogrammers/RobertHundt. Description:Cambridge,UnitedKingdom;NewYork,NY:Cambridge UniversityPress,2022.|Includesbibliographicalreferencesandindex. Identifiers:LCCN2021044761(print)|LCCN2021044762(ebook)| ISBN9781009098175(hardback)|ISBN9781009099974(epub) Subjects:LCSH:Quantumcomputing.|BISAC:COMPUTERS/General Classification:LCCQA76.889.H862022(print)|LCCQA76.889(ebook)| DDC006.3/843–dc23/eng/20211105 LCrecordavailableathttps://lccn.loc.gov/2021044761 LCebookrecordavailableathttps://lccn.loc.gov/2021044762 ISBN978-1-009-09817-5Hardback CambridgeUniversityPresshasnoresponsibilityforthepersistenceoraccuracyof URLsforexternalorthird-partyinternetwebsitesreferredtointhispublication anddoesnotguaranteethatanycontentonsuchwebsitesis,orwillremain, accurateorappropriate. ToMary,Thalia,andJohannes Contents Acknowledgments pagex Introduction xi 1 TheMathematicalMinimum 1 1.1 ComplexNumbers 1 1.2 DiracNotation,Bras,andKets 2 1.3 TensorProduct 5 1.4 UnitaryandHermitianMatrices 6 1.5 HermitianAdjointofExpressions 6 1.6 EigenvaluesandEigenvectors 7 1.7 TraceofaMatrix 8 2 QuantumComputingFundamentals 9 2.1 Tensors 9 2.2 Qubits 13 2.3 States 15 2.4 HelperFunctions 24 2.5 Operators 25 2.6 Single-QubitGates 33 2.7 ControlledGates 46 2.8 QuantumCircuitNotation 51 2.9 BlochSphere 55 2.10 GlobalPhase 59 2.11 Entanglement 60 2.12 No-CloningTheorem 65 2.13 Uncomputation 66 2.14 ReducedDensityMatrixandPartialTrace 68 2.15 Measurement 72 3 SimpleAlgorithms 78 3.1 RandomNumberGenerator 78 3.2 GateEquivalences 79 3.3 ClassicalArithmetic 89 3.4 SwapTest 93 viii Contents 3.5 QuantumTeleportation 97 3.6 SuperdenseCoding 102 3.7 Bernstein–VaziraniAlgorithm 105 3.8 Deutsch’sAlgorithm 108 3.9 Deutsch–JozsaAlgorithm 118 4 Scalable,FastSimulation 122 4.1 SimulationComplexity 122 4.2 QuantumRegisters 124 4.3 Circuits 126 4.4 FastGateApplication 134 4.5 AcceleratedGateApplication 139 4.6 SparseRepresentation 145 5 BeyondClassical 149 5.1 10,000Years,2Days,or200Seconds 150 5.2 QuantumRandomCircuitAlgorithm 150 5.3 CircuitConstruction 152 5.4 Estimation 155 5.5 Evaluation 158 6 ComplexAlgorithms 160 6.1 PhaseKick 161 6.2 QuantumFourierTransform 163 6.3 QuantumArithmetic 172 6.4 PhaseEstimation 180 6.5 Shor’sAlgorithm 189 6.6 OrderFinding 196 6.7 Grover’sAlgorithm 210 6.8 AmplitudeAmplification 227 6.9 QuantumCounting 230 6.10 QuantumRandomWalk 234 6.11 VariationalQuantumEigensolver 240 6.12 QuantumApproximateOptimizationAlgorithm 253 6.13 MaximumCutAlgorithm 254 6.14 SubsetSumAlgorithm 262 6.15 Solovay–KitaevTheoremandAlgorithm 266 7 QuantumErrorCorrection 278 7.1 QuantumNoise 278 7.2 QuantumErrorCorrection 284 7.3 Nine-QubitShorCode 289 Contents ix 8 QuantumLanguages,Compilers,andTools 292 8.1 ChallengesforQuantumCompilation 293 8.2 QuantumProgrammingModel 294 8.3 QuantumProgrammingLanguages 294 8.4 CompilerOptimization 303 8.5 Transpilation 311 Appendix: SparseImplementation 322 References 335 Index 343

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.