Installation
Kirin is available in PyPI and
thus can be installed via pip.
Install Kirin using the following command:
pip install kirin-toolchainKirin supports Python 3.9 or later. We recommend using Python 3.10+ for the best experience.
We strongly recommend developing your compiler project using uv,
which is the official development environment for Kirin. You can install uv using the following command:
Linux and macOS
Section titled “Linux and macOS”curl -LsSf https://astral.sh/uv/install.sh | shthen
uv add kirin-toolchainWindows
Section titled “Windows”powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"then
uv add kirin-toolchainKirin and its friends
Section titled “Kirin and its friends”Kirin also comes with a few friends that you might find useful:
bloqade-qasm: (link missing) A quantum assembly language (QASM 2.0) dialect for Kirin with a builtin QASM 2.0 text format parser.bloqade: (available soon) QuEra’s SDK for next-gen error-corrected neutral-atom quantum computers.
Development
Section titled “Development”If you want to contribute to Kirin, you can clone the repository from GitHub:
git clone https://github.com/QuEraComputing/kirin.gitWe use uv to manage the development environment, after you install uv, you can install the development dependencies using the following command:
uv syncOur code review requires that you pass the tests and the linting checks. We recommend
you to install pre-commit to run the checks before you commit your changes, the command line
tool pre-commit has been installed as part of the development dependencies. You can setup
pre-commit using the following command:
pre-commit installRequirements
Section titled “Requirements”Kirin requires the following dependencies:
rich: for pretty-printingtype-extensions: for type hintsbeartype: for runtime type checking and analysis of type hints in the python dialect