The Kirin Toolchain for building compilers and interpreters.
Project description
KIRIN
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.
Roadmap
We use github issues to track the roadmap. There are more feature requests and proposals in the issues. Here are some of the most wanted features we wish to implement before a beta release:
- Initial version of the IR
- Interpretation framework
- Basic analysis and transformations (e.g. constant folding, type inference, etc.)
- Documentation
- proper stack trace for errors (#13)
- text format (#199)
- Integration with LLVM (#294)
- Integration with MLIR (IRDL) (#293)
- IR serialization + deserialization (#291)
Proposal for the roadmap and feature requests are welcome!
License
Apache License 2.0 with LLVM Exceptions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kirin_toolchain-0.15.1.tar.gz.
File metadata
- Download URL: kirin_toolchain-0.15.1.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bb5331dafab96f8a83551b38a81e9ae8eb7f193ff8e59403728acc814e7007e
|
|
| MD5 |
f5badbd718b74c16c7a14a1cf047a9e6
|
|
| BLAKE2b-256 |
82ce2ab89c2121d67de6f9e531e8b79208c30ecec9c0dd64c9c4164f5281398a
|
Provenance
The following attestation bundles were made for kirin_toolchain-0.15.1.tar.gz:
Publisher:
release.yml on QuEraComputing/kirin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kirin_toolchain-0.15.1.tar.gz -
Subject digest:
4bb5331dafab96f8a83551b38a81e9ae8eb7f193ff8e59403728acc814e7007e - Sigstore transparency entry: 183806271
- Sigstore integration time:
-
Permalink:
QuEraComputing/kirin@fa2986649a430c3ed62a71e2ec8336a9e7cb5e7d -
Branch / Tag:
refs/tags/v0.15.1 - Owner: https://github.com/QuEraComputing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fa2986649a430c3ed62a71e2ec8336a9e7cb5e7d -
Trigger Event:
push
-
Statement type:
File details
Details for the file kirin_toolchain-0.15.1-py3-none-any.whl.
File metadata
- Download URL: kirin_toolchain-0.15.1-py3-none-any.whl
- Upload date:
- Size: 208.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa3be633948cb30c94c8113849c6deefa55b4328163aed5337c2c9d99f841b2b
|
|
| MD5 |
408894e3cb5af4aebaa940f477240157
|
|
| BLAKE2b-256 |
276fe8a22a38bf6e57d6859b00ec8b48a249e0a3005f1ed36df617d45334616a
|
Provenance
The following attestation bundles were made for kirin_toolchain-0.15.1-py3-none-any.whl:
Publisher:
release.yml on QuEraComputing/kirin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kirin_toolchain-0.15.1-py3-none-any.whl -
Subject digest:
aa3be633948cb30c94c8113849c6deefa55b4328163aed5337c2c9d99f841b2b - Sigstore transparency entry: 183806274
- Sigstore integration time:
-
Permalink:
QuEraComputing/kirin@fa2986649a430c3ed62a71e2ec8336a9e7cb5e7d -
Branch / Tag:
refs/tags/v0.15.1 - Owner: https://github.com/QuEraComputing
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fa2986649a430c3ed62a71e2ec8336a9e7cb5e7d -
Trigger Event:
push
-
Statement type: