Closed kevinsung closed 4 years ago
Thanks for catching this. I've created a patch to solve the problem in #221. The problem is related to the fact that it's missing the relative path to where to find the qflex python modules. Try now with:
python3 python/qflex_cirq_example.py
from the root folder of qflex (it works for me).
Thank you for pointing this out. It is indeed an issue with the paths. However, we have also a relative paths related issue #167 . I guess the solution should consider module __init__.py
.
It still doesn't work for me (same error).
Have you compiled QFlex with make pybind
? In the python
folder there should be a file with a name like qflex.[long_name].so
Have you compiled QFlex with
make pybind
?
Note that this normally runs during the default make
invocation; if it didn't, the logs should indicate what prevented it from doing so (usually missing dependencies, IIRC).
I didn't have pybind. Installing it fixed the issue. Thanks!
@s-mandra Should we suggest the user to run pip install -r requirements.txt if one if the python dependencies fail on configure?
Sure, I can add that to README.md
and docs/install.md
.
After following the instructions for setting up Python, I try to run the example script by executing
python qflex_cirq_example.py
. I get