Lightning-Tensor installation¶
Lightning-Tensor requires CUDA 12 and the cuQuantum SDK (only the cutensornet library is required).
The SDK may be installed within the Python environment site-packages
directory using pip
or conda
or the SDK library path appended to the LD_LIBRARY_PATH
environment variable.
Please see the cuQuantum SDK install guide for more information.
Install Lightning-Tensor from source¶
Lightning-Qubit should be installed before Lightning-Tensor (compilation is not necessary):
git clone https://github.com/PennyLaneAI/pennylane-lightning.git
cd pennylane-lightning
pip install -r requirements.txt
PL_BACKEND="lightning_qubit" python scripts/configure_pyproject_toml.py
SKIP_COMPILATION=True pip install -e . --config-settings editable_mode=compat
Then the cutensornet library can be installed and set a CUQUANTUM_SDK
environment variable.
export CUQUANTUM_SDK=$(python -c "import site; print( f'{site.getsitepackages()[0]}/cuquantum')")
The Lightning-Tensor can then be installed with pip
:
PL_BACKEND="lightning_tensor" python scripts/configure_pyproject_toml.py
pip install -e . --config-settings editable_mode=compat -vv
lightning_tensor/installation
Download Python script
Download Notebook
View on GitHub