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

Support gate declaration in ASG (in addition to existing gate definition) #40

Open
jlapeyre opened this issue Jan 17, 2024 · 0 comments
Labels
enhancement New feature or request priority low

Comments

@jlapeyre
Copy link
Collaborator

The ASG supports gate definitions (or combined declaration/definition) but not declarations alone. Neither does the language spec mention extern for gates. So there is no reason to support at present parsing extern for gates in source code.

However, they would be useful in the ASG regardless of how they get there. Suppose we choose to understand gate rz(t) q {} to be a gate declaration. In the ASG as it is now, we enter t and q in the symbol table and store each in a vector in the ASG along with an empty vector for the body. But in fact all we need to store is a symbol for h and that the gate takes one angle parameter and one qubit parameter, which is much lighter weight.

@jlapeyre jlapeyre added the enhancement New feature or request label Jan 29, 2024
@jlapeyre jlapeyre changed the title Support gate declaration in ASG Support gate *declaration* in ASG (in addition to existing *definition*) Jan 31, 2024
@jlapeyre jlapeyre changed the title Support gate *declaration* in ASG (in addition to existing *definition*) Support gate declaration in ASG (in addition to existing gate definition) Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority low
Projects
None yet
Development

No branches or pull requests

1 participant