-
Notifications
You must be signed in to change notification settings - Fork 208
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
New cudaq::sample
option: explicit measurements
#2567
base: main
Are you sure you want to change the base?
Conversation
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
cudaq::sample
option: stacked measurementscudaq::sample
option: explicit measurements
5cfc41f
to
e6d3bda
Compare
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: Pradnya Khalate <[email protected]>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: Pradnya Khalate <[email protected]>
…uda-quantum into pr-stack-measurements
Signed-off-by: Pradnya Khalate <[email protected]>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
* Run test on all available simulator targets Signed-off-by: Pradnya Khalate <[email protected]>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: Pradnya Khalate <[email protected]>
Signed-off-by: Pradnya Khalate <[email protected]>
…onal logic * Simple Python test added * TODO: Add C++ test(s) Signed-off-by: Pradnya Khalate <[email protected]>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Draft for now ... kicking the CI tires. This also needs spec review/approval before being merged.
This PR introduces a new
sample_options
parameter calledexplicit_measurements
. When this new option is selected, the behavior of the global register in thesample_result
is changed. Rather than retaining a single measurement of the final "state" of each qubit in the system, this new option instructs the runtime to record all qubit measurements into the global register ... effectively "stacking" all measurements together.While this change is supported by all simulators, the motivating factor for the change is that this will enable more efficient simulation when using Stim simulator for circuits containing mid-circuit measurements (as long as those mid-circuit measurements do not influence later gate sequences). Prior to this change, if one wanted to generically extract mid-circuit measurements out of the kernel, they would have to avoid using the
cudaq::sample
API.TODO