ProjectQ-Framework / ProjectQ

ProjectQ: An open source software framework for quantum computing
https://projectq.ch
Apache License 2.0
874 stars 271 forks source link

No Python, can projectq be used online? #374

Closed ms286 closed 3 years ago

ms286 commented 4 years ago

I have been using ProjectQ since beginning of May on my laptop. But I had to install certain other applications since I was asked to work with C++ for my internship. Now, for some reason my Anaconda isn't coming on and I am unable to access projectq. I have been working on online compiler for the classical part but I need to implement quantum gates and measurement now and am stuck. I am a physics student and don't have too much knowledge about how software works, but can someone tell me if it will be possible for me to use projectq in an online complier? All suggestions regarding alternative ways to use projectq aew welcome. Also, it would be really helpful if someone could help me resolve the issue with Anaconda ( I have uninstalled and reinstalled 3 times already but it hasn't helped).

dbretaud commented 4 years ago

Hi, sorry I can neither help you with the Anaconda (I don't have enough info on your problem) and I don't have enough experience in remote python computing (I guess Azure and AWS can provide non-free solutions). I would personally recommend to focus on fixing Anaconda. Otherwise you should be able to use pip directly with basic python: https://docs.python.org/3/installing/index.html

ms286 commented 4 years ago

Hi, thank you for the reply. I have no idea what is going on with my Anaconda so I may not be able to state the issue clearly. All I can say is the navigator does not start. Even when I click on the jupyter notebook icon in the start menu, a prompt-like window pops up. Here's a screenshot of the error I get when I try to open Juypter Notebbook from Anaconda Prompt (which is the only thing other than the powershell which opens): Screenshot (136)

I looked up this error but the only reply I get is adding Anaconda to PATH in environment variables. I have done that as well but Anaconda Navigator still does not start and Prompt gives the same error. (Not sure if there is still enough info on the issue)

dbretaud commented 4 years ago

I would suspect instead a packaging issue with zmq, fixed with the uninstall and reinstall of pyzmq: https://github.com/jupyter/notebook/issues/3435#issuecomment-398549304 Also if you can start the anaconda prompt I guess that you can run python files directly there instead of calling jupyter.

ms286 commented 4 years ago

I am on it. During the uninstall, it wants to download certain packages. Is that normal?

ms286 commented 4 years ago

I get this when I try to open jupyter-notebook from the prompt: (base) C:\Users\lenovo>jupyter-notebook 'jupyter-notebook' is not recognized as an internal or external command, operable program or batch file.

And this for the navigator: (base) C:\Users\lenovo>anaconda-navigator Traceback (most recent call last): File "C:\Users\lenovo\anaconda3\lib\site-packages\qtpy__init.py", line 204, in from PySide import version__ as PYSIDE_VERSION # analysis:ignore ModuleNotFoundError: No module named 'PySide'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\lenovo\anaconda3\Scripts\anaconda-navigator-script.py", line 6, in from anaconda_navigator.app.main import main File "C:\Users\lenovo\anaconda3\lib\site-packages\anaconda_navigator\app\main.py", line 22, in from anaconda_navigator.utils.conda import is_conda_available File "C:\Users\lenovo\anaconda3\lib\site-packages\anaconda_navigator\utils__init.py", line 15, in from qtpy.QtGui import QIcon File "C:\Users\lenovo\anaconda3\lib\site-packages\qtpy\init__.py", line 210, in raise PythonQtError('No Qt bindings could be found') qtpy.PythonQtError: No Qt bindings could be found

ms286 commented 4 years ago

Also what's the difference between "conda install..." and "pip install..."? I tried the former and I got the result mentioned earlier.

dbretaud commented 4 years ago

I would rather do everything with pip as mentioned in the link above. For more info on pip and conda you should take a look at this: https://www.anaconda.com/blog/understanding-conda-and-pip

ms286 commented 4 years ago

No luck! I'll try your other suggestion about running the python files from the prompt. Thanks for all the help though!

d4rkc0nd0r commented 4 years ago

Yes, you can install it online by using Google Colab !pip install projectq Here it is as follows.

ms286 commented 4 years ago

That's it! Thank you so very much! I can't wait to start working :)