mimiqcircuits.operations.gates.standard.t

T and TDG gates.

Classes

GateT([operation, exponent])

Single qubit T gate.

GateTDG([operation])

Single qubit T-dagger gate (conjugate transpose of the T gate).

class mimiqcircuits.operations.gates.standard.t.GateT(operation=None, exponent=None, *args, **kwargs)[source]

Bases: Power

Single qubit T gate.

Matrix representation:

\[\begin{split}\operatorname{T} = \begin{pmatrix} 1 & 0 \\ 0 & \exp\left(\frac{i\pi}{4}\right) \end{pmatrix}\end{split}\]

Examples

>>> from mimiqcircuits import *
>>> GateT()
T
>>> GateT().matrix()
[1.0, 0]
[0, 0.707106781186548 + 0.707106781186548*I]

>>> c = Circuit().push(GateT(), 0)
>>> c
1-qubit circuit with 1 instruction:
└── T @ q[0]

>>> GateT().power(2), GateT().inverse()
(S, T†)
>>> GateT().decompose()
1-qubit circuit with 1 instruction:
└── U(0, 0, (1/4)*pi, 0.0) @ q[0]
__init__(operation=None, exponent=None)[source]

Initialize a T gate.

class mimiqcircuits.operations.gates.standard.t.GateTDG(operation=None, *args, **kwargs)[source]

Bases: Inverse

Single qubit T-dagger gate (conjugate transpose of the T gate).

Matrix representation:

\[\begin{split}\operatorname{T}^\dagger = \begin{pmatrix} 1 & 0 \\ 0 & \exp\left(\frac{-i\pi}{4}\right) \end{pmatrix}\end{split}\]

Examples

>>> from mimiqcircuits import *
>>> GateTDG()
T†
>>> GateTDG().matrix()
[1.0, 0]
[0, 0.707106781186547 - 0.707106781186547*I]

>>> c = Circuit().push(GateTDG(), 0)
>>> c
1-qubit circuit with 1 instruction:
└── T† @ q[0]

>>> GateTDG().power(2), GateTDG().inverse()
((T†)**2, T)
>>> GateTDG().decompose()
1-qubit circuit with 1 instruction:
└── U(0, 0, (-1/4)*pi, 0.0) @ q[0]
__init__(operation=None)[source]

Initialize a TDG gate.