-
Notifications
You must be signed in to change notification settings - Fork 11
Closed
Description
Currently
p1 = Program()
...
p2 = Program()
...
p1.to_qasm()
(p1 + p2).to_qasm()
and
p1 = Program()
...
p2 = Program()
...
# skip this --> p1.to_qasm()
(p1 + p2).to_qasm()
Produce different outcomes because the autodeclaration in to_ast
mutates p1
. One potential solution is to (at least by default) copy the program before converting to ast, although this could have performance concerns. A faster solution could be to change the autodeclaration code such that it only affected the generated output, rather than the state of the program.
Metadata
Metadata
Assignees
Labels
No labels