Skip to content

Commit fd577fd

Browse files
πŸš€ Initial scaffold: Quantum Error Mitigation Benchmarking Suite
- Pluggable mitigator interface (ZNE, PEC, CDR) with abstract base class - Noise characterisation module (Days 1-3) - Mitigation implementations skeleton (Days 4-6) - Benchmarking pipeline (Days 7-8) - Analysis + plotting modules (Days 9-10) - arXiv-style LaTeX report template with BibTeX references - CI/CD: flake8 + black linting, pytest + Codecov - 17 passing skeleton tests - Full README with architecture diagram, roadmap, and quickstart
0 parents  commit fd577fd

38 files changed

Lines changed: 1505 additions & 0 deletions

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint & Format Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.10"
22+
23+
- name: Install lint tools
24+
run: |
25+
pip install flake8 black
26+
27+
- name: Run flake8 (PEP8)
28+
run: |
29+
flake8 noise_characterisation/ mitigation/ benchmarks/ analysis/ \
30+
--max-line-length=100 \
31+
--exclude=__pycache__,*.ipynb_checkpoints \
32+
--ignore=E402
33+
34+
- name: Run black (formatting check)
35+
run: |
36+
black --check --line-length=100 \
37+
noise_characterisation/ mitigation/ benchmarks/ analysis/
38+
39+
- name: Validate imports
40+
run: |
41+
python -c "import numpy, scipy, matplotlib"
42+
echo "Core imports OK"

β€Ž.github/workflows/test.ymlβ€Ž

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: Run Test Suite
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: "3.10"
22+
23+
- name: Install dependencies
24+
run: |
25+
pip install -r requirements.txt
26+
pip install pytest pytest-cov
27+
28+
- name: Run mitigation tests
29+
run: |
30+
pytest mitigation/tests/ -v --tb=short
31+
32+
- name: Run benchmark circuit tests
33+
run: |
34+
pytest benchmarks/tests/ -v --tb=short
35+
36+
- name: Run full suite with coverage
37+
run: |
38+
pytest mitigation/tests/ benchmarks/tests/ \
39+
--cov=mitigation --cov=benchmarks --cov=analysis \
40+
--cov-report=xml \
41+
--cov-report=term-missing
42+
43+
- name: Upload coverage to Codecov
44+
uses: codecov/codecov-action@v4
45+
with:
46+
files: ./coverage.xml
47+
fail_ci_if_error: false

β€Ž.gitignoreβ€Ž

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Environments
2+
.env
3+
.venv
4+
venv/
5+
env/
6+
7+
# Python
8+
__pycache__/
9+
*.py[cod]
10+
*$py.class
11+
*.egg-info/
12+
dist/
13+
build/
14+
15+
# Jupyter
16+
.ipynb_checkpoints
17+
18+
# Data / Results
19+
data/raw/*.json
20+
data/raw/*.csv
21+
results/raw_data/*.json
22+
23+
# OS
24+
.DS_Store
25+
Thumbs.db
26+
27+
# Secrets
28+
apikey.json
29+
30+
# Docs build artifacts
31+
docs/_build/
32+
report/*.aux
33+
report/*.log
34+
report/*.out
35+
report/*.synctex.gz
36+
37+
# Personal notes
38+
learning.md
39+
40+
# Roadmap file
41+
qc Month 1.docx

β€ŽLICENSEβ€Ž

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 John George Alexander
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
Β (0)