qcor
qcor copied to clipboard
pyxasm token collector cannot handle function docs strings in qjit kernel
The following causes an assertion to be triggered
@qjit
def oracle(q : qreg):
"""
Define the oracle for our phase estimation algorithm,
a T gate on the last qubit
"""
... oracle code ...
but this does not
@qjit
def oracle(q : qreg):
... oracle code ...
I guess this might be because we're doing single-line parsing of the Python code. We probably need to track the scope of these multi-line comment blocks in the handler.