Skip to content

euqalyptus

euqalyptus is the Python frontend of the Qoala compiler stack. You write a quantum-network program as a regular Python function (or class), call compile(), and out comes a Qoala HIR module — the highest-level intermediate representation, which is then consumed by the qoala-mlir toolchain for the rest of the pipeline.

from euqalyptus import QoalaProgram
from euqalyptus.operations import Remote
from euqalyptus.types.quantum import Entangle
from euqalyptus.operations.communication import send_int

@QoalaProgram
def hello_alice():
    alice = Remote("Alice")
    q = Entangle("Alice")
    m = q.measure()
    send_int(alice, m)

if __name__ == "__main__":
    _, hir = hello_alice.compile()
    print(str(hir))

Frontend pipeline

Where to start

If this is your first encounter with euqalyptus, read the Overview for a sketch of the pipeline and follow Getting started to set up your environment. The Examples / Teleportation tutorial walks through a runnable end-to-end program. When you start writing your own programs, the SDK reference is the place to look up types, qubit methods, and operations. The Architecture / From Python to Qoala HIR page explains, in detail, what happens between your Python source and the emitted MLIR module — that is what every SDK call ultimately boils down to. Once you have a compiled HIR module in hand, Continuing the pipeline hands you off to the qoala-mlir toolchain that takes it the rest of the way.

What lives where

You want to… Go to
Write your first program Getting started, Examples
Look up a type or operation SDK reference
Understand how compile() works SDK reference / Compilation, Architecture
Move from HIR to a runnable .iqoala Continuing the pipeline, qoala-mlir docs
Contribute / set up locally Contributing