[Python] Measurement result type#4000
Draft
khalatepradnya wants to merge 46 commits intoNVIDIA:mainfrom
Draft
Conversation
in `qis` directory, remove the macro for library mode and drop the typedef to bool. * Retain variable names assigned to measurement results * Disallow measure_result as argument to entry-point kernels * Drop the intrinsic funciton fro converting to Boolean vector * Insert discriminate op wherever necessary * Adjust tests * WIP Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
frontend * Add support for RESULT type in the log parser - construct a `measure_result` object. * Two tests are not working with `auto` - should be fixed * Clean-up * Handle the size for `measure_result` since it behaves differently on host and on device * Log result output Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
- Factory and Marshal * Can use `auto` now * NVQIR function for logging result record seems to have issues * Test fixes Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
* Update passes to emit `result` type * Fix tests for array recording calls Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
from `measure_result` class * Update kernel execution pass to handle measure_Result return types * Fixed corresponding tests Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
the use of `auto` Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
* Adjsut the host datatype accordingly * Fix the logic to create sample_result from QIR log to read measure result type and make it efficient Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
its vector) * Should fix Python failure (which was a regression) in condiitonal kernel test. Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
libstdc++ v/s libc++ differences Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
* Clean up Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
* Disallow tuples and dataclasses containing `measure_result` Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
* Using `INT_MAX` as sentinel for unassigned ID. Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
- entry-point kernels cannot return `measure_result` or a vector of it - use snake_case for public APIs * Updated examples with `auto` to explicitly specify type * Added new tests to cover the changes in the frontend Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
else the cases like `inline-qpu-func.cpp` would crash. * As a result, some of the existing tests need to have the attribute for entry-point kernels in order to succeed. Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
replaced with public members) Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
* Prevent direct invocation of kernels returning measure_result Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
* Handle cases for automatic list and tuple conversion Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
|
CUDA Quantum Docs Bot: A preview of the documentation can be found here. |
Signed-off-by: Pradnya Khalate <pkhalate@nvidia.com>
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python frontend changes to support type distinction for measurement result.
Builds on top of #3800