Intuition
A matrix tells you where a linear transformation sends each basis vector. Its first column is the image of the first basis vector. Linearity extends that information to every superposition.
A unitary transformation preserves all inner products. In particular, a normalized input stays normalized. Its inverse is its adjoint, formed by conjugating and transposing the matrix.
Learning objectives
- Apply a matrix to basis states
- Distinguish unitary and Hermitian operators
- Explain why gates preserve normalization
Interactive exploration
Use the controls to change the state and see its calculated readout. You can return to this experiment as you work through the derivation.
Circuit composer
q0 = leftmost bit- H q0
- S q0
State at step 2
2 amplitudesEach shot independently prepares this step’s state. A dense simulator stores 2ⁿ complex amplitudes for n wires. The composer is capped at six wires.
Mathematical foundation
The adjoint of U satisfies this identity precisely when the columns form an orthonormal basis. For square matrices this gives the inverse.
A Hermitian operator equals its adjoint and has real eigenvalues. Some operators, such as X, are both Hermitian and unitary. A phase gate with diagonal (1, i) is unitary and has adjoint diagonal (1, −i).
Worked example
The vector |+⟩ has equal coordinates. X swaps them and leaves the ket unchanged. The coordinates of |−⟩ are opposite, so swapping them multiplies the vector by −1.
Guided experiment
Build an S gate and its inverse using P with angle −90°. Insert an initial H so the phase effect is visible, then step between the gates.
Go to the controlsCompare with the expected result
The inverse undoes the relative phase. The probabilities are normalized at every intermediate stage.
Understanding check
Next steps
Want to keep your results? Start your learning journey
Open Circuit Composer