Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper class for saving measurement result distributions from multiple shots #18

Open
sethrj opened this issue Nov 27, 2024 · 1 comment

Comments

@sethrj
Copy link
Member

sethrj commented Nov 27, 2024

The #17 PR has a "buffer manager" which seems actually to be a class for storing measured distributions from multiple shots. With Qsim, every invocation of the entry point is a single shot, and we can run the execution engine in a loop to measure these and report them. (This is in contrast to XACC which implicitly performs multiple shots and can only run deterministic [single LLVM block] code.)

I think we want a standalone class that can let us accumulate final measurement states across multiple runs. A vector of qubit indices should map like a bitset, and the user interface (which can provide string outputs) should be the only thing that needs an "endianness" field. It should either be an array (with 2^N values for N qubits) or unordered map (if we expect that a only a tiny amount of the combinatorial measured results are possible).

In #17 the buffer class lives inside the qsim directory but instead we should have it in the main qiree directory.

@sethrj
Copy link
Member Author

sethrj commented Dec 17, 2024

ResultDistribution I think would be a better name; "Buffer" is an implementation detail of XACC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant