WasmExtension¶
- class tket.extensions.WasmExtension[source]¶
Bases:
TketExtensionWASM interop operations.
- __init__()¶
- call(inputs, outputs)[source]¶
Call a function in a context, returning a Result.
- Return type:
ExtOp
- Args:
inputs: Function input types. outputs: Function output types.
- property call_def: OpDef¶
Call a function in a context, returning a Result.
This is the generic operation definition. For the instantiated operation, see call.
- property context: ExtType¶
WASM context.
- property dispose_context: ExtOp¶
Dispose a WASM context.
- func(inputs, outputs)[source]¶
WASM function type signature (instantiated).
- Return type:
ExtType
- Args:
inputs: List of input types. outputs: List of output types.
- property func_def: TypeDef¶
WASM function type signature (generic definition).
This is the generic type definition. For the instantiated type, see func.
- property get_context: ExtOp¶
Retrieve a context by handle.
- lookup_by_id(id, inputs, outputs)[source]¶
Lookup a function in a module by name and signature.
- Return type:
ExtOp
- Args:
id: Function id to look up. inputs: Function input types. outputs: Function output types.
- property lookup_by_id_def: OpDef¶
Lookup a function in a module by id.
This is the generic operation definition. For the instantiated operation, see lookup_by_id.
- lookup_by_name(name, inputs, outputs)[source]¶
Lookup a function in a module by name and signature.
- Return type:
ExtOp
- Args:
name: Function name to look up. inputs: Function input types. outputs: Function output types.
- property lookup_by_name_def: OpDef¶
Lookup a function in a module by name.
This is the generic operation definition. For the instantiated operation, see lookup_by_name.
- property module: ExtType¶
WASM module.
- read_result(outputs)[source]¶
Read the result of a function call.
- Return type:
ExtOp
- Args:
outputs: The output types of the call
- property read_result_def: OpDef¶
Read the result of a function call.
This is the generic operation definition. For the instantiated operation, see read_result.
- property result_def: TypeDef¶
WASM module.
- property version: Version¶
The version of the extension