You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
changed the title
Support gate declaration in ASG
Support gate *declaration* in ASG (in addition to existing *definition*)
Jan 31, 2024
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
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 parsingextern
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 entert
andq
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 forh
and that the gate takes one angle parameter and one qubit parameter, which is much lighter weight.extern
gate declarations openqasm/openqasm#507The text was updated successfully, but these errors were encountered: