Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK. Go to the latest version

SXGate

class SXGate(label=None)

GitHub

Bases: qiskit.circuit.gate.Gate

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

Matrix Representation:

X=12(1+i1i1i1+i)\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(π/2)RX(\pi/2) and X\sqrt{X}.

RX(π/2)=12(1ii1)=eipi/4X\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.


Methods Defined Here

control

SXGate.control(num_ctrl_qubits=1, label=None, ctrl_state=None)

Return a (multi-)controlled-SX gate.

One control returns a CSX gate.

Parameters

  • num_ctrl_qubits (int) – number of control qubits.
  • label (str or None) – An optional label for the gate [Default: None]
  • ctrl_state (int or str or None) – control state expressed as integer, string (e.g. ‘110’), or None. If None, use all 1s.

Returns

controlled version of this gate.

Return type

ControlledGate

inverse

SXGate.inverse()

Return inverse SX gate (i.e. SXdg).


Attributes

condition_bits

Get Clbits in condition.

Return type

List[Clbit]

decompositions

Get the decompositions of the instruction from the SessionEquivalenceLibrary.

definition

Return definition in terms of other basic gates.

duration

Get the duration.

label

Return instruction label

Return type

str

params

return instruction params.

unit

Get the time unit of duration.

Was this page helpful?
Report a bug or request content on GitHub.