RotationExtension

class tket.extensions.RotationExtension[source]

Bases: TketExtension

Rotation type for TKET’s quantum 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 rotation extension

Return type:

Extension

__init__()
property from_halfturns: ExtOp

Construct rotation from number of half-turns; returns None if non-finite.

property from_halfturns_unchecked: ExtOp

Construct rotation from number of half-turns; panics if non-finite.

property radd: ExtOp

Add two angles together.

property rotation: ExtType

Rotation type expressed as number of half-turns.

property to_halfturns: ExtOp

Convert rotation to a number of half-turns.

property version: Version

The version of the extension