qkitgroup / qkit

Qkit framework
GNU General Public License v2.0
43 stars 46 forks source link

NameError: name 'uncertainties_enable' is not defined #89

Closed fr34q closed 2 years ago

fr34q commented 2 years ago

Missing else here: https://github.com/qkitgroup/qkit/blob/master/qkit/measure/json_handler.py#L9-L18

fr34q commented 2 years ago

I fixed it here: https://github.com/qkitgroup/qkit/commit/86c3107f89d2ddea37513f60d89a05db8acf3458 Please have a look if it is okay like this.

Maybe one could also simplify this code by directly trying to import it without the qkit.module_available?

Schneider1 commented 2 years ago

Thank you for the bug fix! The else block was of course missing.

We introduced the qkit.module_availabe to avoid the try: import statements (but in this case qkit is not always started which is why we have the try block anyways). However, it is possible to willingly not use certain modules although they are installed. So I'd say it's just fine as it is now.