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
We want users to be able to add include files other than stdgates.inc and qelib1.inc in qasm code.
The primary motivation for this feature came out of the integration with qBraid SDK's IONQ component. IONQ supports multiple definitions of the ms gate with 2 or 3 parameters but multiple gate definitions are not supported by openqasm.
With this feature, we will be able to specify something like a ionqnative.inc file containing custom gate definitions. If the gate names are same as those identified by pyqasm, the explicitly supplied definitions will take precedence.
Implementation (Optional)
Design Question
We will need to see if there is an option to switch parser context with include files. This will enable us to just point the parser to the new include file code and continue the parsing as before. But the error reporting would be little tricky as we will have to manage something like a "file context" to know where we are at (and in which file).
If not above, we can also add a preprocessing step for the analyser which will make 1 big file containing all the includes and then start the analysis.
Feature Description
We want users to be able to add include files other than
stdgates.inc
andqelib1.inc
in qasm code.The primary motivation for this feature came out of the integration with qBraid SDK's IONQ component. IONQ supports multiple definitions of the ms gate with 2 or 3 parameters but multiple gate definitions are not supported by openqasm.
With this feature, we will be able to specify something like a
ionqnative.inc
file containing custom gate definitions. If the gate names are same as those identified by pyqasm, the explicitly supplied definitions will take precedence.Implementation (Optional)
Design Question
We will need to see if there is an option to switch parser context with include files. This will enable us to just point the parser to the new include file code and continue the parsing as before. But the error reporting would be little tricky as we will have to manage something like a "file context" to know where we are at (and in which file).
If not above, we can also add a preprocessing step for the analyser which will make 1 big file containing all the includes and then start the analysis.
Reference : https://openqasm.com/language/comments.html#included-files
The text was updated successfully, but these errors were encountered: