Guppy (programming language)
Guppy is a quantum programming language embedded in Python. The open-source language was released by Quantinuum in 2025.
Language
Guppy enables quantum computing programming above the gate level using conditional logic and the ability to incorporate any quantum error correction code.By replacing low-level, gate-by-gate programming with structured, dynamic code, the language is designed to make quantum programming accessible to a broader set of developers.
Features
Guppy integrates with existing Python codebases and libraries.It supports real-time feedback and common code logic, including “if/then” statements and “for” loop structures.
Guppy can execute various protocols including magic state distillation and injection, quantum teleportation, and other measurement-based routines with a real-time control system.
Guppy automatically optimizes qubit resource management, allowing for automatic reuse of qubits via dynamic allocation and deallocation.
Example
The following example from the official library demonstrates how to use Guppy for quantum teleportation.from guppylang import guppy
from guppylang.std.builtins import owned
from guppylang.std.quantum import cx, h, measure, qubit, x, z
@guppy
def teleport -> None:
"""Teleports the state in `src` to `tgt`."""
# Create ancilla and entangle it with src and tgt
tmp = qubit
h
cx
cx
# Apply classical corrections
h
if measure:
z
if measure:
x
teleport.check