-
Notifications
You must be signed in to change notification settings - Fork 209
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
Improve readability and maintainability of Unitary Checker #2585
base: main
Are you sure you want to change the base?
Conversation
- Added detailed comments to enhance code clarity. - Improved variable naming for better understanding. - Ensured consistent formatting and indentation. - Optimized function structures for readability. Signed-off-by: Iqbal Bhatti <[email protected]>
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.
I see some improvements here but the there is also "noise". Focus the PR on those improvements. Also the formatting changes are not aligned with CUDA-Q's formatting rules.
if (!checkMod || !inputMod) { | ||
llvm::errs() << "Error parsing input files.\n"; | ||
return EXIT_FAILURE; |
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.
This is a good check to have.
if (!inputOp) { | ||
llvm::errs() << "Function " << opName.str() << " not found in input.\n"; | ||
exitStatus = EXIT_FAILURE; | ||
continue; | ||
} |
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.
Also good, since one might compile this without assertions.
Improve Readability and Maintainability of Unitary Checker
Description
This PR enhances the readability, maintainability, and overall structure of the Unitary Checker code while preserving its core functionality. The following improvements have been made:
These changes improve code maintainability, making it easier for developers to understand and contribute in the future.
Checklist
Looking forward to feedback and suggestions.