The following code:
from qwerty import *
def example(shots=1024):
@qpu
def kernel():
return ('p' * '1000'
| ('1???'>>-'1???' in '1'*'_'**4)
| measure * discard**4)
return kernel(shots=shots)
histogram(example())
throws the following exception when run:
python bug.py
Traceback (most recent call last):
File "[snip]/bug.py", line 12, in <module>
histogram(example())
~~~~~~~^^
File "[snip]/bug.py", line 10, in example
return kernel(shots=shots)
File "[snip]/bug.py", line 5, in example
def kernel():
qwerty.err.QwertyExpandError: Cannot infer the following dimension variables: __0 (at column 5)
Even if #39 is fixed, this error message should be more readable. In fact, errors involving internal dimvars should never reach the user. Even an error message saying that they need to add type annotations somewhere would be better.
The following code:
throws the following exception when run:
Even if #39 is fixed, this error message should be more readable. In fact, errors involving internal dimvars should never reach the user. Even an error message saying that they need to add type annotations somewhere would be better.