A Methods Focused Guide to Quantum Error Correction and Fault-Tolerant Quantum Computation#

Abdullah Khalid#

What will this book teach you?#

This mini-book limits itself to qubit stabilizer codes, which are among the most actively researched quantum error-correction codes. I wrote this mini-book more to teach myself than anyone else. The main questions that I wanted answered in this book are, how can I

  • Construct encoding, decoding and syndrome measurement circuits for stabilizer codes?

  • Algorithmically generate fault-tolerant quantum circuits for stabilizer codes?

  • Numerically compute the fault-tolerance thresholds of these circuits?

What are the pre-requisites to this book?#

You should be familiar with the fundamentals of quantum computing model. In particular, you should be comfortable with

  • The quantum circuit model and aware of the action of common gates.
  • The matrix representation of quantum gates and their connection with the truth table of the gates. This includes familiarity with linear algebra.
  • Any of the quantum computing sdks (qiskit, cirq, etc). These are not directly used, but experience will help with the programming in the book.

Why should you read this book?#

As an introductory guide to the subject matter, this mini-book is worth paying attention to because of two reasons:

  • This book focuses deeply on methods and algorithms. This is unlike many other introductions which limit themselves to abstract discussions, simple examples, and mathemtical proofs. While theorems and their proofs are an essential part of the book, the author believes that intuition and understanding cannot be built without getting one's hands dirty in algorithmic implementations and mathematical calculations.

  • This book is highly interactive. Each section is accompanied by mathematical or programming tasks that enhance the user's understanding of the material. Often, essential parts of the arguments are to be filled in by reader in these tasks.

    While an online copy is viewable to entice potential readers, the source of this book - a set of Jupyter notebooks - should be downloaded and interactively read.

To download the Jupyter notebooks, please clone the repository

git clone https://github.com/abdullahkhalids/qecft.git

Or download the repository as a zip file and extract it. After this open contents.ipynb.

Stac, a software library for this book#

Stac stands for Stabilizer codes, and this library is designed to work with them. Many of the algorithms that I introduce in the book are implemented within this library. It is a very simply library and easy to pick up as you read the book. However, many of the tasks and exercises in the book can be completed in pure python and your favorite quantum SDK.


To cite this book, please use the following bibtex entry

  title = {A Methods Focused Guide to Quantum Error Correction and Fault-Tolerant Quantum Computation},
  author = {Abdullah Khalid},
  year = 2023,


The initial drafts of this book were produced with the help of a grant by the Unitary Fund.