Skip to content

Getting Started

Welcome to the Loom documentation! ๐ŸŽ‰

This guide will help you set up Loom on your machine and run your first tests.


Installing from GitHub

Install the latest release from PyPI:

pip install el-loom

Install the development version directly from GitHub:

pip install git+https://github.com/entropicalabs/el-loom.git

Installing from source

1. Clone the repository

git clone https://github.com/entropicalabs/el-loom.git
cd el-loom

2. Install Poetry

Loom uses Poetry for dependency management.
We recommend installing Poetry in a dedicated virtual environment.

Run the installer:

curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"

Make Poetry available permanently by adding it to your shell config:

# For Bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

# For Zsh (default on Mac)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

3. Install Loom with Poetry

Inside the project folder:

poetry install

This will install Loom and all required dependencies inside a Poetry-managed virtual environment.


4. Optional configurations

  • Keep the virtual environment inside the project directory:

    poetry config virtualenvs.in-project true
    

  • Install extra dependencies (if you plan to contribute, build docs, or use Jupyter notebooks):

    poetry install --with dev        # Development
    poetry install --with docs       # Documentation
    poetry install --with notebooks  # Jupyter Notebooks
    


5. Run the tests

Make sure everything works:

poetry run pytest

If all tests pass, youโ€™re ready to use Loom! ๐Ÿš€

If you run into issues, check the Poetry documentation or open an issue on GitHub.


Extra. To use loom with Pennylane or CudaQ

If you would like to use pennylane-catalyst as the backend for loom, you have to install pennylane-catalyst separately as follows:

pip install pennylane-catalyst~=0.13.0
Alternatively, before installing loom with poetry install, you can run the following command to include pennylane-catalyst into your installation process:
poetry add pennylane-catalyst~=0.13.0

The same process applies for using loom with the cudaq backend.

pip install cudaq~=0.12.0
pip install cuda-quantum-cu12~=0.12.0
If installing through poetry instead:
poetry add cudaq~=0.12.0
poetry add cuda-quantum-cu12~=0.12.0 

Note that both cudaq and pennylane might not be available on all machines. We recommend installing loom + cudaq and loom + pennylane-catalyst in separate environments if the package manager raises an error.

Next Steps