A Python frontend for compiling HUGR to Quantinuum's QIS.
Project description
The HUGR-QIS compiler for Selene
This package provides compilation from HUGR to LLVM adhering to the Quantinuum QIS.
Usage
Guppy can produce a HUGR Envelope with:
from guppylang.decorator import guppy
@guppy
def main() -> None:
# ...
hugr = main.compile()
hugr_envelope = hugr.package.to_bytes()
This can then be compiled to LLVM IR or bitcode using this package:
from selene_hugr_qis_compiler import (
compile_to_llvm_ir,
compile_to_bitcode,
)
# Compile to LLVM IR for the host system
# and receive it as a string
ir = compile_to_llvm_ir(hugr_envelope)
# Compile to LLVM bitcode for the host system
# and receive it as a bytes object
bitcode = compile_to_bitcode(hugr_envelope)
If you wish to target a specific architecture or platform, you can pass the triple as an argument to the compilation functions:
# Compile to LLVM IR for Apple Silicon
ir_apple_silicon = compile_to_llvm_ir(
hugr_envelope,
target_triple="aarch64-apple-darwin",
)
# Compile to LLVM bitcode for x86_64 MSVC
bitcode_apple_silicon = compile_to_bitcode(
hugr_envelope,
target_triple="x86_64-windows-msvc",
)
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 Distributions
Built Distributions
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 selene_hugr_qis_compiler-0.2.1-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: selene_hugr_qis_compiler-0.2.1-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 29.2 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a77af4af41e903e1090f82bcee492b1cea4814de414fef0ab0ab7238786d02f8
|
|
| MD5 |
155341f1b74b7d4c28502f37bd057bab
|
|
| BLAKE2b-256 |
82735cb53dd2e8ad4590da53552f1b637ac7b1dbf7b5fdd4afe55c4bfc994858
|
File details
Details for the file selene_hugr_qis_compiler-0.2.1-cp310-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: selene_hugr_qis_compiler-0.2.1-cp310-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 33.9 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34572464c0aea84c7712718d095c12f3bd350b70860de7004467f769ad023d4f
|
|
| MD5 |
9ad7f53326cafec6e9a4a36ca4925cfe
|
|
| BLAKE2b-256 |
eac9aa44360e159e0ee4036b6649917f964c791bcc367f436c192a1071efc8c6
|
File details
Details for the file selene_hugr_qis_compiler-0.2.1-cp310-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: selene_hugr_qis_compiler-0.2.1-cp310-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 32.9 MB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da8545040ade6cef486fb8347e6abd48965b3960068cf90e809fe72fbe369a1e
|
|
| MD5 |
a6bb55e5a23c12b317a3d7bfff5585e8
|
|
| BLAKE2b-256 |
17ab5cf0830d75b36f0ba381c872e2c22b0bb44565fd9097b870354603b29e76
|
File details
Details for the file selene_hugr_qis_compiler-0.2.1-cp310-abi3-macosx_13_0_x86_64.whl.
File metadata
- Download URL: selene_hugr_qis_compiler-0.2.1-cp310-abi3-macosx_13_0_x86_64.whl
- Upload date:
- Size: 32.2 MB
- Tags: CPython 3.10+, macOS 13.0+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcfeb0a431bd2818827c9cc356c117ad55dbb6670d3d8a60008eccb63578a07f
|
|
| MD5 |
b36bdd15a40025201ff001158b6c333e
|
|
| BLAKE2b-256 |
9db8844e02a602f90bce875c6ecf1541e43803670690d2155ac5826e2c399e9b
|
File details
Details for the file selene_hugr_qis_compiler-0.2.1-cp310-abi3-macosx_13_0_arm64.whl.
File metadata
- Download URL: selene_hugr_qis_compiler-0.2.1-cp310-abi3-macosx_13_0_arm64.whl
- Upload date:
- Size: 29.5 MB
- Tags: CPython 3.10+, macOS 13.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b2fa4ae1b04ff70ce68abeebc1059d10182104f1a8cdadbd0ca4a1f55101f7f
|
|
| MD5 |
735c50402996ef7aea074246e6b891ed
|
|
| BLAKE2b-256 |
c9874729205573b5d59f0efdaebe8a2bb337560a2ae51e5c318881b73f5b1691
|