This repository contains the source code and implementations for lattice surgery algorithms and their performance analysis on quantum circuits.
For a quick introduction, see the tutorial.ipynb notebook in the root directory.
We use uv for Python package management. To set up the environment:
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Sync dependencies and create virtual environment
uv syncThis will create a virtual environment at .venv and install all dependencies specified in pyproject.toml.
To activate the virtual environment:
source .venv/bin/activateThe C++ implementation requires a C++17 compatible compiler (e.g., g++-13).
See tutorial.ipynb or src/README.md for compilation and usage instructions.
If necessary, initialize and update git submodules with:
git submodule update --init --recursiveWe use TeleportRouter.jl as a submodule for the EDPC algorithm.
src/- Main source code and algorithms (see src/README.md for details)cpp/- C++ implementation of lattice surgery algorithmsipynb/- Jupyter notebooks for analysis and visualizationTeleportRouterSub/- EDPC algorithm integration
problem/- Problem generation and circuit benchmarksdata/- Input circuits and experimental datadoc/- Documentation and referencestutorial.ipynb- Quick start tutorial
For detailed information on reproducing experimental results and using the algorithms, please refer to src/README.md.
This project is licensed under the MIT License - see the LICENSE file for details.