Skip to main content

The Kirin Toolchain for building compilers and interpreters.

Project description

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.

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

kirin_toolchain-0.16.4.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kirin_toolchain-0.16.4-py3-none-any.whl (218.0 kB view details)

Uploaded Python 3

File details

Details for the file kirin_toolchain-0.16.4.tar.gz.

File metadata

  • Download URL: kirin_toolchain-0.16.4.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

Hashes for kirin_toolchain-0.16.4.tar.gz
Algorithm Hash digest
SHA256 2255d8fb07357a4e2ce57eb6bb5564b530636a3f46a833aeaad2068fd65de9bf
MD5 a9e008679333f76bca5ef0904d3d7333
BLAKE2b-256 169631c333ba3fbfaf9b6b5f6074b2ef1931fc0f6805f3d3405ca5da2792d730

See more details on using hashes here.

Provenance

The following attestation bundles were made for kirin_toolchain-0.16.4.tar.gz:

Publisher: release.yml on QuEraComputing/kirin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kirin_toolchain-0.16.4-py3-none-any.whl.

File metadata

File hashes

Hashes for kirin_toolchain-0.16.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7fde5c20c9d21138c231c826205a5717c6290f8ee3f3ed401bd4793b6bfc4504
MD5 9bf66414d46f63c1319f88d8a864ff8f
BLAKE2b-256 d258c43a3665a96c3aab234ad366f7cb4206c02d0a6bfdb0cf777cb5e4253345

See more details on using hashes here.

Provenance

The following attestation bundles were made for kirin_toolchain-0.16.4-py3-none-any.whl:

Publisher: release.yml on QuEraComputing/kirin

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page