Skip to content

Stratified

Stratified importance sampling

3/3 passed in 772ms

TestWhat it doesResult
test_beats_flat_varianceStratifying has lower estimator spread than flat sampling here, where the observable depends only on the fault count.✅ pass
test_matches_importance_coherentWith a coherent RZ plus depolarizing, stratified agrees with the flat importance sampler (both unbiased).✅ pass
test_unbiased_dephasingStratified <X..X> matches the exact (1-2p)^n for independent dephasing.✅ pass