√X† gate

The √X† gate, the inverse of √X: matrix, effect on the basis states, the sxdg() call in Python and JS, and its IonQ native-gate form.

The √X† gate, SXdg, undoes the √X gate. Two of them in a row also make one X, turning the other way. It acts on one qubit and takes no parameters. The Circuit panel draws it as √X†. Measured straight after it, a qubit that started as 0 reads 0 or 1 with equal probability.

Kets such as 0\vert 0 \rangle name the basis states and rotations are described on the Bloch sphere; the qubits lesson introduces both.

Call

WhereCall
Pythonqc.sxdg(qubit)
JScircuit.sxdg(qubit)
Qiskit classSXdgGate

Matrix

X=12(1i1+i1+i1i)\sqrt{X}^\dagger = \frac{1}{2} \begin{pmatrix} 1 - i & 1 + i \\ 1 + i & 1 - i \end{pmatrix}

On the Bloch sphere this is a quarter-turn about the X axis in the opposite direction to √X. It is the same operation as rx(-π/2) up to a global phase.

Effect on basis states

InputOutput
0\vert 0 \rangle12((1i)0+(1+i)1)\tfrac{1}{2}\big((1 - i)\vert 0 \rangle + (1 + i)\vert 1 \rangle\big)
1\vert 1 \rangle12((1+i)0+(1i)1)\tfrac{1}{2}\big((1 + i)\vert 0 \rangle + (1 - i)\vert 1 \rangle\big)

Measured straight after √X†, a qubit that started in 0\vert 0 \rangle or 1\vert 1 \rangle reads 0 or 1 with equal probability.

Inverse

The inverse of √X† is √X. A √X followed by a √X† on the same qubit is the identity.

Usage

from qiskit import QuantumCircuit

qc = QuantumCircuit(1, 1)
qc.sx(0)
qc.sxdg(0)
qc.measure(0, 0)
import { QuantumCircuit } from 'qiskit';

const circuit = QuantumCircuit(1, 1);
circuit.sx(0);
circuit.sxdg(0);
circuit.measure(0, 0);

Every shot reads 0: the pair cancels.

On IonQ hardware

√X† is GPi2(0.5) up to a global phase, a native gate with its phase half a turn from √X, so it costs one physical pulse. See How your circuit is compiled.

Stay in the loop.

Get the latest tutorials, demos, and project showcases straight to your inbox. No noise, just the good stuff.