Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 45

Qubits, Logical Qubits, and Fault Tolerance

Recommended resources

Hello! Welcome to the final lesson of your course on the principles of quantum computing.

In our last session, you successfully implemented the 3-qubit bit-flip code in Qiskit. You saw firsthand how using multiple, entangled physical qubits could protect a single piece of information from errors. This powerful idea is the key to unlocking practical quantum computation.

Today, we will formalize and expand on that concept. Your goal for this lesson is to distinguish between physical and logical qubits and the concept of fault-tolerance. We'll explore how the error correction schemes we've studied are part of a much larger strategy to build quantum computers that can run complex algorithms reliably, even though their fundamental components are imperfect.

This lesson serves as the capstone of our course, connecting the algorithms you've learned with the real-world hardware challenges that engineers and physicists are working to solve.

1. From Physical Noise to Logical Protection

Let's begin by defining the two types of qubits at the heart of this topic. At a high level, the distinction is simple:

  • Physical qubits are the actual hardware—the superconducting circuits, trapped ions, or other quantum systems that are susceptible to noise.
  • Logical qubits are an abstraction—a robust representation of one qubit's worth of information that is encoded across many physical qubits to protect it from errors.

The following short videos offer a great introduction to this idea, one using an analogy and the other using the very repetition code you just implemented.

Understanding Logical Qubits with Quantinuum

First, watch this video from Quantinuum for a helpful analogy. It compares a single, error-prone physical qubit to a solo musician and a robust logical qubit to an entire orchestra.

Watch the full video. Notice how the orchestra's redundancy allows the performance to continue even if one musician makes a mistake. This is the core principle of a logical qubit. The segment on the orchestra is particularly relevant.

What is the difference between logical and physical qubits? - 1 Minute Qiskit

Next, watch this "1 Minute Qiskit" video. It provides a more technical definition that directly connects to your work in the last lesson.

Watch the full video. It clearly defines a physical qubit as the direct component in a device and a logical qubit as information encoded across multiple physical qubits. It then uses the 3-qubit repetition code as a concrete example of this encoding.

The key takeaway is that we are trading quantity for quality. We use many fragile physical qubits to create a single, much more reliable logical qubit. The image below powerfully illustrates this trade-off.

Physical vs. Logical Qubits: The True Measure of Power
This infographic shows how over a million noisy physical qubits might be needed to produce around 1,000 protected logical qubits using a quantum error correction (QEC) scheme called the Surface Code. It highlights that the number of physical qubits is a "vanity metric" if their quality (fidelity) is low.

2. The Fault-Tolerance Threshold

In the previous lesson, you ran a simulation to test the 3-qubit repetition code against random noise. You generated a plot comparing the performance of the encoded (logical) qubit versus a single, unprotected (physical) qubit. This experiment revealed a critical insight.

Let's revisit that result, which is described in the final section of the article you used.

Simulating Random Bit-Flip Noise to Test the Repetition Code

This section of the article you read previously analyzes the performance of the repetition code under varying levels of noise.

Please review the section "Simulating Random Bit-Flip Noise to Test the Repetition Code", focusing on the code for the "Stress Test" and the final performance graph (Fig. 8).

The graph from that simulation shows that the 3-qubit logical qubit only performs better than a single physical qubit when the physical error rate, , is below 0.5. If , the "majority vote" correction logic is more likely to be wrong than right, and the error correction code actually makes things worse.

This concept is known as the fault-tolerance threshold. Every quantum error correction code has a threshold error rate for the physical hardware. If the physical qubits are better (less noisy) than this threshold, then applying the code and adding more qubits will systematically reduce the logical error rate. If the hardware is worse than the threshold, the code is useless.

Achieving physical error rates below this threshold is one of the single greatest challenges in experimental quantum computing today.


3. The Architecture of a Fault-Tolerant Computer

So, what does it mean to build a truly "fault-tolerant" machine? It's more than just using a QEC code. It involves a complete, layered approach where every part of the computation is designed to prevent errors from propagating and destroying the calculation.

Approach to fault tolerance

This documentation from IBM Quantum outlines the basic strategy for building a fault-tolerant quantum computer.

Please read the section titled "Fault-tolerant circuit implementations". Focus on the three key components it describes for a fault-tolerant system.

Based on your reading, a fault-tolerant architecture involves three core ideas:

  1. Logical Qubits: As we've discussed, information is encoded in logical qubits using a QEC code. The logical qubits are an abstraction; the computer only ever interacts with the underlying physical qubits.
  2. Fault-Tolerant Gates ("Gadgets"): You can't just apply a standard CNOT gate to two logical qubits. Instead, you must use a complex sequence of operations on their underlying physical qubits. This sequence, sometimes called a "gadget," is specially designed to perform the logical gate's function while simultaneously detecting and correcting errors that might occur during the operation itself.
  3. Repeated Error Correction: Noise is relentless. Errors can happen at any moment, even when a qubit is idle. Therefore, a fault-tolerant computer must constantly run error-correction cycles in the background, measuring syndromes and correcting errors to keep the logical information clean.

This creates a layered architecture, which should feel familiar from your background in electronics and computer engineering.

Layered Architecture of a Fault-Tolerant Quantum Computer
This diagram illustrates the abstraction layers in a fault-tolerant quantum computer. The quantum algorithm operates on robust logical qubits, which are themselves an abstraction built from many noisy physical qubits and a continuous process of quantum error correction (QEC).

This is the ultimate goal: to create a logical layer so reliable that a programmer can design algorithms using logical qubits and gates without needing to worry about the noisy chaos happening at the physical layer.


Conclusion

Congratulations on completing the course! Over the past eight weeks, you have built a solid foundation in the principles of quantum computing.

In this final lesson, we brought together the concepts of noise and error correction to define the essential distinction between physical and logical qubits.

Key Takeaways:

  • Physical qubits are the real, error-prone hardware components of a quantum computer.
  • Logical qubits are robust, protected units of quantum information created by encoding a single qubit's state across many entangled physical qubits.
  • Fault-tolerance is a design strategy for building reliable quantum computers from unreliable parts. It requires:
    • Physical qubits with error rates below a specific threshold.
    • Quantum error correction (QEC) codes to detect and correct errors.
    • Fault-tolerant gate operations ("gadgets") that work on logical qubits without spreading errors.

Your journey has taken you from the basic mathematics of qubits and vectors to the application of quantum gates, the construction of circuits in Qiskit, and the implementation of key algorithms like Grover's search. You've now concluded by exploring the monumental engineering challenge of fault-tolerance, which bridges the gap between the algorithms we desire and the hardware we can build.

You began this course with the goal of understanding quantum computing principles, and you now possess the conceptual and practical framework to explore this exciting field further. Whether your interest lies in designing new algorithms, developing error-correction codes, or contributing to the engineering of quantum hardware, you are well-equipped for the next step.