ResultExtension

class tket.extensions.ResultExtension[source]

Bases: TketExtension

Result reporting operations.

OPS()[source]

Return the operations defined by this extension

Return type:

list[OpDef]

TYPES()[source]

Return the types defined by this extension

Return type:

list[TypeDef]

__call__()[source]

Returns the result extension

Return type:

Extension

__init__()
result_array_bool(label, size)[source]

Report an array of boolean results.

Return type:

ExtOp

Args:

label: Label for this result array. size: Length of the array.

property result_array_bool_def: OpDef

Report an array of boolean results.

This is the generic operation definition. For the instantiated operation, see result_array_bool.

result_array_f64(label, size)[source]

Report an array of floating-point results.

Return type:

ExtOp

Args:

label: Label for this result array. size: Length of the array.

property result_array_f64_def: OpDef

Report an array of floating-point results.

This is the generic operation definition. For the instantiated operation, see result_array_f64.

result_array_int(label, size, width)[source]

Report an array of signed integer results.

Return type:

ExtOp

Args:

label: Label for this result array. size: Length of the array. width: Bit width of the integers.

property result_array_int_def: OpDef

Report an array of signed integer results.

This is the generic operation definition. For the instantiated operation, see result_array_int.

result_array_uint(label, size, width)[source]

Report an array of unsigned integer results.

Return type:

ExtOp

Args:

label: Label for this result array. size: Length of the array. width: Bit width of the integers.

property result_array_uint_def: OpDef

Report an array of unsigned integer results.

This is the generic operation definition. For the instantiated operation, see result_array_uint.

result_bool(label)[source]

Report a boolean result.

Return type:

ExtOp

Args:

label: Label for this result.

property result_bool_def: OpDef

Report a boolean result.

This is the generic operation definition. For the instantiated operation, see result_bool.

result_f64(label)[source]

Report a floating-point result.

Return type:

ExtOp

Args:

label: Label for this result.

property result_f64_def: OpDef

Report a floating-point result.

This is the generic operation definition. For the instantiated operation, see result_f64.

result_int(label, width)[source]

Report a signed integer result.

Return type:

ExtOp

Args:

label: Label for this result. width: Bit width of the integer.

property result_int_def: OpDef

Report a signed integer result.

This is the generic operation definition. For the instantiated operation, see result_int.

result_uint(label, width)[source]

Report an unsigned integer result.

Return type:

ExtOp

Args:

label: Label for this result. width: Bit width of the integer.

property result_uint_def: OpDef

Report an unsigned integer result.

This is the generic operation definition. For the instantiated operation, see result_uint.

property version: Version

The version of the extension