Jet installation issue

Hi there,

I am interested in using Jet via windows and finally got all the requirements together. But when building the jet module via

pip install quantum-jet

(using python 3.7,3.8,3.9,3.10) , it almost finished and then I get this ERROR:

Collecting quantum-jet
  Downloading quantum-jet-0.2.2.tar.gz (223 kB)
     ---------------------------------------- 223.3/223.3 kB 2.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting numpy<1.21.0 (from quantum-jet)
  Downloading numpy-1.20.3-cp37-cp37m-win_amd64.whl (13.6 MB)
     ---------------------------------------- 13.6/13.6 MB 2.5 MB/s eta 0:00:00
Collecting quantum-xir (from quantum-jet)
  Downloading quantum_xir-0.2.2-py3-none-any.whl (27 kB)
Collecting strawberryfields>=0.18.0 (from quantum-jet)
  Downloading StrawberryFields-0.23.0-py3-none-any.whl (4.9 MB)
     ---------------------------------------- 4.9/4.9 MB 2.2 MB/s eta 0:00:00
Collecting thewalrus>=0.15.0 (from quantum-jet)
  Downloading thewalrus-0.20.0.tar.gz (108 kB)
     ---------------------------------------- 108.6/108.6 kB 3.2 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting networkx>=2.0 (from strawberryfields>=0.18.0->quantum-jet)
  Downloading networkx-2.6.3-py3-none-any.whl (1.9 MB)
     ---------------------------------------- 1.9/1.9 MB 2.8 MB/s eta 0:00:00
Collecting numba (from strawberryfields>=0.18.0->quantum-jet)
  Downloading numba-0.56.4-cp37-cp37m-win_amd64.whl (2.5 MB)
     ---------------------------------------- 2.5/2.5 MB 2.3 MB/s eta 0:00:00
Collecting python-dateutil>=2.8.0 (from strawberryfields>=0.18.0->quantum-jet)
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
     ---------------------------------------- 247.7/247.7 kB 3.8 MB/s eta 0:00:00
Collecting quantum-blackbird>=0.3.0 (from strawberryfields>=0.18.0->quantum-jet)
  Downloading quantum_blackbird-0.5.0-py3-none-any.whl (48 kB)
     ---------------------------------------- 48.0/48.0 kB 2.5 MB/s eta 0:00:00
Collecting requests>=2.22.0 (from strawberryfields>=0.18.0->quantum-jet)
  Obtaining dependency information for requests>=2.22.0 from https://files.pythonhosted.org/packages/70/8e/0e2d847013cb52cd35b38c009bb167a1a26b2ce6cd6965bf26b47bc0bf44/requests-2.31.0-py3-none-any.whl.metadata
  Downloading requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting scipy>=1.0.0 (from strawberryfields>=0.18.0->quantum-jet)
  Downloading scipy-1.7.3-cp37-cp37m-win_amd64.whl (34.1 MB)
     ---------------------------------------- 34.1/34.1 MB 2.9 MB/s eta 0:00:00
Collecting sympy>=1.5 (from strawberryfields>=0.18.0->quantum-jet)
  Downloading sympy-1.10.1-py3-none-any.whl (6.4 MB)
     ---------------------------------------- 6.4/6.4 MB 2.6 MB/s eta 0:00:00
Collecting toml (from strawberryfields>=0.18.0->quantum-jet)
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting urllib3>=1.25.3 (from strawberryfields>=0.18.0->quantum-jet)
  Obtaining dependency information for urllib3>=1.25.3 from https://files.pythonhosted.org/packages/26/40/9957270221b6d3e9a3b92fdfba80dd5c9661ff45a664b47edd5d00f707f5/urllib3-2.0.6-py3-none-any.whl.metadata
  Downloading urllib3-2.0.6-py3-none-any.whl.metadata (6.6 kB)
Collecting xanadu-cloud-client>=0.2.1 (from strawberryfields>=0.18.0->quantum-jet)
  Obtaining dependency information for xanadu-cloud-client>=0.2.1 from https://files.pythonhosted.org/packages/34/07/fbf2214cad027874aef0e69ba47d0abd534cbde6ddaae505e22ee3699437/xanadu_cloud_client-0.3.1-py3-none-any.whl.metadata
  Downloading xanadu_cloud_client-0.3.1-py3-none-any.whl.metadata (8.3 kB)
Collecting lark-parser>=0.11.0 (from quantum-xir->quantum-jet)
  Downloading lark_parser-0.12.0-py2.py3-none-any.whl (103 kB)
     ---------------------------------------- 103.5/103.5 kB 2.0 MB/s eta 0:00:00
Collecting dask[delayed] (from thewalrus>=0.15.0->quantum-jet)
  Downloading dask-2022.2.0-py3-none-any.whl (1.1 MB)
     ---------------------------------------- 1.1/1.1 MB 2.2 MB/s eta 0:00:00
Collecting llvmlite<0.40,>=0.39.0dev0 (from numba->strawberryfields>=0.18.0->quantum-jet)
  Downloading llvmlite-0.39.1-cp37-cp37m-win_amd64.whl (23.2 MB)
     ---------------------------------------- 23.2/23.2 MB 2.4 MB/s eta 0:00:00
Requirement already satisfied: setuptools in c:\users\kk\anaconda3\envs\jjjeeeettttt\lib\site-packages (from numba->strawberryfields>=0.18.0->quantum-jet) (68.2.2)
Collecting importlib-metadata (from numba->strawberryfields>=0.18.0->quantum-jet)
  Obtaining dependency information for importlib-metadata from https://files.pythonhosted.org/packages/ff/94/64287b38c7de4c90683630338cf28f129decbba0a44f0c6db35a873c73c4/importlib_metadata-6.7.0-py3-none-any.whl.metadata
  Downloading importlib_metadata-6.7.0-py3-none-any.whl.metadata (4.9 kB)
Collecting six>=1.5 (from python-dateutil>=2.8.0->strawberryfields>=0.18.0->quantum-jet)
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting antlr4-python3-runtime==4.9.2 (from quantum-blackbird>=0.3.0->strawberryfields>=0.18.0->quantum-jet)
  Downloading antlr4-python3-runtime-4.9.2.tar.gz (117 kB)
     ---------------------------------------- 117.2/117.2 kB 1.7 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting charset-normalizer<4,>=2 (from requests>=2.22.0->strawberryfields>=0.18.0->quantum-jet)
  Obtaining dependency information for charset-normalizer<4,>=2 from https://files.pythonhosted.org/packages/2d/78/7c3f00e82620922be1f6f902c10bc340b19aa651a68b078bbcbeabb8ff20/charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl.metadata
  Downloading charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests>=2.22.0->strawberryfields>=0.18.0->quantum-jet)
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ---------------------------------------- 61.5/61.5 kB 3.2 MB/s eta 0:00:00
Collecting certifi>=2017.4.17 (from requests>=2.22.0->strawberryfields>=0.18.0->quantum-jet)
  Obtaining dependency information for certifi>=2017.4.17 from https://files.pythonhosted.org/packages/4c/dd/2234eab22353ffc7d94e8d13177aaa050113286e93e7b40eae01fbf7c3d9/certifi-2023.7.22-py3-none-any.whl.metadata
  Downloading certifi-2023.7.22-py3-none-any.whl.metadata (2.2 kB)
Collecting mpmath>=0.19 (from sympy>=1.5->strawberryfields>=0.18.0->quantum-jet)
  Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)
     ---------------------------------------- 536.2/536.2 kB 2.8 MB/s eta 0:00:00
Collecting appdirs (from xanadu-cloud-client>=0.2.1->strawberryfields>=0.18.0->quantum-jet)
  Downloading appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Collecting fire (from xanadu-cloud-client>=0.2.1->strawberryfields>=0.18.0->quantum-jet)
  Downloading fire-0.5.0.tar.gz (88 kB)
     ---------------------------------------- 88.3/88.3 kB 4.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting pydantic[dotenv]<2 (from xanadu-cloud-client>=0.2.1->strawberryfields>=0.18.0->quantum-jet)
  Obtaining dependency information for pydantic[dotenv]<2 from https://files.pythonhosted.org/packages/8d/94/8fe1715dc6bff8d9a358896a671ff07dd5ed5d51111dbbf8a5ef771b7ddc/pydantic-1.10.13-cp37-cp37m-win_amd64.whl.metadata
  Downloading pydantic-1.10.13-cp37-cp37m-win_amd64.whl.metadata (150 kB)
     ---------------------------------------- 150.9/150.9 kB 3.0 MB/s eta 0:00:00
Collecting cloudpickle>=1.1.1 (from dask[delayed]->thewalrus>=0.15.0->quantum-jet)
  Downloading cloudpickle-2.2.1-py3-none-any.whl (25 kB)
Collecting fsspec>=0.6.0 (from dask[delayed]->thewalrus>=0.15.0->quantum-jet)
  Downloading fsspec-2023.1.0-py3-none-any.whl (143 kB)
     ---------------------------------------- 143.0/143.0 kB 1.7 MB/s eta 0:00:00
Collecting packaging>=20.0 (from dask[delayed]->thewalrus>=0.15.0->quantum-jet)
  Obtaining dependency information for packaging>=20.0 from https://files.pythonhosted.org/packages/ec/1a/610693ac4ee14fcdf2d9bf3c493370e4f2ef7ae2e19217d7a237ff42367d/packaging-23.2-py3-none-any.whl.metadata
  Downloading packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
Collecting partd>=0.3.10 (from dask[delayed]->thewalrus>=0.15.0->quantum-jet)
  Obtaining dependency information for partd>=0.3.10 from https://files.pythonhosted.org/packages/11/8a/b7a58e208b144a7315208a0dd627e23f5f50b47fa89c2924bb2e9238ecfb/partd-1.4.1-py3-none-any.whl.metadata
  Downloading partd-1.4.1-py3-none-any.whl.metadata (4.6 kB)
Collecting pyyaml>=5.3.1 (from dask[delayed]->thewalrus>=0.15.0->quantum-jet)
  Obtaining dependency information for pyyaml>=5.3.1 from https://files.pythonhosted.org/packages/1e/ae/964ccb88a938f20ece5754878f182cfbd846924930d02d29d06af8d4c69e/PyYAML-6.0.1-cp37-cp37m-win_amd64.whl.metadata
  Downloading PyYAML-6.0.1-cp37-cp37m-win_amd64.whl.metadata (2.1 kB)
Collecting toolz>=0.8.2 (from dask[delayed]->thewalrus>=0.15.0->quantum-jet)
  Downloading toolz-0.12.0-py3-none-any.whl (55 kB)
     ---------------------------------------- 55.8/55.8 kB ? eta 0:00:00
Collecting locket (from partd>=0.3.10->dask[delayed]->thewalrus>=0.15.0->quantum-jet)
  Downloading locket-1.0.0-py2.py3-none-any.whl (4.4 kB)
Collecting typing-extensions>=4.2.0 (from pydantic[dotenv]<2->xanadu-cloud-client>=0.2.1->strawberryfields>=0.18.0->quantum-jet)
  Obtaining dependency information for typing-extensions>=4.2.0 from https://files.pythonhosted.org/packages/ec/6b/63cc3df74987c36fe26157ee12e09e8f9db4de771e0f3404263117e75b95/typing_extensions-4.7.1-py3-none-any.whl.metadata
  Downloading typing_extensions-4.7.1-py3-none-any.whl.metadata (3.1 kB)
Collecting python-dotenv>=0.10.4 (from pydantic[dotenv]<2->xanadu-cloud-client>=0.2.1->strawberryfields>=0.18.0->quantum-jet)
  Downloading python_dotenv-0.21.1-py3-none-any.whl (19 kB)
Collecting termcolor (from fire->xanadu-cloud-client>=0.2.1->strawberryfields>=0.18.0->quantum-jet)
  Downloading termcolor-2.3.0-py3-none-any.whl (6.9 kB)
Collecting zipp>=0.5 (from importlib-metadata->numba->strawberryfields>=0.18.0->quantum-jet)
  Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB)
Downloading requests-2.31.0-py3-none-any.whl (62 kB)
   ---------------------------------------- 62.6/62.6 kB 1.6 MB/s eta 0:00:00
Downloading urllib3-2.0.6-py3-none-any.whl (123 kB)
   ---------------------------------------- 123.8/123.8 kB 1.2 MB/s eta 0:00:00
Downloading xanadu_cloud_client-0.3.1-py3-none-any.whl (25 kB)
Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
   ---------------------------------------- 158.3/158.3 kB 3.2 MB/s eta 0:00:00
Downloading charset_normalizer-3.3.0-cp37-cp37m-win_amd64.whl (96 kB)
   ---------------------------------------- 96.2/96.2 kB 914.3 kB/s eta 0:00:00
Downloading packaging-23.2-py3-none-any.whl (53 kB)
   ---------------------------------------- 53.0/53.0 kB 2.7 MB/s eta 0:00:00
Downloading partd-1.4.1-py3-none-any.whl (18 kB)
Downloading PyYAML-6.0.1-cp37-cp37m-win_amd64.whl (153 kB)
   ---------------------------------------- 153.2/153.2 kB 2.3 MB/s eta 0:00:00
Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB)
Downloading typing_extensions-4.7.1-py3-none-any.whl (33 kB)
Downloading pydantic-1.10.13-cp37-cp37m-win_amd64.whl (2.1 MB)
   ---------------------------------------- 2.1/2.1 MB 2.1 MB/s eta 0:00:00
Building wheels for collected packages: quantum-jet, thewalrus, antlr4-python3-runtime, fire
  Building wheel for quantum-jet (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-37
      creating build\lib.win-amd64-cpython-37\jet
      copying python\jet\circuit.py -> build\lib.win-amd64-cpython-37\jet
      copying python\jet\factory.py -> build\lib.win-amd64-cpython-37\jet
      copying python\jet\gate.py -> build\lib.win-amd64-cpython-37\jet
      copying python\jet\interpreter.py -> build\lib.win-amd64-cpython-37\jet
      copying python\jet\state.py -> build\lib.win-amd64-cpython-37\jet
      copying python\jet\__init__.py -> build\lib.win-amd64-cpython-37\jet
      running egg_info
      writing python\quantum_jet.egg-info\PKG-INFO
      writing dependency_links to python\quantum_jet.egg-info\dependency_links.txt
      writing requirements to python\quantum_jet.egg-info\requires.txt
      writing top-level names to python\quantum_jet.egg-info\top_level.txt
      reading manifest file 'python\quantum_jet.egg-info\SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no directories found matching 'python\xir'
      adding license file 'LICENSE'
      writing manifest file 'python\quantum_jet.egg-info\SOURCES.txt'
      running build_ext
      error: [WinError 2] The system cannot find the file specified.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for quantum-jet
  Running setup.py clean for quantum-jet
  Building wheel for thewalrus (setup.py) ... done
  Created wheel for thewalrus: filename=thewalrus-0.20.0-py3-none-any.whl size=91884 sha256=30628e52e8f1794a821d48f23f72167e04472adad96cd1bb1fd830eb41a493f3
  Stored in directory: C:\Users\KK\AppData\Local\Temp\pip-ephem-wheel-cache-d1536uwh\wheels\1e\56\06\25fcef4b5f47a18fc725f9e0e1e3495ee0fa354f3f91ec0b71
  Building wheel for antlr4-python3-runtime (setup.py) ... done
  Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.2-py3-none-any.whl size=144569 sha256=31f0ef7f7fed60c6fae2342162280e0359729b7497a501e7b6bd9a1cbc088971
  Stored in directory: C:\Users\KK\AppData\Local\Temp\pip-ephem-wheel-cache-d1536uwh\wheels\14\4c\18\1dbbc9875a2547d2063400ea9f404da4af3331965a71061029
  Building wheel for fire (setup.py) ... done
  Created wheel for fire: filename=fire-0.5.0-py2.py3-none-any.whl size=116950 sha256=569506313255fc7e9294a1d3031dbb586ca4fbd9ae9104efa79cf68955312aac
  Stored in directory: C:\Users\KK\AppData\Local\Temp\pip-ephem-wheel-cache-d1536uwh\wheels\20\97\e1\dd2c472bebcdcaa85fdc07d0f19020299f1c86773028860c53
Successfully built thewalrus antlr4-python3-runtime fire
Failed to build quantum-jet
ERROR: Could not build wheels for quantum-jet, which is required to install pyproject.toml-based projects

I am quite lost at this point… Can someone see where the issue is coming from? I used a blank virtual environment and also tried the option

pip install quantum-jet --no-cache-dir

as stated in several stackoverflow posts.

Hello @zephir, I receive the same error when running pip install quantum-jet in Colab. Could you perform your tensor contractions in pennylane?

Reference:

1 Like

Hi @zephir

Thanks for mentioning this. Unfortunately, JET development is currently inactive, and so adding Windows support is not on our roadmap right now. If you need to use JET under Windows, I suggest using WSL and Python 3.9 as your target, which will allow you to use the Linux wheels. With this, you should be able to have a working variant of JET through Python.

As JET is open source, if you wish to add Windows support, please feel free to consider adding support for the MSVC compiler to GitHub - XanaduAI/jet: Jet is a cross-platform library for simulating quantum circuits using tensor network contractions., though this may be a non-trivial amount of effort.

We have on our roadmap to add support for a tensor-network backend to PennyLane in future, so hopefully the above will give you the functionality you require until this is released.

Feel free to let us know if you have any other questions.

1 Like

Thank you two for the quick response. I wanted to set a a linux patition anyway, so this will be happening. For other interested people: I can use it with cygwin gcc-g++ 11 on windows:

(-1.1451,0.443118)
(0.455968,0.294585)
(0.16874,0.163228)
(-1.41503,-0.183477)
You have successfully used Jet version 0.2.3-dev

But I’d rather use Python, as this is only the begining… I hope I can ask again if something will go wrong there :smile:

2 Likes

Glad to hear you got things up and running.

Feel free to ask about anything that comes up, and will be more than happy to help if we can!