YGate

class YGate(label=None)[source]

The single-qubit Pauli-Y gate (\(\sigma_y\)).

Matrix Representation:

\[\begin{split}Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}\end{split}\]

Circuit symbol:

     ┌───┐
q_0: ┤ Y ├
     └───┘

Equivalent to a \(\pi\) radian rotation about the Y axis.

Note

A global phase difference exists between the definitions of \(RY(\pi)\) and \(Y\).

\[\begin{split}RY(\pi) = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} = -i Y\end{split}\]

The gate is equivalent to a bit and phase flip.

\[\begin{split}|0\rangle \rightarrow i|1\rangle \\ |1\rangle \rightarrow -i|0\rangle\end{split}\]

Create new Y gate.

Attributes

YGate.decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

YGate.definition

Return definition in terms of other basic gates.

YGate.label

Return gate label

YGate.params

return instruction params.

Methods

YGate.add_decomposition(decomposition)

Add a decomposition of the instruction to the SessionEquivalenceLibrary.

YGate.assemble()

Assemble a QasmQobjInstruction

YGate.broadcast_arguments(qargs, cargs)

Validation and handling of the arguments and its relationship.

YGate.c_if(classical, val)

Add classical condition on register classical and value val.

YGate.control([num_ctrl_qubits, label, …])

Return a (mutli-)controlled-Y gate.

YGate.copy([name])

Copy of the instruction.

YGate.inverse()

Return inverted Y gate (\(Y{\dagger} = Y\))

YGate.is_parameterized()

Return True .IFF.

YGate.mirror()

DEPRECATED: use instruction.reverse_ops().

YGate.power(exponent)

Creates a unitary gate as gate^exponent.

YGate.qasm()

Return a default OpenQASM string for the instruction.

YGate.repeat(n)

Creates an instruction with gate repeated n amount of times.

YGate.reverse_ops()

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

YGate.to_matrix()

Return a numpy.array for the Y gate.