-
Notifications
You must be signed in to change notification settings - Fork 18
Add OpenPulseVisitor Skeleton and Initial OpenPulse AST Handling #229
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
👋 Hey there! It looks like the changelog might need an update. Please take a moment to edit the
|
0e12fed
to
50774c5
Compare
src/pyqasm/visitor.py
Outdated
calibration_stmts: list[openpulse_ast.Statement] = block_body.body | ||
pulse_visitor = OpenPulseVisitor(module=self, is_def_cal=True) | ||
|
||
result.extend(pulse_visitor.visit_basic_block(calibration_stmts)) |
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 like this approach! Makes it very segregated from original visitor
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.
Thanks @vinayswamik , I like the segregated approach for pulse semantics!
Building on it, I've given some preliminary comments for refactoring. From the outset, let's keep the code organization in check - we don't want the OpenPulseVisitor
to grow in size like our original visitor.
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Summary of changes
This PR introduces the initial implementation of the
OpenPulseVisitor
. This visitor is designed to traverse and interact with elements in anOpenPulse
program, providing a foundation for OpenPulse AST handling within the pyqasm framework.This foundational work sets up the structure for
OpenPulse
support in pyqasm, enabling future development of OpenPulse parsing, validation, and transformation features. The current implementation provides scaffolding and type checks, with detailed TODOs for each OpenPulse construct.Fixes #183