Skip to content

Commit 1f93e60

Browse files
authored
Merge pull request #1 from glanzz/circuit-builder
Circuit Builder - Logical Qubits
2 parents 611e405 + c223a40 commit 1f93e60

16 files changed

Lines changed: 2102 additions & 2 deletions

.github/workflows/ci_pipeline.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Run Pytest
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: 📥 Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: 🐍 Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.10' # or whatever version you need
17+
18+
- name: 📦 Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -r requirements.txt
22+
pip install pytest
23+
24+
- name: 🧪 Run Pytest
25+
run: |
26+
pytest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ __pycache__/
66
# C extensions
77
*.so
88

9+
.DS_Store
910
# Distribution / packaging
1011
.Python
1112
build/

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
1-
# qec-surface-code
2-
Quantum Error Correction: Surface Code in Q#
1+
# Quantum Error Correction: Surface Code
2+
3+
The repository implements rotated surface code with MWPM algorithm for decoder.
4+
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.
5+
6+
## Objective
7+
- Implement a d=3 surface code in Q# with separate layouts for data and ancilla qubits.
8+
- Simulate Pauli noise (bit-flip, phase-flip) across multiple rounds of stabilizer cycles.
9+
- Extract syndrome measurements and apply MWPM using a classical decoder.
10+
- Visualize syndrome defects and correction paths for debugging and intuition.
11+
- Assess logical qubit fidelity post-correction by varying physical error rates
12+
13+
## Workflow
14+
![Workflow](/qec-highlevel.png)
15+
16+
## Components
17+
- Surface Code Architecture in Q#
18+
- Pauli Tracking Layer for syndrome measurements history
19+
- Error detection at each timestep using Minimum-weight perfect matching decoder with error graphs
20+
- Error correction on logical qubits
21+
22+
23+
## Setup
24+
- Clone repository
25+
- Setup virtual environment in python
26+
```bash
27+
python3 -m virtualenv venv
28+
```
29+
- Activate venv
30+
```bash
31+
source venv/bin/activate
32+
```
33+
- Install Requirements
34+
```bash
35+
python3 -m pip install -r requirements.txt
36+
```
37+
- Run Notebook and choose *venv*
38+
39+
40+
41+

0 commit comments

Comments
 (0)