-
Notifications
You must be signed in to change notification settings - Fork 248
Add ability to create a measurement matrix from a Clifford-only kernel #2919
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: Ben Howe <[email protected]>
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]>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments.
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
Signed-off-by: Ben Howe <[email protected]>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
runtime/common/ExecutionContext.h
Outdated
@@ -117,6 +117,13 @@ class ExecutionContext { | |||
/// order. | |||
bool explicitMeasurements = false; | |||
|
|||
/// @brief Probability of occurrence of each error mechanism (column) in PCM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some offline discussions with @justinlietz, I'm going to rename the "PCM" references to "MSM" (Measurement Syndrome Matrix), per https://arxiv.org/pdf/2407.13826
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed in 8cc4d61
For accuracy in names, use Measurement Syndrome Matrix instead of Parity Check Matrix. Reference: https://arxiv.org/pdf/2407.13826 Signed-off-by: Ben Howe <[email protected]>
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]>
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
This PR adds the ability to create a noise-aware measurement matrix. Each row of the matrix corresponds to a measurement in the kernel, and each column of the matrix corresponds to a particular error (noise) mechanism. Each entry in the matrix tells you whether a particular measurement (row) would flip if a particular error (column) happened. This is implemented using Stim's
stim::FrameSimulator
C++ API to keep track of what would flip and what would not, depending on the circuit.As currently written, this is only supported via our C++ API.
Summary of changes:
cudaq::ExecutionContext
structure."pcm_size"
and"pcm"
) from which the Stim simulator will recognize and process accordingly. (runtime/nvqir/CircuitSimulator.h
had to be updated to recognize these as well.)"pcm_size"
needs to be run first to count the number of measurements and error mechanisms in a circuit. The"pcm"
version is run right after that to populate the matrix. (See test for details.)Todo:
Add a bit more validation to the tests(done)