وبلاگ بلیان

Learn Quantum Computing with Python and Q# : a Hands-On Approach

معرفی کتاب «Learn Quantum Computing with Python and Q# : a Hands-On Approach» نوشتهٔ Sarah C. Kaiser, Christopher E. Granade، منتشرشده توسط نشر Manning Publications Company در سال 2021. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است. «Learn Quantum Computing with Python and Q# : a Hands-On Approach» در دستهٔ بدون دسته‌بندی قرار دارد.

Learn Quantum Computing with Python and Q# demystifies quantum computing. Using Python and the new quantum programming language Q#, you’ll build your own quantum simulator and apply quantum programming techniques to real-world examples including cryptography and chemical analysis. About the technology Quantum computers present a radical leap in speed and computing power. Improved scientific simulations and new frontiers in cryptography that are impossible with classical computing may soon be in reach. Microsoft’s Quantum Development Kit and the Q# language give you the tools to experiment with quantum computing without knowing advanced math or theoretical physics. About the book Learn Quantum Computing with Python and Q# introduces quantum computing from a practical perspective. Use Python to build your own quantum simulator and take advantage of Microsoft’s open source tools to fine-tune quantum algorithms. The authors explain complex math and theory through stories, visuals, and games. You’ll learn to apply quantum to real-world applications, such as sending secret messages and solving chemistry problems. What's inside • The underlying mechanics of quantum computers • Simulating qubits in Python • Exploring quantum algorithms with Q# • Applying quantum computing to chemistry, arithmetic, and data About the reader For software developers. No prior experience with quantum computing required. About the author Dr. Sarah Kaiser works at the Unitary Fund, a non-profit organization supporting the quantum open-source ecosystem, and is an expert in building quantum tech in the lab. Dr. Christopher Granade works in the Quantum Systems group at Microsoft, and is an expert in characterizing quantum devices. Learn Quantum Computing with Python and Q# 1 brief contents 9 contents 11 foreword 17 preface 19 acknowledgments 21 about this book 23 Who should read this book 24 How this book is organized: A roadmap 24 About the code 24 liveBook discussion forum 25 Other online resources 25 Going further 26 about the authors 27 about the cover illustration 28 Part 1—Getting started with quantum 29 1 Introducing quantum computing 31 1.1 Why does quantum computing matter? 32 1.2 What is a quantum computer? 33 1.3 How will we use quantum computers? 36 1.3.1 What can quantum computers do? 38 1.3.2 What can’t quantum computers do? 39 1.4 What is a program? 41 1.4.1 What is a quantum program? 42 Summary 44 2 Qubits: The building blocks 45 2.1 Why do we need random numbers? 47 2.2 What are classical bits? 50 2.2.1 What can we do with classical bits? 51 2.2.2 Abstractions are our friend 54 2.3 Qubits: States and operations 55 2.3.1 State of the qubit 56 2.3.2 The game of operations 58 2.3.3 Measuring qubits 62 2.3.4 Generalizing measurement: Basis independence 66 2.3.5 Simulating qubits in code 69 2.4 Programming a working QRNG 74 Summary 81 3 Sharing secrets with quantum key distribution 82 3.1 All’s fair in love and encryption 82 3.1.1 Quantum NOT operations 86 3.1.2 Sharing classical bits with qubits 90 3.2 A tale of two bases 91 3.3 Quantum key distribution: BB84 94 3.4 Using a secret key to send secret messages 99 Summary 102 4 Nonlocal games: Working with multiple qubits 103 4.1 Nonlocal games 104 4.1.1 What are nonlocal games? 104 4.1.2 Testing quantum physics: The CHSH game 104 4.1.3 Classical strategy 108 4.2 Working with multiple qubit states 109 4.2.1 Registers 109 4.2.2 Why is it hard to simulate quantum computers? 111 4.2.3 Tensor products for state preparation 113 4.2.4 Tensor products for qubit operations on registers 114 Summary 117 5 Nonlocal games: Implementing a multi-qubit simulator 118 5.1 Quantum objects in QuTiP 119 5.1.1 Upgrading the simulator 124 5.1.2 Measuring up: How can we measure multiple qubits? 127 5.2 CHSH: Quantum strategy 131 Summary 135 6 Teleportation and entanglement: Moving quantum data around 136 6.1 Moving quantum data 137 6.1.1 Swapping out the simulator 140 6.1.2 What other two-qubit gates are there? 143 6.2 All the single (qubit) rotations 145 6.2.1 Relating rotations to coordinates: The Pauli operations 147 6.3 Teleportation 154 Summary 157 Part 1: Conclusion 157 Part 2—Programming quantum algorithms in Q# 159 7 Changing the odds: An introduction to Q# 161 7.1 Introducing the Quantum Development Kit 162 7.2 Functions and operations in Q# 165 7.2.1 Playing games with quantum random number generators in Q# 166 7.3 Passing operations as arguments 171 7.4 Playing Morgana’s game in Q# 177 Summary 179 8 What is a quantum algorithm? 180 8.1 Classical and quantum algorithms 181 8.2 Deutsch–Jozsa algorithm: Moderate improvements for searching 184 8.2.1 Lady of the (quantum) Lake 184 8.3 Oracles: Representing classical functions in quantum algorithms 189 8.3.1 Merlin’s transformations 190 8.3.2 Generalizing our results 193 8.4 Simulating the Deutsch–Jozsa algorithm in Q# 198 8.5 Reflecting on quantum algorithm techniques 202 8.5.1 Shoes and socks: Applying and undoing quantum operations 203 8.5.2 Using Hadamard instructions to flip control and target 206 8.6 Phase kickback: The key to our success 208 Summary 212 9 Quantum sensing: It’s not just a phase 213 9.1 Phase estimation: Using useful properties of qubits for measurement 214 9.1.1 Part and partial application 214 9.2 User-defined types 219 9.3 Run, snake, run: Running Q# from Python 225 9.4 Eigenstates and local phases 230 9.5 Controlled application: Turning global phases into local phases 234 9.5.1 Controlling any operation 238 9.6 Implementing Lancelot’s best strategy for the phase-estimation game 240 Summary 243 Part 2: Conclusion 243 Part 3—Applied quantum computing 245 10 Solving chemistry problems with quantum computers 247 10.1 Real chemistry applications for quantum computing 248 10.2 Many paths lead to quantum mechanics 250 10.3 Using Hamiltonians to describe how quantum systems evolve in time 253 10.4 Rotating around arbitrary axes with Pauli operations 257 10.5 Making the change we want to see in the system 265 10.6 Going through (very small) changes 267 10.7 Putting it all together 270 Summary 275 11 Searching with quantum computers 277 11.1 Searching unstructured data 278 11.2 Reflecting about states 284 11.2.1 Reflection about the all-ones state 285 11.2.2 Reflection about an arbitrary state 286 11.3 Implementing Grover’s search algorithm 292 11.4 Resource estimation 299 Summary 305 12 Arithmetic with quantum computers 306 12.1 Factoring quantum computing into security 307 12.2 Connecting modular math to factoring 311 12.2.1 Example of factoring with Shor’s algorithm 315 12.3 Classical algebra and factoring 316 12.4 Quantum arithmetic 319 12.4.1 Adding with qubits 320 12.4.2 Multiplying with qubits in superposition 321 12.4.3 Modular multiplication in Shor’s algorithm 324 12.5 Putting it all together 327 Summary 332 Wrapping up 333 Appendix A—Installing required software 335 A.1 Running samples online 335 A.1.1 Using Binder 335 A.1.2 Using GitHub Codespaces 336 A.2 Installing locally using Anaconda 336 A.2.1 Installing Anaconda 336 A.2.2 Installing packages with Anaconda 336 A.3 Installing the Quantum Development Kit 338 A.3.1 Installing the .NET Core SDK 340 A.3.2 Installing the project templates 340 A.3.3 Installing the Visual Studio Code extension 341 A.3.4 Installing IQ# for Jupyter Notebook 341 Appendix B—Glossary and quick reference 342 B.1 Glossary 342 B.2 Dirac notation 345 B.3 Quantum operations 346 B.4 Q# Language 347 B.4.1 Types 347 B.4.2 Q# declarations and statements 348 B.4.3 Q# expressions and operators 351 B.4.4 Q# standard libraries 352 B.4.5 IQ# magic commands 354 Appendix C—Linear algebra refresher 355 C.1 Approaching vectors 355 C.2 Seeing the matrix for ourselves 358 C.2.1 Party with inner products 366 Appendix D—Exploring the Deutsch–Jozsa algorithm by example 369 D.1 Using our skills to try things 369 D.2 Step 1: Preparing the input state for Deutsch–Jozsa 370 D.3 Step 2: Applying the oracle 371 D.3.1 Example 1: The “id” oracle 373 D.3.2 Example 2: The “not” oracle 374 D.3.3 Example 3: The “zero” oracle 375 D.4 Steps 3 and 4: Undo the preparation on the target qubit, and measure 376 index 379 Symbols 379 A 379 B 379 C 379 D 380 E 380 F 380 G 380 H 380 I 380 K 381 L 381 M 381 N 381 O 381 P 381 Q 382 R 383 S 383 T 383 U 384 V 384 W 384 X 384 Y 384 Z 384 **__Learn Quantum Computing with Python and Q#__ introduces quantum computing from a practical perspective.****Summary**__Learn Quantum Computing with Python and Q#__**About the technology****About the book**__Learn Quantum Computing with Python and Q#__**What's inside****About the reader****About the author****Dr. Sarah Kaiser****. Dr. Christopher Granade****Table of Contents**
دانلود کتاب Learn Quantum Computing with Python and Q# : a Hands-On Approach