Skip to content

QuEraComputing/kirin

Repository files navigation

KIRIN

CI codecov Supported Python versions

Kernel Intermediate Representation INfrastructure

Important

This project is in the early stage of development. API and features are subject to change. If you are concerned about the stability of the APIs, consider pinning the version of Kirin in your project.

Installation

Install via uv (Recommended)

uv add kirin-toolchain

Install via pip

pip install kirin-toolchain

Documentation

The documentation is available at https://queracomputing.github.io/kirin/latest/. We are at an early stage of completing the documentation with more details and examples, so comments and contributions are most welcome!

Community

  • Slack: join our Slack.
  • GitHub Discussions: discussion board for questions, feature requests, and more. GitHub Discussions.

Projects using Kirin

Quantum Computing

We are actively using Kirin at QuEra Computing. Here are some open-source eDSLs for quantum computing that we have developed using Kirin:

  • bloqade.qasm2: This is an eDSL for quantum computing that uses Kirin to define an eDSL for the Quantum Assembly Language (QASM) 2.0. It demonstrates how to create multiple dialects using Kirin, run custom analysis and rewrites, and generate code from the dialects (back to QASM 2.0 in this case).
  • bloqade.stim: This is an eDSL for quantum computing that uses Kirin to define an eDSL for the STIM language. It demonstrates how to create multiple dialects using Kirin, run custom analysis and rewrites, and generate code from the dialects (back to Stim in this case).
  • bloqade.qBraid: This example demonstrates how to lower from an existing representation into the Kirin IR by using the visitor pattern.

License

Apache License 2.0 with LLVM Exceptions