Quadriga-Lib
C++/MEX/Python Utility library for radio channel modelling and simulations
Download and Setup
Overview

- Download
- Installation from Binaries
- Installation from Source

Download

- Latest Version (Source Code)
  quadriga_lib_0.11.0.zip

- Windows Binary Package
  quadriga_lib_0.11.0_win64.zip

- Ubuntu 22.04 (Jammy)
  quadriga-lib_0.11.0-1+jammy_amd64.deb

- Ubuntu 24.04 (Noble)
  quadriga-lib_0.11.0-1+noble_amd64.deb

- Ubuntu 25.10 (Plucky)
  quadriga-lib_0.11.0-1+plucky_amd64.deb

- Python
  `pip install quadriga-lib`

Installation from Binaries
Ubuntu

- Download the appropriate binary package for your distribution (see above)
- Install the package using `dpkg` (replace `<version>` and `<distro>` with the appropriate values):

    sudo dpkg -i quadriga-lib-<version>+<distro>_amd64.deb

- [OPTIONAL]: Add the library to your MATLAB path by running `addpath('/usr/share/quadriga-lib')` in the MATLAB command window or by adding it to your `startup.m` file.

Windows

- Extract the downloaded ZIP file to a location of your choice, e.g. `C:\quadriga-lib`
- [OPTIONAL]: Add the library to your MATLAB path by running `addpath('C:\quadriga-lib')` in the MATLAB command window or by adding it to your `startup.m` file.
- [OPTIONAL]: Install the Python wheel matching your Python version (3.10–3.14) (Replace `cp312` with your Python version (`cp310`, `cp311`, `cp312`, `cp313`, or `cp314`). To check your Python version run `python --version`)

    pip install wheels\quadriga_lib-<version>-cp312-cp312-win_amd64.whl

Python

- Available via PyPI, install using pip:

    pip install quadriga-lib

- Prebuilt wheels are available for Linux x86_64, Linux aarch64, and Windows x86_64 (Python 3.10–3.14). On other platforms, pip will attempt to build from source (requires CMake and a C++17 compiler; may not work on all platforms).

C++ Integration

- The binary packages include public header files (in `include/`) and static libraries (in `lib/`). Link against `quadriga.lib` (or `libquadriga.a` on Linux) and `libhdf5` in your build system of choice. The bundled Armadillo headers are included.

Installation from Source
Linux / Ubuntu

- [OPTIONAL]: Install Matlab from mathworks.com - you need to obtain a license
- Install the required packages (octave-dev is only needed if you want to use Octave):

    sudo apt install bzip2 gcc git make cmake g++ libhdf5-dev python3-dev python3-pytest python3-numpy python3-pip python3-venv octave-dev

- Get Quadriga-Lib either from Github or quadriga-lib.org

    git clone https://github.com/stjaeckel/quadriga-lib
    cd quadriga-lib

- Compile Quadriga-Lib using `make` (cmake is used internally and can also be used directly)
- [OPTIONAL]: Build and run tests: `make test`
- [OPTIONAL]: Add the library to your MATLAB path by running `addpath('quadriga-lib')` in the MATLAB command window or by adding it to your `startup.m` file.
- [OPTIONAL]: If you want to use the Python API, add the library to your Python path by adding the library path to your `PYTHONPATH` environment variable. You can do this by adding the following line to your `.bashrc` or `.bash_profile` file:

    export PYTHONPATH=$PYTHONPATH:/path/to/quadriga-lib/lib

- Note on MATLAB and Ubuntu 24.04 or newer: Ubuntu uses gcc13 as the default C/C++ compiler, but MATLAB uses gcc11. This leads to incompatible symbols in the GLIBCXX and the compiled MEX files will not run in MATLAB. A potential fix is to switch to gcc11:

    sudo apt-get install g++-11
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 110 --slave /usr/bin/g++ g++ /usr/bin/g++-11
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 130 --slave /usr/bin/g++ g++ /usr/bin/g++-13
    sudo update-alternatives --config gcc
    mex -v -setup C++

Linux / Ubuntu with Anaconda

- Install Miniconda from Anaconda's official website. If you already have Anaconda installed, you can skip this step.

    cd ~/Downloads
    wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
    chmod +x Miniconda3-latest-Linux-x86_64.sh
    ./Miniconda3-latest-Linux-x86_64.sh

- Setup a new Anaconda environment with the required packages (you can also use the default channel instead of `conda-forge`, but octave is only available in `conda-forge`):

    conda deactivate
    conda create --name quadriga-lib -c conda-forge python=3.13 numpy pandas jupyterlab seaborn pytest scipy jupyterlab_widgets ipywidgets traittypes jupyter compilers make cmake hdf5 octave
    conda activate quadriga-lib

- Get Quadriga-Lib either from Github or quadriga-lib.org

    git clone https://github.com/stjaeckel/quadriga-lib
    cd quadriga-lib

- Compile Quadriga-Lib (C++, MATLAB, Octave, Python) using `make` (cmake is used internally and can also be used directly)
- [OPTIONAL]: Build and run tests: `make test`
- [ALTERNATIVE]: If you only want to use the Python API, use `make python` and `make python_test`.
- [OPTIONAL]: Add the library to your MATLAB path by running `addpath('quadriga-lib')` in the MATLAB command window or by adding it to your `startup.m` file.
- [OPTIONAL]: If you want to use the Python API, install the Python package by running: `make python_install`. This will install the `quadriga-lib` package into your Anaconda environment.

Windows

- Octave is not supported yet
- Install Build Tools for Visual Studio 2022 from visualstudio.microsoft.com
- Install Matlab from mathworks.com - you need to obtain a licence
- Open "x64 Native Tools Command Prompt" from start menu
- Navigate to library path, e.g. `cd Z:\quadriga-lib`
- Run `nmake` to compile `quadriga-lib` and the MEX Matlab interface
- [OPTIONAL]: Compile and run the unit tests by running `nmake test`
- [OPTIONAL]: Add the library to your MATLAB path by running `addpath('quadriga-lib')` in the MATLAB command window or by adding it to your `startup.m` file.