Foreword |
|
xv | |
preface |
|
xvii | |
acknowledgments |
|
xix | |
About this book |
|
xxi | |
About the Authors |
|
xxv | |
About the Cover Illustration |
|
xxvi | |
|
Part 1 Getting started with quantum |
|
|
1 | (130) |
|
1 Introducing quantum computing |
|
|
3 | (14) |
|
1.1 Why does quantum computing matter? |
|
|
4 | (1) |
|
1.2 What is a quantum computer? |
|
|
5 | (3) |
|
1.3 How will we use quantum computers? |
|
|
8 | (5) |
|
"What can quantum computers do? |
|
|
10 | (1) |
|
What can't quantum computers do? |
|
|
11 | (2) |
|
|
13 | (4) |
|
What is a quantum program? |
|
|
14 | (3) |
|
2 Qubits: The building blocks |
|
|
17 | (37) |
|
2.1 Why do we need random numbers? |
|
|
19 | (3) |
|
2.2 What are classical bits? |
|
|
22 | (5) |
|
What can we do with classical bits'? |
|
|
23 | (3) |
|
Abstractions are our friend |
|
|
26 | (1) |
|
2.3 Qubits: States and operations |
|
|
27 | (19) |
|
|
28 | (2) |
|
|
30 | (4) |
|
|
34 | (4) |
|
Generalizing measurement: Basis independence |
|
|
38 | (3) |
|
Simulating qubits in code |
|
|
41 | (5) |
|
2.4 Programming a working QRNG |
|
|
46 | (8) |
|
3 Sharing secrets with quantum key distribution |
|
|
54 | (21) |
|
3.1 All's fair in love and encryption |
|
|
54 | (9) |
|
|
58 | (4) |
|
Sharing classical bits with qubits |
|
|
62 | (1) |
|
|
63 | (3) |
|
3.3 Quantum key distribution: BB84 |
|
|
66 | (5) |
|
3.4 Using a secret key to send secret messages |
|
|
71 | (4) |
|
4 Nonlocal games: Working with multiple qubits |
|
|
75 | (15) |
|
|
76 | (5) |
|
|
76 | (1) |
|
Testing quantum physics: The CHSH game |
|
|
76 | (4) |
|
|
80 | (1) |
|
4.2 Working with multiple qubit states |
|
|
81 | (9) |
|
|
81 | (2) |
|
Why is it hard to simulate quantum computers? |
|
|
83 | (2) |
|
Tensor products for state preparation |
|
|
85 | (1) |
|
Tensor products for qubit operations on registers |
|
|
86 | (4) |
|
5 Nonlocal games: Implementing a multi-qubit simulator |
|
|
90 | (18) |
|
5.1 Quantum objects in QuTiP |
|
|
91 | (12) |
|
|
96 | (3) |
|
Measuring up: How can we measure multiple qubits? |
|
|
99 | (4) |
|
5.2 CHSH: Quantum strategy |
|
|
103 | (5) |
|
6 Teleportation and entanglement: Moving quantum data around |
|
|
108 | (23) |
|
|
109 | (8) |
|
Swapping out the simulator |
|
|
112 | (3) |
|
What other two-qubit gates are there? |
|
|
115 | (2) |
|
6.2 All the single (qubit) rotations |
|
|
117 | (9) |
|
Relating rotations to coordinates: The Pauli operations |
|
|
119 | (7) |
|
|
126 | (5) |
|
Part 2 Programming quantum algorithms in Q# |
|
|
131 | (86) |
|
7 Changing the odds: An introduction to Q# |
|
|
133 | (19) |
|
7.1 Introducing the Quantum Development Kit |
|
|
134 | (3) |
|
7.2 Functions and operations in Q# |
|
|
137 | (6) |
|
Playing games with quantum random number generators in Q# |
|
|
138 | (5) |
|
7.3 Passing operations as arguments |
|
|
143 | (6) |
|
7.4 Playing Morgana's game in Q# |
|
|
149 | (3) |
|
8 What is a quantum algorithm? |
|
|
152 | (33) |
|
8.1 Classical and quantum algorithms |
|
|
153 | (3) |
|
8.2 Deutsch--Jozsa algorithm: Moderate improvements for searching |
|
|
156 | (5) |
|
Lady of the (quantum) Lake |
|
|
156 | (5) |
|
8.3 Oracles: Representing classical functions in quantum algorithms |
|
|
161 | (9) |
|
|
162 | (3) |
|
|
165 | (5) |
|
8.4 Simulating the Deutsch--Jozsa algorithm in Q# |
|
|
170 | (4) |
|
8.5 Reflecting on quantum algorithm techniques |
|
|
174 | (6) |
|
Shoes and socks: Applying and undoing quantum operations |
|
|
175 | (3) |
|
Using Hadamard instructions to flip control and target |
|
|
178 | (2) |
|
8.6 Phase kickback: The key to our success |
|
|
180 | (5) |
|
9 Quantum sensing: It's not just a phase |
|
|
185 | (32) |
|
9.1 Phase estimation: Using useful properties of qubits for measurement |
|
|
186 | (5) |
|
Part and partial application |
|
|
186 | (5) |
|
|
191 | (6) |
|
9.3 Run, snake, run: Running Q# from Python |
|
|
197 | (5) |
|
9.4 Eigenstates and local phases |
|
|
202 | (4) |
|
9.5 Controlled application: Turning global phases into local phases |
|
|
206 | (6) |
|
Controlling any operation |
|
|
210 | (2) |
|
9.6 Implementing Lancelot's best strategy for the phase-estimation game |
|
|
212 | (3) |
|
|
215 | (1) |
|
|
215 | (2) |
|
Part 3 Applied quantum computing |
|
|
217 | (90) |
|
10 Solving chemistry problems with quantum computers |
|
|
219 | (30) |
|
10.1 Real chemistry applications for quantum computing |
|
|
220 | (2) |
|
10.2 Many paths lead to quantum mechanics |
|
|
222 | (3) |
|
10.3 Using Hamiltonians to describe how quantum systems evolve in time |
|
|
225 | (4) |
|
10.4 Rotating around arbitrary axes with Pauli operations |
|
|
229 | (8) |
|
10.5 Making the change we want to see in the system |
|
|
237 | (2) |
|
10.6 Going through (very small) changes |
|
|
239 | (3) |
|
10.7 Putting it all together |
|
|
242 | (7) |
|
11 Searching with quantum computers |
|
|
249 | (29) |
|
11.1 Searching unstructured data |
|
|
250 | (6) |
|
11.2 Reflecting about states |
|
|
256 | (8) |
|
Reflection about the all-ones state |
|
|
257 | (1) |
|
Reflection about an arbitrary state |
|
|
258 | (6) |
|
11.3 Implementing Graver's search algorithm |
|
|
264 | (7) |
|
|
271 | (7) |
|
12 Arithmetic with quantum computers |
|
|
278 | (29) |
|
12.1 Factoring quantum computing into security |
|
|
279 | (4) |
|
12.2 Connecting modular math to factoring |
|
|
283 | (5) |
|
Example of factoring with Shor's algorithm |
|
|
287 | (1) |
|
12.3 Classical algebra and factoring |
|
|
288 | (3) |
|
|
291 | (8) |
|
|
292 | (1) |
|
Multiplying with qubits in superposition |
|
|
293 | (3) |
|
Modular multiplication in Shor's algorithm |
|
|
296 | (3) |
|
12.5 Putting it all together |
|
|
299 | (8) |
Appendix A Installing required software |
|
307 | (7) |
Appendix B Glossary and quick reference |
|
314 | (13) |
Appendix C Linear algebra refresher |
|
327 | (14) |
Appendix D Exploring the Deutsch--Jozsa algorithm by example |
|
341 | (10) |
index |
|
351 | |