$S$
The $S$ gate applies a relative phase of $i$ to the $|1\rangle$ component.
$$S = \begin{bmatrix}1 & 0 \\ 0 & i\end{bmatrix} = \sqrt{Z}$$
Properties
- Clifford and diagonal.
- $S^2 = Z$ and $S^4 = I$.
- Conjugates $X$ into $Y$: $S X S^\dagger = Y$.
Usage
- Phase corrections and basis changes in Clifford circuits.
- Building block for $T$ and controlled-phase operations.
The unitary, drawn
Every entry of the matrix as a disc. The area is the transition probability $|U_{jk}|^2$; the colour and the hand are the phase. Rows are outputs $\langle j|$, columns inputs $|k\rangle$, in the computational basis.
Phase
Disc area $= |U_{jk}|^2$. Hover an entry for its value, or take the JSON.
SDK support
How to call this gate in each framework. Hover a ⓘ for a note; the support matrix compares every gate at once.
| SDK | Name |
|---|---|
| Qiskit | qiskit.circuit.library.SGate |
| PennyLane | pennylane.S |
| Cirq | cirq.S |
| Q# | Std.Intrinsic.S |
| PyQuil | pyquil.gates.S |
| Braket | braket.circuits.gates.S |
| BQSKit | bqskit.ir.gates.SGate |
| Qibo | qibo.gates.S |
| pytket | pytket.circuit.OpType.S |
| Stim | S ⓘ |
| OpenQASM | stdgates.inc: s |