Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Open Quantum Computing Textbook

The cover image will be uploaded soon! Please proceed to the next page.

Introduction

Chapter Contents

  1. About This Book
    1. Preface
    2. Acknowledgements
    3. Notations
    4. Chapter Dependency
  2. Getting Started
    1. Thinking and Learning
    2. Quantum Computing Tools
    3. Helpful Websites
  3. Books

About This Book

Module Contents

  1. Preface
  2. Acknowledgements
    1. Project Leaders
    2. Content Contributors
    3. Translators
    4. Reviewers
    5. Donators
    6. Technology Stacks
  3. Notations
    1. Mathematical Symbols
    2. Greek Alphabet
  4. Chapter Dependency
    1. Chapter 1: Introduction

Preface

I was a typical university student at Rensselaer Polytechnic Institute studying computer science and mathematics. The vast majority of people who are not in STEM would see computer science and mathematics as identical fields, which is understandable, but their approaches to discovering truth are quite different. A mathematician would enjoy the elegance of refined abstract ideas, rigorous logic, and creative solutions; on the other hand, a computer scientist would focus on more ‘practical’ problems that mathematicians may not care about. A mathematician may also criticize computer scientists for lax mathematical rigor, while a computer scientist may condemn mathematicians for solving problems with no practical use.

There was an ambiguous yet confident belief inside me, which motivated me to major in both subjects despite the heavy workload required by the institution. The belief was that, even though each field offers a different worldview, they do not have to be in conflict. I was aware that both computer science and mathematics play vital roles in our lives in their own ways. Furthermore, I believe that true innovation is born at the intersection of multiple disciplines, achieved through consistent communication and drawing inspiration from diverse perspectives. I called this belief ‘ambiguous’ simply because I could not name any solid example at that time.

It was my sophomore year to discover the existence of quantum computing, and it did not take long for me to realize that it was direct evidence of my belief. Quantum computing is the fusion of mathematics, computer science, quantum mechanics, and last but not least, engineering. Mathematics provides the formal backbone for quantum mechanics; quantum mechanics explains the ‘unusual’ rules of the microscopic world; computer science describes how these rules can benefit computation; and engineering turns quantum computers from theory into reality. As this text will address, quantum computing promises to bring advantages to many research fields, not limited to the disciplines mentioned earlier.

Many people assume that quantum computing is an arcane field due to the large number of prerequisites. But my ambition for this project is to make quantum computing accessible to everyone. We must acknowledge that some readers prefer rigor while others prefer intuition; to make this text truly accessible to everyone, I must balance these values. When I propose a rigorous definition, I will provide intuitive examples to make it comprehensive and approachable. Not forgetting the practical side, I plan to include chapters on applications of quantum computing after the theory part.

I initially started this project to archive what I learned from the quantum computing courses at university. Soon I realized that the best way to learn is to teach, as it forces me to organize information and find intuition in abstract ideas. As a recent graduate, I must admit that I do not possess enough knowledge or experience to ensure factual accuracy throughout the text. I addressed this by making the project open, which enables bidirectional communication between the author and readers, allowing the text to be consistently updated based on feedback.

I expect this text will be accessible to anyone familiar with high school algebra and trigonometry. However, some topics may require graduate-level knowledge, so I highly recommend consulting the Chapter Dependency section before diving into a specific topic. In addition, please understand that practice problems may not be available given the breadth of material covered. To avoid gaps in understanding, be sure to consult the ‘Further Reading’ subsection in each section to expand your knowledge and deepen your understanding, since learning is not always linear but more often network-like.

The way to understanding quantum computing and its applications will not be easy. You, as a reader, will encounter a lot of obstacles, like vague concepts that do not make sense and complex problems that look impossible to break down at first glance. But with enough dedication, effort, and resources you have, it will eventually get you through. Once you make it, you will feel more accessible to cutting-edge papers from the field of your interest than ever. Even if you end up choosing a different career path other than quantum computing, you will be able to apply some of the knowledge and skills you gained from here. I hope you enjoy it!

— Daniel Park

Acknowledgements

This section recognizes any individuals who have contributed to the development and enrichment of this textbook. Contributors of this project are listed with their permission. Additional sources, such as books, articles, and papers, are referenced in the ‘Further Reading’ subsection of each section. I sincerely appreciate your dedication and continued support.

Project Leaders

Project leaders guide the direction of the project, making key decisions and facilitate a collaborative community. They are responsible for reviewing pull requests, ensuring proper grammar, factual accuracy, consistent language, and appropriate use of external resources.

Content Contributors

Content contributors are individuals who have generously shared their original concepts, algorithms, advice, and/or pedagogical approaches featured in this textbook. Their insights enhance the content and inspire new perspective on quantum computing and quantum algorithms. Each contributor is acknowledged with their permission.

Translators

Translators play a vital role in making knowledge accessible to a global audience. Their support helps to overcome language barriers and ensure that this textbook reaches as many readers as possible. Each translator is acknowledged with their permission.

Reviewers

A top-notch textbook must aim for accuracy and clarity. Error reviewers assist by fact-checking, identifying missing sources, and pointing out conceptual/typographical errors from the text. Their valuable contributions help maintaining the integrity of the content. Each reviewer is acknowledged by their permission.

Donators

Donations support the ongoing development of this project and enable the acquisition of valuable resources. Every donation is highly appreciated. While it may be challenging to maintain a comprehensive list of donors, I will make best effort to update it as frequently as possible.

Technology Stacks

Last Updated: 09/01/2026

Notations

This section provides a brief overview of notational conventions that will be used in this book. Please note that this section does not provide a detailed explanation of what each symbol represents. You can use the search tool at the top of the section to find detailed explanations and relevant concepts.

Mathematical Symbols

This table serves as a reference for the mathematical symbols that will be used throughout this text. Precise definitions are not provided here but will be introduced as the material progresses. Even if you are already familiar with these notations, it is still highly recommended reviewing this subsection, as different texts may employ different conventions and symbol choices.

Please note that some mathematical symbols closely resemble Greek letters commonly used as variable names. One notable example would be and ; the former represents the summation operator, while the latter may be used as a variable name (e.g., for a set or a matrix). You should be able to distinguish these symbols by context.

SymbolDescription
summation
product
bitwise XOR operation
tensor product

Greek Alphabet

In the world of mathematics, science, and engineering, a wide range of variables and constants are notated by the Greek alphabet. You are encouraged to consult this table and become familiar with the shapes and names of these letters, as they will appear throughout the text. In most cases, a Greek letter is chosen when the name of the variable can be phonetically associated with that letter.

Please note that some Greek letters have multiple forms under the same name, particularly in text typeset with . One common example would be and ; although both are often referred to as ‘phi’ in everyday use, they have very distinct shapes. Unless specified, this textbook will treat such variants as separate symbols. Consistent use of each form will be maintained in order to avoid any unnecessary confusion.

Uppercase PrintLowercase PrintUppercase Lowercase Name
Ααalpha
Ββbeta
Γγ gamma
Δδ delta
Εε epsilon
Ζζzeta
Ηηeta
Θθ theta
Ιιiota
Κκ kappa
Λλ lambda
Μμmu
Ννnu
Ξξ xi
Οοomicron
Ππ pi
Ρρ rho
Σσ ς sigma
Ττtau
Υυ upsilon
Φφ phi
Χχchi
Ψψ psi
Ωω omega
ϜϝN/Adigamma

Chapter Dependency

This section provides a convenient guide to the prerequisites for each chapter. Please note that the most efficient way to learn a topic may not be linear due to the variety of materials in this text. You can find topics of your interest in the table of contents and use this guide to trace the prerequisite chapters.

Chapter 1: Introduction

This chapter does not have prerequisites.

Getting Started

Module Contents

  1. Thinking and Learning
    1. Focus Time
    2. Learning by Doing
    3. Occam’s Razor
    4. Divide and Conquer
    5. Art of Moving On
  2. Quantum Computing Tools
    1. Braket
    2. Cirq
    3. Lambeq
    4. PennyLane
    5. Qiskit
    6. Q# QDK
  3. Helpful Websites
    1. Error Correction Zoo
    2. QAgora
    3. Quantiki
    4. Quantum Algorithm Zoo
    5. Qubit Zoo
    6. Stack Exchange

Learning and Thinking

This section explores several learning and thinking practices you may find beneficial in the course of reading this text. In STEM (science, technology, engineering, & mathematics), especially the one as sophisticated as quantum computing, requires strong resilience, critical thinking, and problem-solving skills. I recommend you to at least skim it through before beginning the quantum computing journey. Of course, there might be a chance that the advice does not apply on your behalf, so please take it with a grain of salt.

Focus Time

No matter how strong your willpower is, there is a strict time limit for a deep focus. I recommend applying Pomodoro technique in your study sessions. Say you want to dedicate 3 hours to studying per day. First, set your focusing time (up to about 25 minutes) and resting time (up to about 10 minutes). Then you would focus on studying for 25 minutes and take a short break for 5 minutes. Repeating this process 5 more times will get you to your studying goal without exhaustion.

Learning by Doing

To make knowledge truly yours, you will have to apply it somewhere. As you will encounter a lot of abstract concepts on the way, building a strong foundation is undoubtedly important. When you come across exercise problems, give them a try to check what you actually understand. For computer algorithms, implementing them into actual codes will be helpful for breaking down the process and seeing what is going on. Exposing yourself to the abstract concepts will make you build inner intuition, preparing you for other, even advanced concepts.

Occam’s Razor

Pluralitas non est ponenda sine necessitate.

Plurality should not be posited without necessity.

Commentaria oxoniensia ad IV libros magistri sententiarum by John Duns Scotus

When you are stuck with an abstract concept, you might choose explanations with straightforward reasoning over complicated ones. This is what Occam’s razor is about. The term Occam’s razor refers to when two or more theories with identical conclusions are competing, the one with the simplest explanation is preferred. You might think that scientists are ruthlessly complex human beings, but this is not true since science adapted this philosophy. They, like you, also seek the simplest possible explanation of the scientific phenomenon they are studying, but keep the necessary components of the argument to back up their points.

For example, let’s say we want to demonstrate that there are infinitely many prime numbers. To remind you what a prime number is, the widely accepted definition is a natural number greater than whose divisors are and itself only. Also, when a natural number divides another natural number , it just means does not have any remainders. Since the age of Euclid, numerous mathematicians have proposed different proofs for this mathematical fact. Here, I give you two of them. I don’t expect you to understand everything from these proofs, but I hope you can at least tell which one reads better for you.

Proof 1: Suppose there are finitely many prime numbers. Then we can list out exhaustive prime numbers: , , , . Let us multiply all of these primes and add , so . There are two cases: is a prime number or not. If is a prime, then we are saying that we have another prime number we did not list previously. If is not a prime, then there must be a prime number that divides from the list. But we know that divides the product , so cannot divide . In both cases, we ended up encountering contradictions. Therefore, there must be infinitely many prime numbers. ■

Proof 2: Just like the previous proof, we initially assume there are finitely many prime numbers. Let us recall the following facts:

  • By the fundamental theorem of arithmetic, for any natural number , we have a unique prime factorization such that ;
  • The harmonic series diverges: ; and
  • If , then this geometric series converges: .

Let us denote the prime numbers as , , , . Note that does not diverge to infinity. By using the facts listed above and applying the distributive law, we get: As we encountered a contradiction, our initial assumption must be false. Therefore, there must be infinitely many prime numbers. ■

The second proof looks way more intimidating than the first one! What is the fundamental theorem of arithmetic about? What does it mean by a series diverging or converging? What about those pesky and symbols? At the end of the day, both proofs are valid and make the same point: there are infinitely many prime numbers. But it requires too much background knowledge in order to read the second proof unless you are familiar with mathematics. Therefoere, for general audiences without any experience in university level of mathematics, the first proof might be a more adequate choice to explain the infinitude of the primes.

You might be wondering how this philosophical principle is applied to learning. As a writer, I am obliged to expect the minimal possible requirements from the readers, ensuring that explanations are easy to follow for every topic. On the other hand, you, as a reader, are strongly advised to not overcomplicate the literature you are reading. For each topic, there is a reason that the topic is introduced in the text. Know the goal, and most importantly, try your best to understand and follow the logic. Then try to find what and why you don’t understand in order to ask questions.

Divide and Conquer

Originally, the term ‘divide and conquer (divide et impera)’ was used in politics. It refers to a strategy that allows an entity to take control over other entities by imposing political division. We can also observe this kind of interaction in different disciplines, such as history, legal theory, economics, and even our daily lives. In order to dominate the enemy, we have to divide them until we can handle it with ease.

And in terms of problem-solving, those challenging-looking problems will be your enemies. Indeed, the divide and conquer tactic can be applied as a problem-solving technique. In fact, it is an actual approach to gain algorithmic solutions to problems studied in computer science. A typical divide and conquer algorithm proceeds like this:

  1. Break the problem into smaller and similar instances;
  2. Solve these subproblems; and
  3. Combine their answers appropriately.

Just like setting up a plan before proceeding to a heavy task, you will have to break the problem down (not necessarily similar instances as in the computer science formalism above). The point is to make the problem into more manageable pieces. There might be a chance of finding subproblems is not apparent. Even if that is the case, you should play with the problem and the related concepts for a while to establish patterns that might be useful to solve the problem.

Art of Moving On

On occasion in our lives, we get stuck on a thing. It can be a problem you are trying to solve, or it can be one concept you are trying to grasp. You might seek more inspiration to tackle the problem, and you might need a brilliant new perspective to analyze the concept. Despite your continued effort, you make almost no progress. And your time and patience run out. Before you choose to give up learning what you want, let me give you advice for you. If you truly believe you gave at least one attempt at every method you could come up with but still failed to reach your goal, you should move away from it and do something else. You can always come back later.

You might be wondering what exactly you should do. You can take a light walk, you can finish house chores that you are supposed to do after the study session, and you can even check your phone for a brief period. Moving on sounds like you are losing focus, but it actually serves two purposes. One is you can give your brain a rest to get refreshed. The other one is, by doing something different, you can get inspired by different approaches towards your goal, sparking a potential incubation effect. Once you can come up with a new approach, return to your desk as soon as possible to give it a try. Keep in mind: an unexpected solution may appear in unexpected places, and if something gets exhausted, it will just show weaker performance, whether it is a human or a machine.

Also, reading the next page ahead may help you in a way. It might sound counterintuitive since fields like STEM require a strong understanding of previously mentioned materials. In fact, our brains are not designed for abstract ideas but pattern-seeking. For instance, when an abstract definition is given out of context, it is likely that your brain gets intimidated by it. By reading the next page, you can see more examples of what kind of object falls under the definition and how it is applied to solve a problem. In essence, you are allowing your brain to find and recognize the pattern. However, this method is not recommended when you skip too many materials already because filling the gap would not be durable at that point; you rather need to ask others for help. Let the aha moments be with you.

Quantum Computing Tools

This section lists tools for quantum computing that are available on the market. To achieve accessibility for users without experience in computer programming, most of them are distributed as Python packages. On the other hand, some of them are for newly designed languages dedicated to quantum programming. Even those languages are based on the classical programming languages. Some tools are open source, so you can contribute to the project.

Braket

Amazon Braket is a Python SDK offered by Amazon Web Services (AWS). You can send your quantum circuits to quantum computers hosted by paid cloud services. Braket allows working with Qiskit and PennyLane, but the official support for Ocean was deprecated in 2022. You can see various quantum algorithms implemented in Braket here.

Cirq

Cirq is a Python-based quantum computing framework managed by Google Quantum AI. You can implement quantum algorithms with this framework to run on a real quantum hardware or a simulator. It is designed to cooperate with TensorFlow Quantum.

Ocean

Ocean SDK is a Python SDK managed by D-Wave. While the vast majority of quantum SDKs are for describing circuits on general-purpose quantum computers, this SDK is specialized in solving combinatorial optimization problems on quantum annealers. Instead of building quantum circuits to run, you have to describe what kind of problem you want to solve on the D-Wave quantum annealer.

Lambeq

Lambeq (λambeq) is a Python library created by Quantinuum dedicated to quantum natural language processing (QNLP). It can parse sentences written in a natural language and convert the parsed sentences to quantum circuits. Additionally, this library also supports training NLP models.

PennyLane

PennyLane is a Python framework dedicated to quantum machine learning managed by Xanadu. This framework officially supports a variety of quantum devices as well as classical machine learning frameworks.

Qiskit

Qiskit (Quantum Information Science Kit) by IBM is the go-to Python framework for quantum computing. General quantum circuits can be described with this framework and transpiled under a specific IBM quantum backend architecture. Qiskit also supports a simulator that can run on your local machine. It has one of the biggest ecosystems in quantum computing, so you will be able to find a Qiskit package dedicated to a specific use in your interest like quantum machine learning.

Q# QDK

Q# is a quantum programming language developed by Microsoft. Circuits described by Q# can be simulated and realized by QDK (Quantum Development Kit), which is also created by Microsoft. QDK can be installed on VSCode and work alongside with Microsoft Copilot. You can see the list of implemented quantum algorithms and language tutorials here.

Helpful Websites

This section provides a few helpful websites to learn more about quantum computing. These websites can be used to explore new algorithms and tricks that are not covered in this text and get help on stuck problems.

Error Correction Zoo

In the world of quantum computing, error correction is an important part of the study since the current quantum computers are considerably erroneous. Error Correction Zoo provides a handful of error correction techniques in both classical and quantum settings. It also provides references to the papers, so a curious reader can easily dive into the details.

QAgora

QAgora is a collection of zoos related to quantum computing and quantum technology. Currently, only quantum protocol zoo is active, which lists and explains possible usages of quantum networks. It is preparing for different zoos such quantum programming language zoo and benchmarking zoo. One unique feature of this website is the interactive knowledge graph, which allows readers to pick where to start before reading challenging topics.

Quantiki

Quantiki is a great resource for quantum information science enthusiasts and researchers. It mainly features a list of quantum circuit simulators and academic job postings. This portal also serves as an international community of quantum information science, so it also lists numerous research groups from all around the globe.

Quantum Algorithm Zoo

Quantum Algorithm Zoo is a handful collection of quantum algorithms, written by Dr. Stephen P. Jordan. It features four main categories of quantum algorithms:

  1. Algebraic and Number Theoretic Algorithms
  2. Oracular Algorithms
  3. Approximation and Simulation Algorithms
  4. Optimization, Numerics, and Machine Learning

You can compare the speedup, investigate what kind of problems that a quantum computer can handle, and refer to the original papers to deepen your understanding. The zoo also features the official French and Japanese translations.

Qubit Zoo

What distinguishes between a classical bit and a quantum bit (qubit) is how it encodes information. Qubits leverage principles of quantum systems to encode and process information. The key to implementing qubits and quantum computers is to create stable quantum systems and isolate them from the environment. Several methods are proposed, and Qubit Zoo lists them.

Stack Exchange

Stack Exchange is a classic Q&A website for multiple disciplines. Please make sure to read and follow the rules before posting. Especially, when asking a question on Stack Exchange, try your best to find answers from similar questions in prior, state your background, and explain what you do not understand.

Books

At the end of every chapter, the books that inspired the most to write the chapter are listed. For those studious readers who are willing to dig deeper into the materials that were covered in this chapter, you are highly recommended to add these books to your reading list. In this chapter, we briefly introduced several tips on learning, tools used in quantum computing, and helpful websites for your quantum computing journey. Unfortunately, there are not a lot of books to recommend in regard of these topics, but there is a great introductory quantum computing book for beginners.

Introductory Quantum Computing

Despite the fact that quantum computing requires wide background knowledge in multiple disciplines, there have been attempts to make quantum computing more reachable for general audiences. Hopefully, the book listed here do not require a lot of prerequisites. The materials covered by them are remarkably simplified for the newcomers. The biggest hurdle to overcome would be adapting to new kinds of concepts, which most of them could never be seen before. Even though many find phenomena studied in quantum physics unintuitive, introduction to them is inevitable since it is what quantum information theory and quantum computers are based upon. On the bright side, accepting a few experimental results should be sufficient for this book.

Quantum Computing for Everyone

  • Author(s): Chris Bernhardt
  • Publisher: The MIT Press
  • Publish Date: September 8, 2020
  • Page Length: 216 pages
  • ISBN: 9780262539531

Without any doubt, this book is one of the best introductions to quantum computing. Quantum Computing for Everyone by Chris Bernhardt is a comprehensive guide to quantum computing for beginners. As the author recognizes, describing quantum phenomena and quantum computing without mathematics is impossible. In spite of that, the author managed the literature to require the minimum possible background knowledge. They even put imaginary numbers aside to reduce the complexity further. Anyone who is comfortable with high school mathematics should take a look.

In the first chapter, the book explains the key experimental results of quantum physics such as electron spin and photon polarization. The readers are encouraged to find experiment videos on YouTube rather than moving on with text. Then it introduces basic linear algebra and quantum mechanics concepts such as superposition, entanglement, and measurement. Subsequently, to build up the baseline for the quantum algorithms, Boolean algebra, classical logic gates, and classical circuits are mentioned. Combining all of these materials, the book ends with important quantum algorithms such as the Deutsch-Jozsa algorithm, Grover algorithm, and Shor algorithm, as well as possible impacts.

Before moving to advanced texts, readers should still learn the actual mathematics and quantum mechanics behind quantum computing. Especially, due to the fact that real numbers are chosen to describe quantum systems in this book, some vocabulary used in this book needs to be swapped for the ‘complex’ counterpart. For instance, from ‘orthogonal matrices’ to ‘unitary matrices’ and from ‘equivalence of the states by a factor of ’ to ‘equivalence of the states up to global phase’. But with this book, readers must be able to build a strong foundation for how quantum computers operate.