Replies: 1 comment 1 reply
-
This is all about convention in examples, not what the language supports (which just mirrors python), right? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently guppy examples import all quantuim functions at the top of the python module. Something like the following excerpt from the adaptive qpe example:
Having to go back and import so many things from one place is not nice because:
It is for these kinds of reasons that many python libraries with a large range of top level functions and types use the import abbreviation convention:
I propose we adopt/promote this in guppy, but focussed on the standard library. You should also be able to conveniently import built-ins (ones that don't clash with python built-ins) without having to import them one by one. This relates to #430. So rewriting the example above:
(Sneaky bonus: #640)
Beta Was this translation helpful? Give feedback.
All reactions