IGate¶
- class IGate(label=None)[source]¶
Identity gate.
Identity gate corresponds to a single-qubit gate wait cycle, and should not be optimized or unrolled (it is an opaque gate).
Matrix Representation:
\[\begin{split}I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\end{split}\]Circuit symbol:
┌───┐ q_0: ┤ I ├ └───┘
Create new Identity gate.
Attributes
Get the decompositions of the instruction from the SessionEquivalenceLibrary.
Return definition in terms of other basic gates.
Return gate label
return instruction params.
Methods
IGate.add_decomposition
(decomposition)Add a decomposition of the instruction to the SessionEquivalenceLibrary.
Assemble a QasmQobjInstruction
IGate.broadcast_arguments
(qargs, cargs)Validation and handling of the arguments and its relationship.
IGate.c_if
(classical, val)Add classical condition on register classical and value val.
IGate.control
([num_ctrl_qubits, label, …])Return controlled version of gate.
IGate.copy
([name])Copy of the instruction.
Invert this gate.
Return True .IFF.
For a composite instruction, reverse the order of sub-gates.
IGate.power
(exponent)Creates a unitary gate as gate^exponent.
Return a default OpenQASM string for the instruction.
IGate.repeat
(n)Creates an instruction with gate repeated n amount of times.
Return a numpy.array for the identity gate.