This project studies syndrome extraction for the Steane
The implementation verifies that circuit-based syndrome extraction agrees with algebraic syndrome calculations for all 21 single-qubit Pauli errors. The accompanying notebooks develop the connection between stabilizer measurement and one-bit QPE, then express the same Pauli commutation and syndrome structure through binary matrix operations over
The project consists of three notebooks, intended to be read in order:
- Steane Syndrome Extraction — Introduces the stabilizer formalism and demonstrates ancilla-based syndrome extraction.
- Stabilizer Measurement as One-Bit QPE — Derives the QPE interpretation of stabilizer measurement and verifies the resulting syndromes.
- Binary Symplectic Representation — Develops the binary representation of Pauli operators, constructs the Steane CSS check matrices, and verifies binary syndrome calculations.
Supporting files:
src/steane.py— Steane stabilizer generators, Pauli-label utilities, direct and binary symplectic syndrome computation, and stabilizer-measurement circuits.tests/test_steane.py— Automated algebraic and circuit-level tests.pyproject.tomlanduv.lock— Project dependencies and reproducible environment.
This project uses uv for dependency management, with Python 3.12 selected in .python-version and dependencies recorded in pyproject.toml and uv.lock.
To install the dependencies and launch JupyterLab, run from the repository root:
uv sync --locked
uv run jupyter labThe notebooks are located in notebooks/. If prompted, select .venv/bin/python as the notebook kernel.
To run the automated tests and Ruff checks:
uv run pytest
uv run ruff check .
uv run ruff format --check .The automated test suite checks both the algebraic and circuit-level components of the implementation. In particular, it verifies that:
- the six chosen Steane stabilizer generators commute, are independent, and generate a group excluding
$-I$ ; - the
$21$ weight-one Pauli errors have distinct, nonzero syndromes; - binary symplectic syndrome computation agrees with direct Pauli commutation for every weight-one Pauli error;
- Pauli-label utilities follow the stated coordinate conventions and reject invalid inputs;
- the ancilla-based circuits correctly distinguish the
$+1$ and$-1$ eigenstates tested for both$X$ -type and$Z$ -type generators; and - the full six-bit syndrome obtained from circuit simulation agrees with the algebraic syndrome for every weight-one Pauli error.
The QPE and binary symplectic notebooks provide additional computational checks. The QPE notebook independently constructs one-bit QPE-based syndrome-extraction circuits, while the binary symplectic notebook computes syndromes through binary matrix operations over
We follow Qiskit's qubit-ordering convention: an IIIXXXX acts nontrivially on qubits
Syndromes are written in stabilizer-generator order,
The syndrome and measurement routines target the Steane syndrome accepts a seven-qubit Qiskit Pauli object, while binary_syndrome accepts a seven-character unsigned Pauli label. Full circuit-based syndrome extraction uses seven data qubits, six ancilla qubits, and six classical syndrome bits.
Circuit simulations assume ideal, noiseless operations. The project implements syndrome extraction but not error recovery or decoding. Logical state preparation uses Qiskit's built-in synth_circuit_from_stabilizers routine rather than a custom encoding circuit.