Repository navigation
feat: add reproducible sampling and improve simulation and synthesis correctness - #43
Merged
Merged
Conversation
Resolve measurement IDs to storage positions across simulators and keep readout noise lookup keyed by original IDs. Reject incompatible circuit mappings and commit mappings only after successful execution. Cover sparse and reordered IDs, failure paths, state copies, and routed SWAP layouts. Verified 348 Rust state tests and 724 Python QIS tests.
Add optional keyword-only seeds to state sampling across all four Python backends. Assign per-shot random streams before parallel execution so explicit seeds reproduce ordered shots and projected counts independently of scheduling. Preserve existing unseeded calls and Rust sampling signatures. Allow ErrorMitigation.get_mitigated() to reuse collected estimates with different processing arguments and recover from post-processing errors. Keep run() single use and retain only the statistics required for subsequent processing. Update type stubs and documentation, and cover seeded sampling, concurrency, measurement projection, seed validation, and repeated mitigation in regressions. Validation: 83 focused Python tests passed in final review; prior full suites passed with 1830 Python tests and 3488 Rust tests (8 ignored). Clippy with warnings denied, Ruff, formatting, and git diff checks passed.
Compute Z parity from the source amplitude index in expectation and variance calculations. Add Rust, Python, and C regression tests for Pauli phases, Y parity, and mixed Hamiltonians.
Score source blocks, primary candidates and numerical fallbacks after one local cleanup round. Keep single-qubit scoring lowering-only to avoid recursion, and retain the source block when costs are equal. Use conservative pruning bounds for native interactions outside CX/CY/CZ. Correct global phases in controlled-Pauli-to-RZZ decomposition rules. Add regression tests for cost reversal, phase preservation, fallback scoring, and selection consistency across pruning and cache states.
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.
Add direct circuit sampling and reproducible state sampling, fix simulator correctness issues, and improve target-aware synthesis.
get_mitigated()calls with different processing arguments without rerunning estimation.