Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ci_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Run Pytest

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout code
uses: actions/checkout@v3

- name: 🐍 Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # or whatever version you need

- name: 📦 Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest

- name: 🧪 Run Pytest
run: |
pytest
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ __pycache__/
# C extensions
*.so

.DS_Store
# Distribution / packaging
.Python
build/
Expand Down
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,41 @@
# qec-surface-code
Quantum Error Correction: Surface Code in Q#
# Quantum Error Correction: Surface Code

The repository implements rotated surface code with MWPM algorithm for decoder.
We build a logical qubit, identify errors using error syndromes at each timestep and finally apply error correction on the data qubits. The logical qubit is measured to finally to know if error correction was successful.

## Objective
- Implement a d=3 surface code in Q# with separate layouts for data and ancilla qubits.
- Simulate Pauli noise (bit-flip, phase-flip) across multiple rounds of stabilizer cycles.
- Extract syndrome measurements and apply MWPM using a classical decoder.
- Visualize syndrome defects and correction paths for debugging and intuition.
- Assess logical qubit fidelity post-correction by varying physical error rates

## Workflow
![Workflow](/qec-highlevel.png)

## Components
- Surface Code Architecture in Q#
- Pauli Tracking Layer for syndrome measurements history
- Error detection at each timestep using Minimum-weight perfect matching decoder with error graphs
- Error correction on logical qubits


## Setup
- Clone repository
- Setup virtual environment in python
```bash
python3 -m virtualenv venv
```
- Activate venv
```bash
source venv/bin/activate
```
- Install Requirements
```bash
python3 -m pip install -r requirements.txt
```
- Run Notebook and choose *venv*




Loading