Skip to content
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

Parse array types in the AST #156

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Parse array types in the AST #156

merged 1 commit into from
Feb 26, 2024

Conversation

jlapeyre
Copy link
Collaborator

@jlapeyre jlapeyre commented Feb 26, 2024

  • Support already existed in the lexer.

  • Basic support for parsing in oq3_parser. Everything was set up for this. So it was easy. Array types may occur in places not covered by this implementation.

  • The only consumer to date is Qiskit. Arrays are not currently a priority for Qiskit. So in the AST -> ASG translation, we throw a not-supported error if an array type is found. However, supporting array types in AST -> ASG is straightforward and should take little time.

  • Some clarifying comments in unrelated functions were added.

Comments

  • This implements some of the tasks in array type: implement #155. But support for AST -> ASG remains to be done. This should be a relatively quick chore.

* Support already existed in the lexer.
* Basic support for parsing in oq3_parser. Everything was set up for this.
  So it was easy. Array types may occur in places not covered by this implementation.
* The only consumer to date is Qiskit. Arrays are not currently a priority for Qiskit. So in the
  AST -> ASG translation, we throw a not-supported error if an array type is found. However,
  supporting array types in AST -> ASG is straightforward and should take little time.

* Some clarifying comments in unrelated functions were added.
@jlapeyre jlapeyre merged commit 7b826e2 into Qiskit:main Feb 26, 2024
7 checks passed
@jlapeyre jlapeyre mentioned this pull request Feb 26, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant