ops

ops#

Definitions of HUGR operations.

Classes

AliasDecl

Declare an external type alias.

AliasDefn

Declare a type alias.

AsExtOp

Abstract interface that types can implement to behave as an extension dataflow operation.

CFG

Parent operation of a control flow graph.

Call

Call a function inside a dataflow graph.

CallIndirect

Higher order evaluation of a FunctionType value.

Case

Parent of a dataflow graph that is a branch of a Conditional.

Command

A DataflowOp and its incoming Wire

Conditional

'Switch' operation on the variants of an incoming sum type, evaluating the corresponding one of the child Case operations.

Const

A static constant value.

Custom

Serializable version of non-core dataflow operation defined in an extension.

DFG

Simple dataflow graph operation.

DataflowBlock

Parent of non-entry basic block in a control flow graph.

DataflowOp

Abstract dataflow operation.

DfParentOp

Abstract parent of dataflow graph operations.

ExitBlock

Unique exit block of a control flow graph.

ExtOp

A non-core dataflow operation defined in an extension.

FuncDecl

Function declaration operation, defines the signature of a function.

FuncDefn

Function definition operation, parent of a dataflow graph that defines the function.

Input

Input operation in dataflow graph.

LoadConst

Load a constant value into a dataflow graph.

LoadFunc

Load a statically defined function as a higher order value.

MakeTuple

Operation to create a tuple from a sequence of wires.

Module

Root operation of a HUGR which corresponds to a full module definition.

Noop

Identity operation that passes through its input.

Op

An abstract HUGR operation.

Output

Output operation in dataflow graph.

RegisteredOp

Base class for operations that are registered with an extension using Extension.register_op.

Tag

Tag a row of incoming values to make them a variant of a sum type.

TailLoop

Tail controlled loop operation, child dataflow graph iterates while it outputs the first variant of a sum type.

UnpackTuple

Operation to unpack a tuple into its elements.

Exceptions

IncompleteOp(op)

Op types have not been set during building.

InvalidPort(port, op)

Port is not valid for this operation.

NoConcreteFunc

Could not instantiate a polymorphic function.