Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying A Practical Guide to Quantum Computing
  • Table Of Contents Toc
A Practical Guide to Quantum Computing

A Practical Guide to Quantum Computing

By : Elías F. Combarro Fernández-Combarro Álvarez, Samuel González Castillo
3 (1)
close
close
A Practical Guide to Quantum Computing

A Practical Guide to Quantum Computing

3 (1)
By: Elías F. Combarro Fernández-Combarro Álvarez, Samuel González Castillo

Overview of this book

This book is an introduction, from scratch, to quantum computing and the most important and foundational quantum algorithms—ranging from humble protocols such as Deutsch’s algorithm to ones with far-reaching potential, such as Shor’s factoring algorithm—offering clear explanations and a hands-on approach with runnable code on simulators and real hardware. The book is self-contained and does not assume any previous experience in quantum computing. Starting with a single qubit, it scales to algorithms using superposition and entanglement. At every step, examples of applications are provided, including how to create quantum money that is impossible to forge, quantum cryptography that cannot be broken, and algorithms for searching and factoring that are much faster than those that regular, non-quantum computers can use. Code for each of these algorithms is provided (and explained in detail) using Qiskit 2.1. After reading this book, you will understand how quantum algorithms work, how to write your own quantum programs, and how to run them on quantum simulators and actual quantum computers. You will also be prepared to take the jump into quantum algorithms for optimization and artificial intelligence, like those presented in our previous book, A Practical Guide to Quantum Machine Learning and Quantum Optimization.
Table of Contents (29 chapters)
close
close
Preface
Lock Free Chapter
1
Part 1 One Qubit to Rule Them All: Working with One Qubit
6
Part 2 Qubit Meets Qubit: Two Qubits and Entanglement
10
Part 3 Working with Many Qubits
14
Part 4 The Stars of the Show: Main Quantum Algorithms
18
Part 5 Ad Astra: The Road to Quantum Utility and Advantage
21
Bibliography
23
Index
3
Appendix C Measuring the Complexity of Algorithms
5
Appendix E Production Notes

13.3 Grover’s algorithm

In Chapter  12, we studied Grover’s algorithm in detail, and, as you surely remember, there are two main ingredients that it relies on: a Boolean function oracle that encodes the elements that we want to find and Grover’s diffusion operator. In Section  10.3.1, we gave a general (but not necessarily efficient) way of implementing oracles, so we will just focus on coding Grover’s diffusion operator.

Grover’s diffusion operator is in charge of performing the inversion about the mean operation. As we discussed in Section  12.2.3, this can be implemented with the following circuit:

HXXHHXXH............HXZXH

We already know how to write Qiskit code for every gate in the circuit with the only exception being the multi-controlled Z gate. In order to implement it, we will just use a ZGate object (which will instantiate a Z gate) and add to it a bunch of controls with the ZGate (). control ( n -1) instruction. Thus, we can use the following function...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
A Practical Guide to Quantum Computing
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon