Installation#

uv is recommended for installation:

uv pip install fiqci-ems
# or
uv add fiqci-ems

Requires Python 3.11 or 3.12.

Verifying the installation#

To test your installation clone the repository and run the tests against the installed package.

git clone https://github.com/fiqci/fiqci-ems.git
cd fiqci-ems
uv run --group dev pytest

HPC systems (Apptainer / Singularity)#

On shared HPC systems it is recommended to install Python environments inside a container using Apptainer/Singularity. The definition file below builds on the official uv image, so uv is already available in the container.

Save it as fiqci-ems.def:

Bootstrap: docker
From: ghcr.io/astral-sh/uv:python3.12-bookworm-slim

%post
    uv pip install --system --no-cache fiqci-ems

And to build the image

apptainer build --fakeroot fiqci-ems.sif fiqci-ems.def
apptainer exec fiqci-ems.sif python3 my_script.py

LUMI#

On LUMI fiqci-ems comes pre-installed in the fiqci-vtt-qiskit module which can be used via

module load Local-quantum
module load fiqci-vtt-qiskit

Otherwise you can use it in your own containers. It is highly recommended to use one of the two container-based workflows below. See the LUMI documentation on installing Python, the container wrapper and Singularity/Apptainer for background.

Define the environment once in an env.yml file.

channels:
  - conda-forge
dependencies:
  - python=3.12
  - pip
  - pip:
      - fiqci-ems
      - pytest

Option 2: Build a SIF image with cotainr#

If you prefer an explicit, portable .sif image (for example to share it or manage container execution yourself), build it with cotainr:

module load CrayEnv
module load cotainr

cotainr build fiqci-ems.sif --system=lumi-c --conda-env=env.yml

Verify the installation on a compute node via srun.

git clone https://github.com/fiqci/fiqci-ems.git
srun --account=<project> --partition=interactive \
    singularity exec -B "$PWD:/mnt" fiqci-ems.sif \
    python3 -m pytest /mnt/fiqci-ems/tests -p no:cacheprovider