# SXGate¶

class SXGate(label=None)[source]

The single-qubit Sqrt(X) gate ($$\sqrt{X}$$).

Matrix Representation:

$\begin{split}\sqrt{X} = \frac{1}{2} \begin{pmatrix} 1 + i & 1 - i \\ 1 - i & 1 + i \end{pmatrix}\end{split}$

Circuit symbol:

     ┌────┐
q_0: ┤ √X ├
└────┘


Note

A global phase difference exists between the definitions of $$RX(\pi/2)$$ and $$\sqrt{X}$$.

$\begin{split}RX(\pi/2) = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & -i \\ -i & 1 \end{pmatrix} = e^{-i pi/4} \sqrt{X}\end{split}$

Create new SX gate.

Attributes

 SXGate.decompositions Get the decompositions of the instruction from the SessionEquivalenceLibrary. SXGate.definition Return definition in terms of other basic gates. SXGate.label Return gate label SXGate.params return instruction params.

Methods

 SXGate.add_decomposition(decomposition) Add a decomposition of the instruction to the SessionEquivalenceLibrary. Assemble a QasmQobjInstruction SXGate.broadcast_arguments(qargs, cargs) Validation and handling of the arguments and its relationship. SXGate.c_if(classical, val) Add classical condition on register classical and value val. SXGate.control([num_ctrl_qubits, label, …]) Return a (multi-)controlled-SX gate. SXGate.copy([name]) Copy of the instruction. Return inverse SX gate (i.e. Return True .IFF. DEPRECATED: use instruction.reverse_ops(). SXGate.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. For a composite instruction, reverse the order of sub-instructions. Return a numpy.array for the SX gate.