qiboteam / qibotn

The tensor-network translation module for Qibo.
https://qibo.science
Apache License 2.0
3 stars 1 forks source link

PyLint errors #33

Closed yjmaxpayne closed 4 months ago

yjmaxpayne commented 4 months ago

Hi Liwei, @liweintu and the team: Please take note of the following errors I received from local poetry run pylin src/ --errors-only runs:

************* Module qibotn.eval_qu
src/qibotn/eval_qu.py:2:0: E0401: Unable to import 'quimb.tensor' (import-error)
src/qibotn/eval_qu.py:3:0: E0401: Unable to import 'qibo.models' (import-error)
************* Module qibotn.backends.cutensornet
src/qibotn/backends/cutensornet.py:2:0: E0401: Unable to import 'qibo.backends.numpy' (import-error)
src/qibotn/backends/cutensornet.py:3:0: E0401: Unable to import 'qibo.config' (import-error)
src/qibotn/backends/cutensornet.py:4:0: E0401: Unable to import 'qibo.result' (import-error)
************* Module qibotn.backends.quimb
src/qibotn/backends/quimb.py:1:0: E0401: Unable to import 'qibo.backends.numpy' (import-error)
src/qibotn/backends/quimb.py:2:0: E0401: Unable to import 'qibo.config' (import-error)
src/qibotn/backends/quimb.py:3:0: E0401: Unable to import 'qibo.result' (import-error)

I'm trying out all these under poetry branch. Poetry is working, but there are some dependency problems, for example:

I noticed my findings are similar to Alessando's in the PR #24 ; thus, the contents here can serve as a reference for the team. Thanks.

alecandido commented 4 months ago

The problem is not present any longer in a fresh installation.

mpi4py in sr/qibotn/eval.py is not included as a depency

Most likely it was included as a transitive dependency, but since it is explicitly used, it should have appeared in pyproject.toml. Fixed in #41

quimb tests still require qibojit

Correct, but this is related to the more general issue of reliable and isolated tests missing. Cf. #31

alecandido commented 4 months ago

Since nothing unique to this issue is left, I'm closing it.