Guppy
Guppy is a quantum programming language that is fully embedded into Python. It allows you to write high-level hybrid quantum programs with classical control flow and mid-circuit measurements using Pythonic syntax:
from guppylang import guppy
from guppylang.std.builtins import owned
from guppylang.std.quantum import cx, h, measure, qubit, x, z
@guppy
def teleport(src: qubit @ owned, tgt: qubit) -> None:
"""Teleports the state in `src` to `tgt`."""
# Create ancilla and entangle it with src and tgt
tmp = qubit()
h(tmp)
cx(tmp, tgt)
cx(src, tmp)
# Apply classical corrections
h(src)
if measure(src):
z(tgt)
if measure(tmp):
x(tgt)
teleport.check()
Documentation
Install
Guppy can be installed via pip. Requires Python >= 3.10.
pip install guppylang
Attribution
If you use this software, please cite it using CITATIONS.bib or CITATION.cff (click "Cite this repository" in the About section of the repository landing page).
License
This project is licensed under Apache License, Version 2.0 (LICENCE or http://www.apache.org/licenses/LICENSE-2.0).
Metadata
Release files for guppylang 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| guppylang-1.0.4.tar.gz | 91.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| guppylang-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 179.5 kB
Release files / guppylang-1.0.4.tar.gz
| Download URL | guppylang-1.0.4.tar.gz |
|---|---|
| Size | 91.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
633099d72b6a3ef5d4d6bcdd0b4941ff1e0f1ab4bed7645b258abc80cacaa0fc
|
|
BLAKE2b-256 checksum How to use checksums |
e70324d5a079e27e6ea1e5393ecbaa1ba0dce88ad2ac21d427f4ae42e00850e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency logRelease files / guppylang-1.0.4-py3-none-any.whl
| Download URL | guppylang-1.0.4-py3-none-any.whl |
|---|---|
| Size | 88.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a49dc409f0d0adaf5f6e4a10b0c7646067d4165374304fb0919c9053c53344b
|
|
BLAKE2b-256 checksum How to use checksums |
39d9b783e5cd4d064b6b3b8802dcca6cb61f50a0f83579f2cb8cc644c282cf9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 8, 2026.
Transparency log