S-dagger gate

The inverse of S: |1⟩ is multiplied by −i.

Phase · 1 qubit · reviewed November 2026

Matrix

[ 1   0 ]
[ 0  −i ]

What it does

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

In plain words

S† undoes S. It is used to rotate the Y basis onto the Z basis before measuring.

Identities

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

Where it is used

  • Undoing an S
  • Measuring in the Y basis (S† then H then measure)

Code

# Qiskit
qc.sdg(0)

// OpenQASM 2.0
sdg q[0];

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

Related gates

Questions

Why have a dagger gate at all?

Every unitary gate has an inverse, and circuits often need to run an operation backwards, as in uncomputation.

Try the S† gate in the Circuit Builder →