qiskit-documentation/docs/api/qiskit/0.43/qiskit.circuit.library.IGat...

120 lines
2.8 KiB
Plaintext

---
title: IGate
description: API reference for qiskit.circuit.library.IGate
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.circuit.library.IGate
---
# IGate
<Class id="qiskit.circuit.library.IGate" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/circuit/library/standard_gates/i.py" signature="IGate(label=None)" modifiers="class">
Bases: [`Gate`](qiskit.circuit.Gate "qiskit.circuit.gate.Gate")
Identity gate.
Identity gate corresponds to a single-qubit gate wait cycle, and should not be optimized or unrolled (it is an opaque gate).
Can be applied to a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") with the [`i()`](qiskit.circuit.QuantumCircuit#i "qiskit.circuit.QuantumCircuit.i") and [`id()`](qiskit.circuit.QuantumCircuit#id "qiskit.circuit.QuantumCircuit.id") methods.
**Matrix Representation:**
$$
\begin{split}I = \begin{pmatrix}
1 & 0 \\
0 & 1
\end{pmatrix}\end{split}
$$
**Circuit symbol:**
```python
┌───┐
q_0: ┤ I ├
└───┘
```
Create new Identity gate.
## Methods Defined Here
<span id="qiskit-circuit-library-igate-inverse" />
### inverse
<Function id="qiskit.circuit.library.IGate.inverse" signature="IGate.inverse()">
Invert this gate.
</Function>
<span id="qiskit-circuit-library-igate-power" />
### power
<Function id="qiskit.circuit.library.IGate.power" signature="IGate.power(exponent)">
Raise gate to a power.
</Function>
## Attributes
### condition\_bits
<Attribute id="qiskit.circuit.library.IGate.condition_bits">
Get Clbits in condition.
</Attribute>
### decompositions
<Attribute id="qiskit.circuit.library.IGate.decompositions">
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
</Attribute>
### definition
<Attribute id="qiskit.circuit.library.IGate.definition">
Return definition in terms of other basic gates.
</Attribute>
### duration
<Attribute id="qiskit.circuit.library.IGate.duration">
Get the duration.
</Attribute>
### label
<Attribute id="qiskit.circuit.library.IGate.label">
Return instruction label
</Attribute>
### name
<Attribute id="qiskit.circuit.library.IGate.name">
Return the name.
</Attribute>
### num\_clbits
<Attribute id="qiskit.circuit.library.IGate.num_clbits">
Return the number of clbits.
</Attribute>
### num\_qubits
<Attribute id="qiskit.circuit.library.IGate.num_qubits">
Return the number of qubits.
</Attribute>
### params
<Attribute id="qiskit.circuit.library.IGate.params">
return instruction params.
</Attribute>
### unit
<Attribute id="qiskit.circuit.library.IGate.unit">
Get the time unit of duration.
</Attribute>
</Class>