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
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# EditorConfig helps maintain consistent coding styles across editors and IDEs
# https://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.py]
indent_style = space
indent_size = 4
max_line_length = 100

[*.{yaml,yml}]
indent_style = space
indent_size = 2

[*.{json,json5}]
indent_style = space
indent_size = 2

[*.toml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
max_line_length = off

[Makefile]
indent_style = tab
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,16 @@ uv.lock
*.fdb_latexmk
*.synctex.gz
note/belief_propagation_qec_plan.pdf.claude/settings.local.json

# Development tools
.ruff_cache/
.mypy_cache/

# Binary files in docs (prevent future additions)
# Note: note/ directory is allowed to contain PDFs/Typst files
docs/*.pdf
docs/*.typ

# Dataset-specific
*.npz.tmp
*.stim.bak
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
args: ['--maxkb=500']
- id: check-merge-conflict
- id: check-case-conflict
- id: mixed-line-ending

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/PyCQA/bandit
rev: 1.7.10
hooks:
- id: bandit
args: ['-c', 'pyproject.toml']
additional_dependencies: ['bandit[toml]']
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed
- Reorganized dataset structure to single-source flat layout in `datasets/` directory
- Updated CLI default dataset path from `datasets/noisy_circuits` to `datasets`
- Moved all visualization images to `datasets/visualizations/` subdirectory
- Updated package metadata in `pyproject.toml` with project URLs and maintainers
- Updated README.md to focus on Python implementation
- Updated dataset documentation to reflect new structure

### Added
- LICENSE file (MIT License)
- CONTRIBUTING.md with development guidelines
- Project URLs in package metadata (Homepage, Documentation, Repository, Issues, Changelog)
- Maintainers field in package metadata

### Removed
- Duplicate dataset files from subdirectories (`circuits/`, `dems/`, `uais/`, `syndromes/`, `noisy_circuits/`)
- Julia code examples and references from README
- Winter school training references from project description

## [0.1.0] - 2025-01-20

### Added
- Initial release of BPDecoderPlus
- Noisy circuit generation for surface codes using Stim
- Belief propagation decoder implementation using PyTorch
- CLI tool for generating noisy circuits and detector error models
- Support for surface code distances 3, 5, 7, 9
- Syndrome database generation and storage
- UAI format export for inference problems
- PyTorch-based BP solver with customizable iterations
- GitHub Pages documentation with MkDocs
- Comprehensive test suite with pytest
- CI/CD pipeline with GitHub Actions
- Example datasets for d=3 surface codes with varying rounds

### Features
- Circuit-level surface code simulation
- Detector error model (DEM) generation
- Syndrome extraction and database management
- Multiple output formats: Stim circuits, DEM files, UAI files, NPZ syndrome databases
- Configurable physical error rates and code parameters
- Integration with Stim for fast quantum circuit simulation
Loading