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

IGate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

IGate.definition

Return definition in terms of other basic gates.

IGate.label

Return gate label

IGate.params

return instruction params.

Methods

IGate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

IGate.assemble()

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.

IGate.inverse()

Invert this gate.

IGate.is_parameterized()

Return True .IFF.

IGate.mirror()

For a composite instruction, reverse the order of sub-gates.

IGate.power(exponent)

Creates a unitary gate as gate^exponent.

IGate.qasm()

Return a default OpenQASM string for the instruction.

IGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

IGate.to_matrix()

Return a numpy.array for the identity gate.