TopicIntermediateEstablished concept

Unitary Operations

Unitary Operations

Closed quantum evolution is represented by a unitary matrix $U$ satisfying $U^\dagger U=I$; it preserves normalisation and inner products and is always reversible.

The evolution postulate states that the evolution of a closed quantum system between two instants is described by a unitary operator $U$: $|\psi'\rangle=U|\psi\rangle$, where $U^\dagger U=UU^\dagger=I$. This follows from the Schrödinger equation: if the Hamiltonian $H$ is constant, then $U=e^{-iHt/\hbar}$, and every unitary matrix can be written in this form for some Hamiltonian.

Consequences of unitarity: first, the inner product is preserved, $\langle U\phi|U\psi\rangle=\langle\phi|\psi\rangle$, so normalised states stay normalised and orthogonal states stay orthogonal. Second, reversibility: the inverse is $U^\dagger$, so quantum computation before measurement is fully reversible. That is why classical functions are built inside circuits in reversible form, such as $U_f|x\rangle|y\rangle=|x\rangle|y\oplus f(x)\rangle$, and why the Toffoli and Fredkin gates play a central role in reversible computation. Third, the eigenvalues of $U$ have the form $e^{i\theta}$ on the unit circle, which is the basis of the phase estimation algorithm.

Quantum gates are small unitary matrices: the Pauli gates $X,Y,Z$, the Hadamard $H$, the phase gates $S,T,P(\lambda)$, the rotations $R_X(\theta)=e^{-i\theta X/2}$ and their counterparts, and two-qubit gates such as CNOT. Composing gates is a matrix product in the reverse of the circuit order: a circuit that applies $A$ then $B$ is represented by the matrix $BA$. Because matrix multiplication is generally not commutative, the order of the gates matters.

A gate applied to one qubitQubit: The qubit is the unit of quantum information: a two-level system whose state is a unit vector α0⟩+β1⟩ in ℂ^2. within a larger system is represented by $I\otimes\dots\otimes U\otimes\dots\otimes I$. A small set of gates, such as $\{H,T,\mathrm{CNOT}\}$, is enough to approximate any unitary matrix to arbitrary precision (universality). Non-unitary operations such as measurement and noise require more general frameworks: projectors and Kraus channels.

An example of reversibility: applying $R_X(\theta)$ then $R_X(-\theta)$ restores the state exactly, as does applying CNOT twice. Measurement, however, cannot be reversed, which is why many algorithms postpone measurements to the end of the circuit (the deferred measurement principle) and replace classical conditions with controlled gates where possible.

A useful example: every $2\times2$ unitary matrix can be written, up to a global phase, as three rotations, such as $R_Z(\alpha)R_Y(\beta)R_Z(\gamma)$, which is the basis of the general gate $U(\theta,\phi,\lambda)$ in Qiskit.

U|ψ⟩U|ψ⟩
Single-qubit quantum gate: an input state is transformed into an output state

Mathematical formulation

$$U^{\dagger}U=UU^{\dagger}=I,\qquad \langle U\phi|U\psi\rangle=\langle\phi|\psi\rangle$$

Worked example

Check that $H=\tfrac{1}{\sqrt2}\begin{pmatrix}1&1\\1&-1\end{pmatrix}$ is unitary: $H$ is real and symmetric, so $H^\dagger=H$, and $H^2=\tfrac12\begin{pmatrix}2&0\\0&2\end{pmatrix}=I$.

Then compute $HXH$: $XH=\tfrac{1}{\sqrt2}\begin{pmatrix}1&-1\\1&1\end{pmatrix}$, then $H(XH)=\tfrac12\begin{pmatrix}2&0\\0&-2\end{pmatrix}=Z$. So $HXH=Z$: the Hadamard swaps the $X$ and $Z$ axes.

And check the order: the circuit "$X$ then $H$" on $|0\rangle$ gives $HX|0\rangle=H|1\rangle=|-\rangle$, while "$H$ then $X$" gives $XH|0\rangle=|+\rangle$.

Try it yourself: Quantum Gates Playground

Loading the simulator…

The full experiment page

Test your understanding

The quiz needs JavaScript.

Related topics

References

  1. Michael A. Nielsen; Isaac L. Chuang (2010). Quantum Computation and Quantum Information (10th Anniversary Edition). Cambridge University Press doi:10.1017/CBO9780511976667The standard reference for quantum computing; the Crossref record gives 2012 for the Cambridge Core online edition.
  2. John Watrous / IBM Quantum (2025). Basics of Quantum Information (course). IBM Quantum Learning quantum.cloud.ibm.com
  3. A. Barenco; C. H. Bennett; R. Cleve; D. P. DiVincenzo; N. Margolus; P. Shor; T. Sleator; J. A. Smolin; H. Weinfurter (1995). Elementary gates for quantum computation. Phys. Rev. A 52(5):3457–3467 doi:10.1103/PhysRevA.52.3457