# U2Gate¶

class U2Gate(phi, lam, label=None)[source]

Single-qubit rotation about the X+Z axis.

Implemented using one X90 pulse on IBM Quantum systems:

$U2(\phi, \lambda) = RZ(\phi+\pi/2).RX(\frac{\pi}{2}).RZ(\lambda-\pi/2)$

Circuit symbol:

     ┌─────────┐
q_0: ┤ U2(φ,λ) ├
└─────────┘


Matrix Representation:

$\begin{split}U2(\phi, \lambda) = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & -e^{i\lambda} \\ e^{i\phi} & e^{i(\phi+\lambda)} \end{pmatrix}\end{split}$

Examples:

$U2(0, \pi) = H$

U3Gate: U3 is a generalization of U2 that covers all single-qubit rotations, using two X90 pulses.
 U2Gate.decompositions Get the decompositions of the instruction from the SessionEquivalenceLibrary. U2Gate.definition Return definition in terms of other basic gates. U2Gate.label Return gate label U2Gate.params return instruction params.
 U2Gate.add_decomposition(decomposition) Add a decomposition of the instruction to the SessionEquivalenceLibrary. Assemble a QasmQobjInstruction U2Gate.broadcast_arguments(qargs, cargs) Validation and handling of the arguments and its relationship. U2Gate.c_if(classical, val) Add classical condition on register classical and value val. U2Gate.control([num_ctrl_qubits, label, …]) Return controlled version of gate. U2Gate.copy([name]) Copy of the instruction. Return inverted U2 gate. Return True .IFF. For a composite instruction, reverse the order of sub-gates. U2Gate.power(exponent) Creates a unitary gate as gate^exponent. Return a default OpenQASM string for the instruction. Creates an instruction with gate repeated n amount of times. Return a Numpy.array for the U2 gate.