# Preface

Several years ago, in the waiting room of a physician’s office, I picked up a copy of the magazine *Nature*. One of the issue’s articles lit a fire under me and led me to the study of quantum computing. At first, I was perplexed. How can this model of computing be so different from the kind of computing we know and love? Why do these strange circuits yield correct answers to mathematical problems?

Being a teacher, I knew that the best way to learn something was to try explaining it to someone else. So I decided to offer a one-semester course for university students. A typical quantum computing introduction involves programming, physics, and abstract mathematics. I wanted my course to attract students from many disciplines, and frankly, I didn’t want the course to be canceled for lack of enrollment. To make this work, I had to carve out a section of the subject that required a carefully measured amount of background knowledge. I wanted students to perform some calculations. But first and foremost, I wanted them to understand *why* certain quantum computing algorithms work. What does a particular quantum circuit have to do with the problem that they’re trying to solve?

After several false starts, I landed on a plan to focus on matrix operations. Students learned about matrix multiplication and the tensor product. They programmed quantum computers on IBM’s cloud and performed routine calculations to verify the results. Through in-class explorations, they developed insights into the way quantum computing algorithms work. Best of all, they enjoyed the course.

In 2022, the people at Packt asked me to write a book on a particular topic that didn’t interest me. So, I turned the tables on them and proposed a quantum computing book. They took the bait, and the result is the book that you’re reading right now. To be clear, this isn’t a textbook, nor is it a scholarly volume. It’s not a comprehensive guide of any kind. It’s my humble attempt to describe quantum computing algorithms in some detail using only a modest dose of mathematics.

I summarize my approach to the subject in the following bullets:

- I introduce matrix operations in
*Chapter 1*. Throughout the book, I use matrices to describe basic ideas about quantum computing. I avoid the abstractions that linear algebra requires. - I favor examples with actual numbers over formulas and equations.
- When in doubt, I show all the steps in each of the calculations. If there’s too much detail for you, just skip over some parts.
- My most important goal is to help you form intuitions about the way quantum computing algorithms work. I use pictures, analogies, and some silly stories to help you understand
*why*the algorithms do what they do. (Some quantum computing algorithms are quite challenging in this respect, but I try as best I can.)

This approach has some built-in limitations. If you hated math when you went to school and you never want to see a math problem ever again, this book might not be for you. On the flip side, you may have already studied linear algebra with its vector spaces and eigenvalues. If so, you’ll learn less from this book than you would from a more advanced introduction. (Without abstract mathematics, we’re limited in what we can cover.)

But I’ve developed this book’s material during three offerings of an introductory college course. And, with each offering, the results were outstanding. Students learned a lot about quantum computing and recommended the course to their friends. I have three semesters of exams and course evaluations to prove all this! So, I hope you keep reading. If all goes as planned, you’ll find this material to be interesting, enlightening, and maybe even entertaining!