extensionsΒΆ

HUGR extension definitions for tket circuits.

Extensions may be imported directly as follows:

>>> import tket.extensions as ext
>>>
>>> argument_extension = ext.argument()
>>> debug_extension = ext.debug()
>>> futures_extension = ext.futures()
>>> global_phase_extension = ext.global_phase()
>>> gpu_extension = ext.gpu()
>>> guppy_extension = ext.guppy()
>>> measurement_extension = ext.measurement()
>>> modifier_extension = ext.modifier()
>>> qsystem_extension = ext.qsystem()
>>> qsystem_helios_extension = ext.qsystem_helios()
>>> qsystem_sol_extension = ext.qsystem_sol()
>>> qsystem_random_extension = ext.qsystem_random()
>>> qsystem_utils_extension = ext.qsystem_utils()
>>> quantum_extension = ext.quantum()
>>> result_extension = ext.result()
>>> rotation_extension = ext.rotation()
>>> wasm_extension = ext.wasm()
>>>
>>> read_arg_op = argument_extension.get_op("read_arg")
OpDef(name='read_arg', signature=OpDefSig(poly_func=PolyFuncType(params=[StringParam(), TypeTypeParam(bound=TypeBound.Linear)], body=FunctionType([], [$1])), binary=False), description='Read a runtime argument of the given type identified by a string tag', misc={})
>>> read_arg_op.description
'Read a runtime argument of the given type identified by a string tag'
>>> read_arg_op.signature
OpDefSig(poly_func=PolyFuncType(params=[StringParam(), TypeTypeParam(bound=TypeBound.Linear)], body=FunctionType([], [$1])), binary=False)

Classes

ArgumentExtension()

Operations for reading runtime entrypoint arguments.

DebugExtension()

Extension for debugging operations.

FuturesExtension()

Future type and handling operations.

GlobalPhaseExtension()

Operation to add global phase to unitary operations.

GpuExtension()

GPU interop operations.

GuppyExtension()

Guppy-specific operations.

MeasurementExtension()

Operations on measurement types.

ModifierExtension()

Control, dagger and power modifiers for unitary operations.

QSystemExtension()

Deprecated (since 0.13.0): use QSystemHeliosExtension or QSystemSolExtension instead.

QSystemHeliosExtension()

Operations for the Helios platform (tket.qsystem.helios).

QSystemRandomExtension()

QSystem's random operations.

QSystemSolExtension()

Operations for the Sol platform (tket.qsystem.sol).

QSystemUtilsExtension()

QSystem's utility operations.

QuantumExtension()

TKET's standard quantum operations.

ResultExtension()

Result reporting operations.

RotationExtension()

Rotation type for TKET's quantum operations.

WasmExtension()

WASM interop operations.