Skip to content

Commit cbb77d2

Browse files
authored
Feat/rsquest (#187)
* QuEST CPU simulator C++ wrapped in Rust wrapped in Python support
1 parent eb271d4 commit cbb77d2

35 files changed

Lines changed: 6603 additions & 95 deletions

File tree

Cargo.lock

Lines changed: 81 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ default-members = [
1919
"crates/pecos-rng",
2020
"crates/pecos",
2121
"crates/pecos-cli",
22+
"crates/pecos-quest",
2223
"python/pecos-rslib/rust",
2324
"crates/benchmarks",
2425
]
@@ -110,6 +111,9 @@ pecos-build-utils = { version = "0.1.1", path = "crates/pecos-build-utils" }
110111
pecos-ldpc-decoders = { version = "0.1.1", path = "crates/pecos-ldpc-decoders" }
111112
pecos-decoders = { version = "0.1.1", path = "crates/pecos-decoders" }
112113

114+
# QuEST simulator wrapper
115+
pecos-quest = { version = "0.1.1", path = "crates/pecos-quest" }
116+
113117
# Optimize build times
114118
[profile.dev]
115119
opt-level = 0 # No optimization for faster compilation

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ normalize-line-endings: ## Normalize line endings according to .gitattributes
121121
lint-fix: ## Fix all auto-fixable linting issues (Rust, Python, Julia)
122122
@echo "Fixing Rust formatting..."
123123
cargo fmt --all
124-
cargo clippy --fix --workspace --all-targets --all-features --allow-staged
124+
cargo clippy --fix --workspace --all-targets --all-features --allow-staged --allow-dirty
125125
@echo ""
126126
@echo "Running pre-commit fixes..."
127127
uv run pre-commit run --all-files || true
@@ -156,8 +156,8 @@ rstest: qir-staticlib-if-needed ## Run Rust tests
156156
cargo test --workspace
157157

158158
.PHONY: rstest-all
159-
rstest-all: qir-staticlib-if-needed ## Run Rust tests with all features (includes WASM, decoders, etc.)
160-
cargo test --workspace --all-features
159+
rstest-all: qir-staticlib-if-needed ## Run Rust tests with all features except GPU
160+
cargo test --workspace --all-features --exclude pecos-quest && cargo test -p pecos-quest
161161

162162
# Decoder-specific commands
163163
# -------------------------

crates/pecos-build-utils/src/dependencies.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ pub const CHROMOBIUS_COMMIT: &str = "35e289570fdc1d71e73582e1fd4e0c8e29298ef5";
3131
pub const CHROMOBIUS_SHA256: &str =
3232
"da73d819e67572065fd715db45fabb342c2a2a1e961d2609df4f9864b9836054";
3333

34+
/// QuEST library constants
35+
/// Used by QuEST quantum simulator wrapper
36+
pub const QUEST_COMMIT: &str = "v4.0.0";
37+
pub const QUEST_SHA256: &str = "e6a922a9dc1d6ee7c4d2591a277646dca2ce2fd90eecf36fd66970cb24bbfb67";
38+
3439
/// Qulacs library constants
3540
/// Used by Qulacs quantum simulator
3641
pub const QULACS_VERSION: &str = "0.6.12";
@@ -98,6 +103,15 @@ pub fn chromobius_download_info() -> DownloadInfo {
98103
}
99104
}
100105

106+
/// Create DownloadInfo for QuEST
107+
pub fn quest_download_info() -> DownloadInfo {
108+
DownloadInfo {
109+
url: format!("https://github.com/QuEST-Kit/QuEST/archive/refs/tags/{QUEST_COMMIT}.tar.gz"),
110+
sha256: QUEST_SHA256,
111+
name: format!("quest-{}", QUEST_COMMIT),
112+
}
113+
}
114+
101115
/// Create DownloadInfo for Qulacs
102116
pub fn qulacs_download_info() -> DownloadInfo {
103117
DownloadInfo {

0 commit comments

Comments
 (0)