FuturesExtension¶
- class tket.extensions.FuturesExtension[source]¶
Bases:
TketExtensionFuture type and handling operations.
- __init__()¶
- dup(ty)[source]¶
Duplicate a Future. The original is consumed and two Futures are returned.
- Return type:
ExtOp
- Args:
ty: The element type of the Future being duplicated.
- property dup_def: OpDef¶
Duplicate a Future. The original is consumed and two Futures are returned.
This is the generic operation definition. For the instantiated operation, see dup.
- free(ty)[source]¶
Consume a Future without reading it.
- Return type:
ExtOp
- Args:
ty: The element type of the Future being consumed.
- property free_def: OpDef¶
Consume a Future without reading it.
This is the generic operation definition. For the instantiated operation, see free.
- future_t(ty)[source]¶
A value that is computed asynchronously.
- Return type:
ExtType
- Args:
The element type wrapped by the Future.
- property future_t_def: TypeDef¶
A value that is computed asynchronously.
This is the generic type definition. For the instantiated type, see future_t
- read(ty)[source]¶
Read a value from a Future, consuming it.
- Return type:
ExtOp
- Args:
ty: The element type of the Future being read.
- property read_def: OpDef¶
Read a value from a Future, consuming it.
This is the generic operation definition. For the instantiated operation, see read.
- property version: Version¶
The version of the extension