Computational studies of quantum error correction using Python and Qiskit.
This repository currently contains an implementation and analysis of the five-qubit [[5,1,3]] stabilizer code.
Notebook: five-qubit-code/five_qubit_code.ipynb
The notebook:
- derives syndromes for all 15 single-qubit Pauli errors;
- constructs the stabilizer group;
- verifies the exact code distance,
d = 3, by exhaustive search over five-qubit Pauli operators; - shows that the code saturates the quantum Hamming bound;
- prepares and verifies logical code states;
- constructs a four-ancilla syndrome-extraction circuit;
- verifies recovery of all 15 weight-one Pauli errors using statevector simulation;
- compares the ideal syndrome for an
X_1error with results from a recorded IBM Quantum hardware run.
Tested with:
- Python 3.13.7
- Qiskit 2.2.3
- qiskit-ibm-runtime 0.43.1
- NumPy 2.3.2
Install the required packages with:
python -m pip install -r requirements.txtThe IBM hardware section uses recorded results by default and does not submit a new job. Running a new hardware experiment requires IBM Quantum credentials configured locally.