Pythonic quantum-classical programming language
Project description
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
Development
See DEVELOPMENT.md for instructions on setting up the development environment.
Attribution
If you use this software, please cite it using CITATION.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).
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 guppylang-0.21.11.tar.gz.
File metadata
- Download URL: guppylang-0.21.11.tar.gz
- Upload date:
- Size: 68.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ff823484c9e8cc2a9c13279be0aec2dc68f3aa725bd9f125d912a393983747e
|
|
| MD5 |
4789ea7036f2ff96db02ec4ecbbcd1ad
|
|
| BLAKE2b-256 |
fe6ddcfebfca39fc8fce2f5b27fc2f411ebfcd18e4509959215ac6d6a38afb5f
|
Provenance
The following attestation bundles were made for guppylang-0.21.11.tar.gz:
Publisher:
python-wheels.yml on Quantinuum/guppylang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
guppylang-0.21.11.tar.gz -
Subject digest:
5ff823484c9e8cc2a9c13279be0aec2dc68f3aa725bd9f125d912a393983747e - Sigstore transparency entry: 1206135618
- Sigstore integration time:
-
Permalink:
Quantinuum/guppylang@6b38f5ab2df3ce2ebb11ffb7397c02e5d9b4b2c8 -
Branch / Tag:
refs/tags/guppylang-v0.21.11 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-wheels.yml@6b38f5ab2df3ce2ebb11ffb7397c02e5d9b4b2c8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file guppylang-0.21.11-py3-none-any.whl.
File metadata
- Download URL: guppylang-0.21.11-py3-none-any.whl
- Upload date:
- Size: 65.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b00e8f1be52c846c349c576c4d264771fca01fe5f2f0a6a01434f92d4b7350c4
|
|
| MD5 |
a2ea7f9e45f124a7f0cdce9c84db07fc
|
|
| BLAKE2b-256 |
48737e6e9567d600cdb181273216ba82ab9b8b279da92c969685506b83181af9
|
Provenance
The following attestation bundles were made for guppylang-0.21.11-py3-none-any.whl:
Publisher:
python-wheels.yml on Quantinuum/guppylang
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
guppylang-0.21.11-py3-none-any.whl -
Subject digest:
b00e8f1be52c846c349c576c4d264771fca01fe5f2f0a6a01434f92d4b7350c4 - Sigstore transparency entry: 1206135634
- Sigstore integration time:
-
Permalink:
Quantinuum/guppylang@6b38f5ab2df3ce2ebb11ffb7397c02e5d9b4b2c8 -
Branch / Tag:
refs/tags/guppylang-v0.21.11 - Owner: https://github.com/Quantinuum
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-wheels.yml@6b38f5ab2df3ce2ebb11ffb7397c02e5d9b4b2c8 -
Trigger Event:
release
-
Statement type: