Required prerequisites
Describe the bug
Seems like the python AST bridge is a bit too lax in identifying calls to cudaq.dbg.ast. Or is it cudaq.ast.dbg? Currently, it doesn't matter, as long as there is cudaq, ast and dbg, anything goes. Perhaps someone can argue that this is a feature.
Steps to reproduce the bug
import cudaq
@cudaq.kernel
def simple(n: int):
q = cudaq.qvector(n)
cudaq.dbg.ast.print_i64(n)
dbg.cudaq.ast.print_i64(n)
dbg.ast.cudaq.print_i64(n)
ast.dbg.cudaq.print_i64(n)
ast.cudaq.dbg.print_i64(n)
ast.cudaq.dbg.whatever.i.can.put.almost.ANYTHING.print_i64(n)
counts = cudaq.sample(simple, 10)
print(counts)
Result:
[cudaq-ast-dbg] 10
[cudaq-ast-dbg] 10
[cudaq-ast-dbg] 10
[cudaq-ast-dbg] 10
[cudaq-ast-dbg] 10
[cudaq-ast-dbg] 10
{ 0000000000:1000 }
Expected behavior
Only accept cudaq.dbg.ast
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
No response
Required prerequisites
Describe the bug
Seems like the python AST bridge is a bit too lax in identifying calls to
cudaq.dbg.ast. Or is itcudaq.ast.dbg? Currently, it doesn't matter, as long as there iscudaq,astanddbg, anything goes. Perhaps someone can argue that this is a feature.Steps to reproduce the bug
Result:
Expected behavior
Only accept
cudaq.dbg.astIs this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
Suggestions
No response