Statistical test of the full sampling distribution

Open Beginner friendly
#22 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust
Domain
testing

Research direction

Read the sampling implementation, especially sample_index, and the existing sampling tests that check Bell and half-superposition states. Compare sampled counts with probabilities() using a chi-square goodness-of-fit test for a seeded 5–6 qubit state, then add a case with zero-probability outcomes. Done when both tests pass and zero-probability outcomes never appear.

Written by the indexing model from the issue text.

Description

enhancement
What you want to do

Sampling is only tested on two-outcome states (Bell, half-superposition) by checking one mean. A
bug that biases outcomes with many possibilities (for example an off-by-one in sample_index
near the ends of the cumulative array) would pass.

What it could look like

A test that prepares a random state on 5–6 qubits, samples 100k shots with a fixed seed, and runs a
chi-square goodness-of-fit test against probabilities(). Add a second case with some
zero-probability outcomes, which must never appear.

What it could look like
No API change.
Contributing
  • I would like to open a pull request for this (see CONTRIBUTING.md).
Dominant language
Rust
Stars
1
Forks
0
Avg merge
12m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from kaiwave/qsengine

All issues in kaiwave/qsengine

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.