guppylang icon indicating copy to clipboard operation
guppylang copied to clipboard

Implicit module imports

Open mark-koch opened this issue 1 year ago • 0 comments

Following the changes in #105, it would be nice if we could avoid gupply.load(...) calls and instead read of the imported Guppy modules from the Python environment.

from guppy import Qubit

@guppy
def foo(q: Qubit) -> Qubit:
   ...

guppy.compile()  # Sees that `Qubit` is in scope, so automatically imports the corresponding `quantum` module

mark-koch avatar Jan 24 '24 10:01 mark-koch