S gate (√Z)

A quarter-turn of phase: |1⟩ is multiplied by i.

Phase · 1 qubit · reviewed November 2026

Matrix

[ 1  0 ]
[ 0  i ]

What it does

|0⟩→|0⟩
|1⟩→i|1⟩
|+⟩→(|0⟩ + i|1⟩)/√2

In plain words

S is the square root of Z, so two S gates make a Z. It is a Clifford gate, which means it is cheap in most error-correction schemes.

Identities

  • S·S = Z
  • S·S† = I
  • S = T·T

Where it is used

  • Changing measurement basis to Y
  • Building Clifford circuits
  • Creating complex amplitudes

Code

# Qiskit
qc.s(0)

// OpenQASM 2.0
s q[0];

Qiskit prints qubit 0 on the right of a bitstring. The builder prints it on the left.

Related gates

Questions

What is a Clifford gate?

A gate that maps Pauli operators to Pauli operators. Circuits of only Clifford gates can be simulated efficiently on a classical computer, so a non-Clifford gate such as T is needed for universal quantum computing.

Try the S gate in the Circuit Builder →