docs: Add section to explain Guppy type checker errors and fixes#120
Conversation
CalMacCQ
left a comment
There was a problem hiding this comment.
Looks good to me. There's a C.I. error that should be easy enough to resolve by annotating cells as skip-execution] appropriately.
Also do you think this would make sense to include in the static compilation and type checking section rather than FAQs?
| For example, using `@ owned` annotations in function signatures, | ||
|
|
||
| ```{code-cell} ipython3 | ||
| @guppy |
There was a problem hiding this comment.
Seems this cell needs to import owned in order to excute.
If you don't want a specific cell to be executed you can add this skip-execution metadata like so.
```{code-cell} ipython3
---
tags: [skip-execution]
---
@guppy
def foo(q: qubit @owned) -> None: ...
There was a problem hiding this comment.
Strangely I cannot reproduce the C.I. error locally which is puzzling
There was a problem hiding this comment.
That's strange, I tested locally and it was fine. I'll add the skip-execution tag as it's not necessary for these to run.
There was a problem hiding this comment.
Change my mind and imported owned to be explicit.
| N = guppy.nat_var("N") | ||
|
|
||
| @guppy | ||
| def foo(arr: array[qubit, N]) -> None: |
There was a problem hiding this comment.
Ah this is a pylance thing rather than mypy.

No description provided.