QuantumExtension¶
- class tket.extensions.QuantumExtension[source]¶
Bases:
TketExtensionTKET’s standard quantum operations.
- property CRz: ExtOp¶
Controlled Rz rotation with angle parameter.
- property CX: ExtOp¶
Controlled-X (CNOT).
- property CY: ExtOp¶
Controlled-Y.
- property CZ: ExtOp¶
Controlled-Z.
- property H: ExtOp¶
Hadamard.
- property Rx: ExtOp¶
Rotate around X by a rotation parameter.
- property Ry: ExtOp¶
Rotate around Y by a rotation parameter.
- property Rz: ExtOp¶
Rotate around Z by a rotation parameter.
- property S: ExtOp¶
S phase gate (pi/2 around Z).
- property Sdg: ExtOp¶
S dagger gate (-pi/2 around Z).
- property T: ExtOp¶
T phase gate (pi/4 around Z).
- property Tdg: ExtOp¶
T dagger gate (-pi/4 around Z).
- property V: ExtOp¶
V gate (sqrt(X)).
- property Vdg: ExtOp¶
V dagger gate (sqrt(X))^-1.
- property X: ExtOp¶
Pauli-X.
- property Y: ExtOp¶
Pauli-Y.
- property Z: ExtOp¶
Pauli-Z.
- __init__()¶
- property measure: ExtOp¶
Measure a qubit producing a classical result (and keep the qubit).
- property measure_free: ExtOp¶
Measure a qubit producing an opaque bool (qubit consumed).
- property qFree: ExtOp¶
Free a qubit (lose track).
- symbolic_angle(expr)[source]¶
Store a sympy expression evaluable to a rotation angle.
- Return type:
ExtOp
- Args:
expr: A sympy expression as a string.
- property symbolic_angle_def: OpDef¶
Store a sympy expression evaluable to a rotation angle.
This is the generic operation definition. For the instantiated operation, see symbolic_angle.
- property toffoli: ExtOp¶
Toffoli (CCX).
- property try_QAlloc: ExtOp¶
Try allocate a qubit, returning None on failure.
- property version: Version¶
The version of the extension