This PR completes the process of having the parser return a structured QasmProgram object. The serialization is now contained completely within the QasmProgram object.
The produced QasmProgram objects contains a nested list of statements, with statements being either declarations, operations, etc, or even another QasmProgram in the case of the include statement.
You can even serialize the full program inserting any included files, via prog.serialize(insert_includes=True).
This PR completes the process of having the parser return a structured
QasmProgram
object. The serialization is now contained completely within theQasmProgram
object.Note: This PR merges into #7
Fixes #2
Example:
The produced
QasmProgram
objects contains a nested list of statements, with statements being either declarations, operations, etc, or even anotherQasmProgram
in the case of theinclude
statement.You can even serialize the full program inserting any included files, via
prog.serialize(insert_includes=True)
.