Skip to content

About

Implementation of a distance-3 planar surface code for quantum error correction using Qiskit, featuring stabilizer syndrome extraction, noise simulation, and a look-up table decoder.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Surface Code & Quantum Error Correction with Qiskit

This GitHub repository contains practical work and notebooks dedicated to the study of surface codes and quantum error correction implemented using Qiskit.


1. Principle of a Surface Code

Physical quantum computers are extremely sensitive to environmental noise (decoherence, fluctuations). The surface code is one of the most robust topological architectures to achieve fault tolerance. Its principle consists in encoding the information of a logical qubit within a two-dimensional grid (a 2D lattice) composed of a large number of physical qubits (for example, 17 qubits for a distance $d=3$). This allows errors to be detected and corrected locally using only interactions between neighboring qubits.

2. What is a Stabilizer? (Definition)

Since the no-cloning theorem prevents copying a quantum state to check if it has been altered, we use the stabilizer formalism:

  • Definition: A stabilizer is a multi-qubit Pauli operator (typically measured on a plaquette of 4 data qubits around an ancilla qubit) that leaves the logical state invariant ($g |\psi_L\rangle = +1 |\psi_L\rangle$).
  • Role:
    • $Z$ plaquettes ($Z^{\otimes 4}$) measure phase parity and detect Bit-flip ($X$) errors.
    • $X$ plaquettes ($X^{\otimes 4}$) measure bit parity and detect Phase-flip ($Z$) errors.
  • Non-destructive measurement: Using ancilla qubits and logic gates (CNOT, Hadamard), we extract an error syndrome ($\pm 1$ values) without collapsing or destroying the quantum state of the data.

3. Repository Contents (Notebooks)

Current Notebook:

  • surface_code_introduction.ipynb : Step-by-step implementation of a distance $d=3$ planar surface code (17 physical qubits). This notebook covers:

    • Modeling the 2D geometric topology (data and ancilla qubits).
    • Creating syndrome extraction circuits for $X$ and $Z$ stabilizers.
    • Artificially injecting Pauli errors ($X$, $Z$, $Y$).
    • Simulation using Qiskit (AerSimulator) and implementing a classical decoder via a Look-up Table.
  • machine_learning_decoder_for_surface_codes.ipynb (in progress) : I would like to work on using Machine Learning methods (PyTorch MLP) to replace the classical look-up table, allowing us to handle complex syndromes and correct multiple errors with a weight greater than 1.

Future Notebooks (Upcoming Projects):

  • Google Quantum AI - Scaling & Fault Tolerance Notebook (Coming Soon) : I would like to reproduce and analyze the results of Google's landmark 2023 paper on the suppression of logical errors through surface code scaling.

References

About

Implementation of a distance-3 planar surface code for quantum error correction using Qiskit, featuring stabilizer syndrome extraction, noise simulation, and a look-up table decoder.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages