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
[IF ([c[1]] == 1) THEN IF ([c[0]] == 1) THEN H q[0];]
Traceback (most recent call last):
File "/home/alec/r/tket/play/1583a.py", line 10, in <module>
print(circuit_to_qasm_str(c, header="hqslib1"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alec/r/tket/pytket/pytket/qasm/qasm.py", line 1192, in circuit_to_qasm_str
qasm_writer.add_op(command.op, command.args)
File "/home/alec/r/tket/pytket/pytket/qasm/qasm.py", line 1953, in add_op
self.add_conditional(op, args)
File "/home/alec/r/tket/pytket/pytket/qasm/qasm.py", line 1728, in add_conditional
assert string is not None
^^^^^^^^^^^^^^^^^^
AssertionError
The text was updated successfully, but these errors were encountered:
Having checked the specification for QASM 2 (both the original version and the extended version as defined in https://github.com/CQCL/tket/blob/main/pytket/pytket/qasm/grammar.py ), I've realized that nested conditionals are not supported in QASM at all. So the only issue here is that we fail with an AssertionError rather than a more friendly error.
Output:
The text was updated successfully, but these errors were encountered: