QSystemRandomExtension

class tket.extensions.QSystemRandomExtension[source]

Bases: TketExtension

QSystem’s random 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 qsystem random extension

Return type:

Extension

__init__()
property context: ExtType

Linear RNG context type.

property delete_RNGContext: ExtOp

Discard the given RNG context.

property new_RNGContext: ExtOp

Seed the RNG and return a new RNG context (call once).

property random_advance: ExtOp

Advance the RNG state by the given delta.

property random_float: ExtOp

Generate a random float in [0, 1).

property random_int: ExtOp

Generate a random 32-bit unsigned integer.

property random_int_bounded: ExtOp

Generate a random 32-bit unsigned integer less than bound.

property version: Version

The version of the extension