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__() → Extension[source]

Returns the rotation extension

Return type:

Extension

__init__()
property from_halfturns: ExtOp[source]

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

property from_halfturns_unchecked: ExtOp[source]

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

property radd: ExtOp[source]

Add two angles together.

property rotation: ExtType[source]

Rotation type expressed as number of half-turns.

property to_halfturns: ExtOp[source]

Convert rotation to a number of half-turns.

property version: Version

The version of the extension