Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow qbit argument with a None default #51

Open
ahelsing opened this issue Sep 13, 2019 · 1 comment
Open

Allow qbit argument with a None default #51

ahelsing opened this issue Sep 13, 2019 · 1 comment

Comments

@ahelsing
Copy link
Contributor

The inliner does not understand an argument annotated as a qreg which also has a default of None. The typical current solution is to leave off the annotation. See for example basic_sequences/helpers.py:create_cal_seqs.

Symptoms (after recent improvements):

  File "/home/ahelsing/Projects/Quantum/pyqgl2/src/python/pyqgl2/inline.py", line 776, in create_inline_procedure
    if isinstance(rewriter.name2const[formal_param.arg], ast.Name):
KeyError: 'measChans'
@ahelsing
Copy link
Contributor Author

It seems there is some case in create_inline_procedure that is not adding a proper entry to the rewriter.
There is a loop around line 656 looking for keyword params, which should be catching this (combined with the loop around line 703 inserting the constant value in this case), but clearly there is something missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant