GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • MQT DDSIM 3.0.0.dev0 documentation

This view

  • Original page
  • New address

GeezerVison is showing mqt.readthedocs.io — Installation

Installation¶

MQT DDSIM is a Python package available on PyPI. It can be installed on all major operating systems with all officially supported Python versions.

Tip

We recommend using uv. It is a fast Python package and project manager by Astral (creators of ruff). It can replace pip and virtualenv, automatically manages virtual environments, installs packages, and can install Python itself. It is significantly faster than pip.

If you do not have uv installed, install it with:

Linux and macOS
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

See the uv documentation for more information.

uv (recommended)
uv pip install mqt.ddsim
pip
python -m pip install mqt.ddsim

Verify the installation:

python -c "import mqt.ddsim; print(mqt.ddsim.__version__)"

This prints the installed package version.

Integrating MQT DDSIM into Your Project¶

To use the MQT DDSIM Python package in your project, add it as a dependency in your pyproject.toml or setup.py. This ensures the package is installed when your project is installed.

uv (recommended)
uv add mqt.ddsim
pyproject.toml
[project]
# ...
dependencies = ["mqt.ddsim>=<version>"]
# ...
setup.py
from setuptools import setup

setup(
    # ...
    install_requires=["mqt.ddsim>=<version>"],
    # ...
)

Development Setup¶

Set up a reproducible development environment for MQT DDSIM. This is the recommended starting point for both bug fixes and new features. For detailed guidelines and workflows, see Contributing.

  1. Get the code:

    External Contribution

    If you do not have write access to the munich-quantum-toolkit/ddsim repository, fork the repository on GitHub (see https://docs.github.com/en/get-started/quickstart/fork-a-repo) and clone your fork locally.

    git clone [email protected]:your_name_here/ddsim.git mqt-ddsim
    
    Internal Contribution

    If you have write access to the munich-quantum-toolkit/ddsim repository, clone the repository locally.

    git clone [email protected]/munich-quantum-toolkit/ddsim.git mqt-ddsim
    
  2. Change into the project directory:

    cd mqt-ddsim
    
  3. Create a branch for local development:

    git checkout -b name-of-your-bugfix-or-feature
    

    Now you can make your changes locally.

  4. Install the project and its development dependencies:

    We highly recommend using modern, fast tooling for the development workflow. We recommend using uv. If you don’t have uv, follow the installation instructions in the recommendation above (see tip above). See the uv documentation for more information.

    uv (recommended)

    Install the project (including development dependencies) with uv:

    uv sync
    
    pip

    If you really don’t want to use uv, you can install the project and the development dependencies into a virtual environment using pip.

    python -m venv .venv
    source ./.venv/bin/activate
    python -m pip install -U pip
    python -m pip install -e . --group dev
    
  5. Install pre-commit hooks to ensure code quality:

    The project uses pre-commit hooks for running linters and formatting tools on each commit. These checks can be run manually via nox, by running:

    nox -s lint
    

    They can also be run automatically on every commit via prek (recommended). To set this up, install prek, e.g., via:

    Linux and macOS
    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/latest/download/prek-installer.sh | sh
    
    Windows (PowerShell)
    powershell -ExecutionPolicy ByPass -c "irm https://github.com/j178/prek/releases/latest/download/prek-installer.ps1 | iex"
    
    uv
    uv tool install prek
    

    Then run:

    prek install
    
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.