SX and SXdg Gates
Contents
5.10. SX and SXdg Gates#
SX gate is a native gate of IBMQ hardware. Do not get confused with \(S\) times \(X\).
API References: SXGate
API References: SXdgGate
5.10.1. Definition#
Transformation
\[\begin{split} \begin{align} &SX |0\rangle = e^{i\pi/4}|R\rangle, &&SX |1\rangle = e^{i\pi/4}|L\rangle\\ &SX^\dagger |0\rangle = e^{-i\pi/4}|L\rangle, &&SX^\dagger |1\rangle = e^{-i\pi/4}|R\rangle \end{align} \end{split}\]
Matrix expression
(5.16)#\[\begin{split} SX \doteq \frac{1}{2} \begin{bmatrix} 1+i & 1-i \\ 1-i & 1+i \end{bmatrix}, \quad SX^\dagger \doteq \frac{1}{2} \begin{bmatrix} 1-i & 1+i \\ 1+i & 1-i \end{bmatrix} \end{split}\]
U gate expression
\[ SX = e^{i \pi/4}\, U\left(\frac{\pi}{2}, -\frac{\pi}{2}, \frac{\pi}{2} \right) \]
R gate expression
\[ SX = e^{i \pi/4} R_x(\pi/2), \quad SX^\dagger = e^{-i \pi/4} R_x(-\pi/2) \]
Notice that \(SX^2 = (SX^\dagger)^2 = X\). Hence, \(SX\) and \(SX^\dagger\) are square roots of \(X\) and they are often expressed as \(SX=X^{1/2}\) and \(SX^\dagger = X^{-1/2}\).
The Qiskit circuit code symbols are sx
and sxdg
, respectively. They appear in quantum circuits as
from qiskit import QuantumCircuit
qc=QuantumCircuit(1)
qc.sx(0)
qc.sxdg(0)
qc.draw('mpl')

or
qc.draw()
┌────┐┌──────┐ q: ┤ √X ├┤ √Xdg ├ └────┘└──────┘
5.10.2. Transformation of other basis kets#
\(x\)-basis
\[\begin{split} \begin{align} &SX |+\rangle = |+\rangle, &&SX |-\rangle = i |-\rangle \\ &SX^\dagger |+\rangle = |+\rangle, &&SX^\dagger |-\rangle = -i |-\rangle \end{align} \end{split}\]
\(y\)-basis
\[\begin{split} \begin{align} &SX |L\rangle = e^{i\pi/4}|0\rangle, &&SX |R\rangle = e^{i\pi/4}|1\rangle\\ &SX^\dagger |L\rangle = e^{-i\pi/4}|1\rangle, &&SX^\dagger |R\rangle = e^{-i\pi/4}|0\rangle \end{align} \end{split}\]
5.10.3. Acting on a superposition state#
When SXGate and SXdgGate are applied to a super position state the coefficient to \(|0\rangle\) remains the same but that of \(|1\rangle\) gets additional phase factor. That is
(5.17)#\[ SX \left (c_0 |0\rangle + c_1 |1\rangle\right) = \frac{1}{\sqrt{2}}\left(e^{i \pi/4} c_0 + e^{-i \pi/4} c_1\right) |0\rangle + \frac{1}{\sqrt{2}}\left(e^{-i \pi/4} c_0 + e^{i \pi/4} c_1\right) |1\rangle \]
(5.18)#\[ SX^\dagger \left (c_0 |0\rangle + c_1 |1\rangle\right) = \frac{1}{\sqrt{2}}\left(e^{-i \pi/4} c_0 + e^{i \pi/4} c_1\right) |0\rangle + \frac{1}{\sqrt{2}}\left(e^{i \pi/4} c_0 + e^{-i \pi/4} c_1\right) |1\rangle \]
In \(\{|+\rangle,|-\rangle\}\) basis,
(5.19)#\[ SX \left(c_0 |+\rangle + c_1|-\rangle\right) = c_0 |+\rangle + i c_1 |-\rangle \]
(5.20)#\[ SX^\dagger \left(c_0 |+\rangle + c_1|-\rangle\right) = c_0 |+\rangle - i c_1 |-\rangle \]
Comparing these relations with Eqs. (5.23) and (5.24), we find that SXGate and SGate work in the same way but in different basis sets.
5.10.4. Additional useful Properties#
\(SX \cdot SX = SX^\dagger \cdot SX^\dagger = X\) implies that
\(SX = X \cdot SX^\dagger = SX^\dagger\cdot X, \quad SX^\dagger = X \cdot SX = SX \cdot X\).
\(X = SX \cdot X \cdot SX^\dagger = SX^\dagger \cdot X \cdot SX\)
\(SX = X \cdot SX \cdot X, \quad SX^\dagger = X \cdot SX^\dagger \cdot X\).
Last modified: 08/31/2022