Conversation
Move tutorial-length comments from source to proper doc pages: - noise/prelude.rs -> docs/experimental/composable-noise.md - engine_type.rs -> docs/user-guide/engine-selection.md - fault_tolerance.rs trimmed (content already in docs/user-guide/fault-tolerance.md) - classical.rs trait methods trimmed All doc examples are tested via the unified Rust test crate (13 new tests).
- Convert 26 ignored doctests to runnable with proper imports and setup - Fix 1 pre-existing failure (Python example missing language tag) - Change Python examples from ignore to python language tag - Change pseudocode examples from ignore to text - cuQuantum examples: ignore -> no_run (compile-checked, needs GPU .so at runtime)
Load cuQuantum/CUDA shared libraries at runtime via libloading instead of linking at build time. This means doctests run everywhere: on GPU machines they exercise real hardware, without GPU they get a graceful NotAvailable error via the ? operator. Removes the cuquantum_stub cfg and all function stubs from build.rs. Stub path now emits only type definitions. The loader searches CUQUANTUM_ROOT, ~/.pecos/deps, CUDA_PATH, and system paths.
- Trim "This module/crate/struct/trait provides" from 40 doc comments - Make 5 no_run doctests fully runnable (qasm, simulator test utils) - Change 6 pseudocode doctests from no_run to text
- Replace 211 ASCII art section dividers with clean headers in 8 files - Remove "Comprehensive" from 9 test file doc comments - Remove 16 "This generic implementation" boilerplate lines from math.rs
QASM parser no longer panics on malformed input -- returns parse errors instead. Engine code uses expect() with clear invariant messages or restructured to avoid unwraps entirely.
…pecos-build - pecos-num: as_slice().unwrap() now documents contiguity requirement - pecos-build: download thread panics return errors instead of crashing - pecos-phir: regex captures and lock acquisitions use expect with reasons
Examples now use ? operator instead of unwrap(), teaching users good error handling. Python bindings use expect() with clear invariant messages instead of bare unwrap() that would crash the interpreter.
…code Python bindings: 130 unwraps eliminated -- prevents interpreter crashes on conversion failures, lock poisoning, and array operations. Rust: 28 unwraps replaced across 22 files in GPU sims, decoders, circuit display, PHIR engine, and simulators.
- map_async callbacks no longer panic from GPU worker threads when receiver is dropped (expect -> silent drop on send) - All 6 GPU simulator types now have explicit Drop that polls the device to completion before resources are freed - New concurrent stress test: 8 threads creating/destroying simulators in parallel, plus rapid sequential create/destroy cycles
Doctests now pass on systems without cuQuantum by early-returning Ok(()) when the libraries aren't available. On systems with cuQuantum, they still exercise the real GPU code.
…tion Doctests should test real GPU code without availability guards. The test runner (pecos rust test) already excludes pecos-cuquantum from workspace tests and only includes it when cuQuantum SDK is detected.
…ction Python simulators/__init__.py no longer gates CudaStateVec/CudaStabilizer imports behind is_cuquantum_available(). Classes are always importable when the package is installed -- GPU availability is checked at construction time with a clear RuntimeError, not silently set to None.
pecos-quest now always compiles CUDA engine code. GPU availability is detected at runtime via libloading (cuda_loader.rs), matching the pecos-cuquantum pattern. No more --features cuda needed. Removes cuda feature from pecos-quest, pecos, pecos-rslib, and benchmarks Cargo.toml files. Simplifies CLI check/clippy/test commands.
…t link.exe conflict
…yCtrlAnyTargDenseMatr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.