Jump to content

Guppy (programming language)

From Wikipedia, the free encyclopedia
Guppy
ParadigmQuantum
DeveloperQuantinuum Ltd.
Implementation languagePython
LicenseApache License 2.0
Websitedocs.quantinuum.com/guppy/

Guppy is a quantum programming language embedded in Python.[1][2] The open-source language was released by Quantinuum in 2025.[1][3]

Language

[edit]

Guppy enables quantum computing programming above the gate level using conditional logic and the ability to incorporate any quantum error correction code.[4]

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.[5]

Features

[edit]

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.[1][6]

Guppy can execute various protocols including magic state distillation and injection, quantum teleportation, and other measurement-based routines with a real-time control system.[1]

Guppy automatically optimizes qubit resource management, allowing for automatic reuse of qubits via dynamic allocation and deallocation.[4][6]

Example

[edit]

The following example from the official library demonstrates how to use Guppy for quantum teleportation.[7]

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

References

[edit]
  1. ^ a b c d Dotson, Kyt (20 Aug 2025). "Quantinuum announces new quantum programming language and emulation platform". siliconANGLE. Retrieved 2025-10-28.
  2. ^ Tatananni, Mackenzie (27 Aug 2025). "Quantinuum CEO Weighs In on Quantum Programming and What's Next for the Industry". Retrieved 2025-10-28.
  3. ^ Finke, Doug (20 Aug 2025). "Quantinuum Introduces New Software Stack with Guppy and Selene for Helios Quantum Computer". Quantum Computing Report. Retrieved 2025-10-28.
  4. ^ a b Dignan, Larry (20 Aug 2025). "Quantinuum fleshes out quantum software stack with open source Guppy, Selene". Constellation Research. Retrieved 2025-10-28.
  5. ^ Swayne, Matt (20 Aug 2025). "Stacked: Quantinuum Unveils New Software Stack Ahead of Helios Launch". Retrieved 2025-10-28.
  6. ^ a b Russel, John (20 Aug 2025). "Quantinuum Debuts New SW Stack in Prep for Helios". HPCwire. Retrieved 2025-10-28.
  7. ^ "GitHub - CQCL/guppylang: Pythonic quantum-classical programming language". 19 Jan 2024. Retrieved 2025-10-28.
[edit]