Skip to main content

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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

selene_hugr_qis_compiler-0.2.10-cp310-abi3-win_amd64.whl (29.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

selene_hugr_qis_compiler-0.2.10-cp310-abi3-manylinux_2_28_x86_64.whl (34.0 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

selene_hugr_qis_compiler-0.2.10-cp310-abi3-manylinux_2_28_aarch64.whl (32.9 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

selene_hugr_qis_compiler-0.2.10-cp310-abi3-macosx_13_0_x86_64.whl (32.2 MB view details)

Uploaded CPython 3.10+macOS 13.0+ x86-64

selene_hugr_qis_compiler-0.2.10-cp310-abi3-macosx_13_0_arm64.whl (29.5 MB view details)

Uploaded CPython 3.10+macOS 13.0+ ARM64

File details

Details for the file selene_hugr_qis_compiler-0.2.10-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for selene_hugr_qis_compiler-0.2.10-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bf013a2b6910dbac1a811d95822df25d4bdcd96f15d9b1aa263b578834a45c27
MD5 a038f83a4995e8e8ab5cd95bb74967cf
BLAKE2b-256 1236476ac6ffdd5e8edc7d1f4772fb1eb3679e6e38105aa529a3d59a5d211bfa

See more details on using hashes here.

Provenance

The following attestation bundles were made for selene_hugr_qis_compiler-0.2.10-cp310-abi3-win_amd64.whl:

Publisher: python-qis-wheels.yml on CQCL/tket2

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

File details

Details for the file selene_hugr_qis_compiler-0.2.10-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for selene_hugr_qis_compiler-0.2.10-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9ecb054a543a41ecadcbfdd3d49ba9ada99e5d0806fb1b10638d3e9c1d6e6216
MD5 7454f6b13687c8e9513cf8b95a689f57
BLAKE2b-256 92b0abf9cfe11934100a2210468545c7a8b8508534c1c90b882484a9b59fbf96

See more details on using hashes here.

Provenance

The following attestation bundles were made for selene_hugr_qis_compiler-0.2.10-cp310-abi3-manylinux_2_28_x86_64.whl:

Publisher: python-qis-wheels.yml on CQCL/tket2

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

File details

Details for the file selene_hugr_qis_compiler-0.2.10-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for selene_hugr_qis_compiler-0.2.10-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fde73e325ad51bb00c40978a4a17ecb31ff968854d39259cee5a600bf2964b54
MD5 c75e6e502c6fe9df2976dc569b44ff74
BLAKE2b-256 9dd0569e59983549fcf4c050f892927a55af92e0b0ab0622610c58ebbd72c03f

See more details on using hashes here.

Provenance

The following attestation bundles were made for selene_hugr_qis_compiler-0.2.10-cp310-abi3-manylinux_2_28_aarch64.whl:

Publisher: python-qis-wheels.yml on CQCL/tket2

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

File details

Details for the file selene_hugr_qis_compiler-0.2.10-cp310-abi3-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for selene_hugr_qis_compiler-0.2.10-cp310-abi3-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 60ece08d7ffb792149029f8aad483c546d2f2db8a5d265906bed41479bdc5a9e
MD5 a447945c58a96cdc4680111a656026cd
BLAKE2b-256 f59c77a1b81e1cedbde6f401fbdc2302bc2221c8cbc46c924ac0bd9cda979799

See more details on using hashes here.

Provenance

The following attestation bundles were made for selene_hugr_qis_compiler-0.2.10-cp310-abi3-macosx_13_0_x86_64.whl:

Publisher: python-qis-wheels.yml on CQCL/tket2

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

File details

Details for the file selene_hugr_qis_compiler-0.2.10-cp310-abi3-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for selene_hugr_qis_compiler-0.2.10-cp310-abi3-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 2912702073aa37f1bfd1d42678b972b3b10525ed3f5f003091519512331142bd
MD5 20a0940678aaf97e95daf300cc3951a5
BLAKE2b-256 5aaa6b3f287f9330bf077c95bfef3ab350ab1eac0707f7111c38596a22554ecf

See more details on using hashes here.

Provenance

The following attestation bundles were made for selene_hugr_qis_compiler-0.2.10-cp310-abi3-macosx_13_0_arm64.whl:

Publisher: python-qis-wheels.yml on CQCL/tket2

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