94 lines
2.0 KiB
Plaintext
94 lines
2.0 KiB
Plaintext
---
|
|
title: TGate (v0.31)
|
|
description: API reference for qiskit.circuit.library.TGate in qiskit v0.31
|
|
in_page_toc_min_heading_level: 1
|
|
python_api_type: class
|
|
python_api_name: qiskit.circuit.library.TGate
|
|
---
|
|
|
|
# TGate
|
|
|
|
<Class id="qiskit.circuit.library.TGate" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/circuit/library/standard_gates/t.py" signature="TGate(label=None)" modifiers="class">
|
|
Bases: `qiskit.circuit.gate.Gate`
|
|
|
|
Single qubit T gate (Z\*\*0.25).
|
|
|
|
It induces a $\pi/4$ phase, and is sometimes called the pi/8 gate (because of how the RZ(pi/4) matrix looks like).
|
|
|
|
This is a non-Clifford gate and a fourth-root of Pauli-Z.
|
|
|
|
**Matrix Representation:**
|
|
|
|
$$
|
|
\begin{split}T = \begin{pmatrix}
|
|
1 & 0 \\
|
|
0 & e^{i\pi/4}
|
|
\end{pmatrix}\end{split}
|
|
$$
|
|
|
|
**Circuit symbol:**
|
|
|
|
```python
|
|
┌───┐
|
|
q_0: ┤ T ├
|
|
└───┘
|
|
```
|
|
|
|
Equivalent to a $\pi/4$ radian rotation about the Z axis.
|
|
|
|
Create new T gate.
|
|
|
|
## Methods Defined Here
|
|
|
|
<span id="qiskit-circuit-library-tgate-inverse" />
|
|
|
|
### inverse
|
|
|
|
<Function id="qiskit.circuit.library.TGate.inverse" signature="TGate.inverse()">
|
|
Return inverse T gate (i.e. Tdg).
|
|
</Function>
|
|
|
|
## Attributes
|
|
|
|
### decompositions
|
|
|
|
<Attribute id="qiskit.circuit.library.TGate.decompositions">
|
|
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
|
|
</Attribute>
|
|
|
|
### definition
|
|
|
|
<Attribute id="qiskit.circuit.library.TGate.definition">
|
|
Return definition in terms of other basic gates.
|
|
</Attribute>
|
|
|
|
### duration
|
|
|
|
<Attribute id="qiskit.circuit.library.TGate.duration">
|
|
Get the duration.
|
|
</Attribute>
|
|
|
|
### label
|
|
|
|
<Attribute id="qiskit.circuit.library.TGate.label">
|
|
Return instruction label
|
|
|
|
**Return type**
|
|
|
|
`str`
|
|
</Attribute>
|
|
|
|
### params
|
|
|
|
<Attribute id="qiskit.circuit.library.TGate.params">
|
|
return instruction params.
|
|
</Attribute>
|
|
|
|
### unit
|
|
|
|
<Attribute id="qiskit.circuit.library.TGate.unit">
|
|
Get the time unit of duration.
|
|
</Attribute>
|
|
</Class>
|
|
|