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
69 changes: 34 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ rand_core = "0.9"
rand_xoshiro = "0.7"
rapidhash = { version = "4", features = ["rng"] }

# Concurrency
crossbeam-channel = "0.5"

# Windows workaround: Disable zstd-sys legacy feature to avoid MSVC ICE
# MSVC 14.43 has an internal compiler error (C1001) when compiling zstd_v06.c
# The legacy feature compiles old zstd formats (v0.1-v0.7) that PECOS doesn't need
Expand All @@ -117,8 +120,7 @@ pecos-qec = { version = "0.1.1", path = "crates/pecos-qec" }
pecos-rng = { version = "0.1.1", path = "crates/pecos-rng" }
pecos-qis-ffi = { version = "0.1.1", path = "crates/pecos-qis-ffi" }
pecos-qis-ffi-types = { version = "0.1.1", path = "crates/pecos-qis-ffi-types" }
pecos-qis-selene = { version = "0.1.1", path = "crates/pecos-qis-selene" }
pecos-qis-core = { version = "0.1.1", path = "crates/pecos-qis-core" }
pecos-qis = { version = "0.1.1", path = "crates/pecos-qis" }
pecos-hugr-qis = { version = "0.1.1", path = "crates/pecos-hugr-qis" }
pecos-hugr = { version = "0.1.1", path = "crates/pecos-hugr" }
pecos-llvm = { version = "0.1.1", path = "crates/pecos-llvm" }
Expand Down
3 changes: 2 additions & 1 deletion crates/benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ license.workspace = true
keywords.workspace = true
categories.workspace = true
publish = false
readme = "../../README.md"
description = "Performance benchmarks for PECOS (internal)"
readme = "README.md"

[dev-dependencies]
criterion.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/pecos-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pecos-build"
version.workspace = true
edition.workspace = true
description = "PECOS build utilities - dependency management, LLVM setup, and build script helpers"
readme.workspace = true
readme = "README.md"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
Expand Down
37 changes: 37 additions & 0 deletions crates/pecos-build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# pecos-build

Build utilities and dependency management for PECOS.

## Purpose

Used by build scripts (`build.rs`) to manage external dependencies. Handles downloading, caching, and locating libraries.

## Key Features

- **LLVM 14 management**: Install, configure, and find LLVM 14
- **Dependency downloads**: QuEST, Qulacs, Stim, Eigen, etc.
- **Tool finding**: `find_tool("llvm-as")`, `find_llvm_14()`
- **Manifest parsing**: Load `pecos.toml` for dependency versions

## PECOS Home Directory

All dependencies managed under `~/.pecos/`:

```
~/.pecos/
├── cache/ # Downloaded archives
├── deps/ # Extracted source trees
├── llvm/ # LLVM installation
└── tmp/ # Temporary files
```

## Usage

```rust
// In build.rs
use pecos_build::{ensure_dep_ready, Manifest, find_tool};

let manifest = Manifest::find_and_load_validated()?;
let quest_path = ensure_dep_ready("quest", &manifest)?;
let llvm_as = find_tool("llvm-as");
```
4 changes: 2 additions & 2 deletions crates/pecos-chromobius/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
name = "pecos-chromobius"
version.workspace = true
edition.workspace = true
readme.workspace = true
readme = "README.md"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
description = "Chromobius decoder wrapper for PECOS"
description = "Chromobius color code decoder for PECOS"

[dependencies]
pecos-decoder-core.workspace = true
Expand Down
19 changes: 19 additions & 0 deletions crates/pecos-chromobius/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# pecos-chromobius

Chromobius color code decoder for PECOS.

## Purpose

Wraps the Chromobius decoder for color code quantum error correction. Uses Mobius matching for efficient syndrome decoding.

## Key Types

- `ChromobiusDecoder` - Main decoder interface
- `ChromobiusConfig` - Decoder configuration

## Acknowledgements

This crate wraps [Chromobius](https://github.com/quantumlib/chromobius), a color code decoder developed by Craig Gidney and Cody Jones at Google Quantum AI.

**Paper:**
- Gidney, C. & Jones, C. (2023). "New circuits and an open source decoder for the color code." [arXiv:2312.08813](https://arxiv.org/abs/2312.08813)
4 changes: 2 additions & 2 deletions crates/pecos-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
description = "Provides core definitions and functions for PECOS simulations."
readme = "../../README.md"
description = "Core types and utilities for PECOS"
readme = "README.md"

[dependencies]
bitvec.workspace = true
Expand Down
17 changes: 15 additions & 2 deletions crates/pecos-core/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# pecos-core

`pecos-core` is an **internal crate** to provide core functionality.
Core types and utilities for PECOS.

This is not intended for external use.
## Purpose

Provides fundamental types used across the PECOS ecosystem.

## Key Types

- `QubitId` - Qubit identifier
- `Gate` - Gate representation
- `Pauli`, `PauliString` - Pauli operators
- `Bit`, `BitSet`, `BitVec` - Bit manipulation
- `Angle` - Angle representations
- `Phase`, `Sign` - Phase utilities

This is an internal crate. Most users should use the `pecos` meta-crate.
2 changes: 1 addition & 1 deletion crates/pecos-decoder-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "pecos-decoder-core"
version.workspace = true
edition.workspace = true
readme.workspace = true
readme = "README.md"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
Expand Down
20 changes: 20 additions & 0 deletions crates/pecos-decoder-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# pecos-decoder-core

Core decoder traits and types for PECOS.

## Purpose

Defines the fundamental decoder traits used across all decoder implementations. Separated from `pecos-decoders` to avoid circular dependencies.

## Key Traits

- `Decoder` - Core trait all decoders implement
- `BatchDecoder` - Batch decoding interface
- `CssDecoder` - CSS code specific decoding
- `SoftDecoder` - Soft information (LLR) decoding

## Additional Types

- `DecoderError` - Unified error types
- `DecodingResultTrait` - Result trait
- `CheckMatrixConfig` - Matrix configuration
4 changes: 2 additions & 2 deletions crates/pecos-decoders/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
name = "pecos-decoders"
version.workspace = true
edition.workspace = true
readme.workspace = true
readme = "README.md"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
description = "Unified decoder library for PECOS - meta crate"
description = "Unified decoder meta-crate for PECOS"

[dependencies]
pecos-decoder-core.workspace = true
Expand Down
26 changes: 26 additions & 0 deletions crates/pecos-decoders/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# pecos-decoders

Unified decoder meta-crate for PECOS.

## Purpose

Provides a unified interface to all PECOS decoders through feature-gated re-exports.

## Features

Enable the appropriate features to include specific decoder families:

- `ldpc` - LDPC decoders (BP-OSD, BP-LSD, Union-Find, etc.)
- `fusion-blossom` - Fusion Blossom MWPM decoder
- `pymatching` - PyMatching MWPM decoder
- `tesseract` - Tesseract search-based decoder
- `chromobius` - Chromobius color code decoder
- `all` - Enable all decoders

## Key Types

Re-exports from `pecos-decoder-core`:
- `Decoder` trait - Interface for QEC decoders
- `BatchDecoder` trait - Batch decoding interface
- `CssDecoder` trait - CSS code specific decoding
- `SoftDecoder` trait - Soft information decoding
4 changes: 2 additions & 2 deletions crates/pecos-engines/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
name = "pecos-engines"
version.workspace = true
edition.workspace = true
readme.workspace = true
readme = "README.md"
authors.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true
description = "Provides simulator engines for PECOS simulations."
description = "Simulation engine infrastructure for PECOS"

[lib]
crate-type = ["rlib"]
Expand Down
Loading
Loading