In short
Every quantum gate is a unitary matrix — a matrix U satisfying U^\dagger U = U U^\dagger = I. Equivalently, U preserves the inner product: \langle U\psi | U\varphi \rangle = \langle \psi | \varphi \rangle for any two states. This has two sweeping consequences. First, probabilities always sum to 1 — the normalisation \langle \psi | \psi \rangle = 1 that defines a valid quantum state is preserved by every gate. Second, every gate is reversible: since U^\dagger U = I, the operator U^\dagger is the exact inverse, and it is itself a valid gate. This is why quantum circuits, unlike classical AND and OR, never destroy information during evolution — every step can be undone, right up until you measure.
Imagine a classical digital circuit with an AND gate. Two bits go in; one bit comes out. If the output is 0, you know nothing about the inputs — they could have been (0, 0), (0, 1), or (1, 0). The gate has destroyed information: the two-bit input has been crushed into a one-bit output, and no amount of staring at the output will tell you what went in. Classical circuits throw information away all the time, and the waste shows up as heat — Rolf Landauer proved in 1961 that erasing a bit necessarily dumps a tiny amount of energy into the environment. Every laptop you have ever used is warm for this reason.
Quantum gates cannot do this. Every single-qubit gate, every two-qubit gate, every gate you will ever meet in this track, obeys the same mathematical constraint: the operator has to be unitary. And a unitary operator is, by definition, reversible — it has an inverse, the inverse is also a valid gate, and running the circuit backwards gives you back exactly the state you started with. The only time a quantum computer destroys information is at measurement, and that is a different kind of event (see the next chapter on projective measurement).
This chapter explains where the unitary constraint comes from, what it means geometrically, why it forces every quantum gate to be reversible, and why this reversibility is one of the structural facts that makes quantum computing different from classical computing.
Why "quantum gate" must mean "unitary operator"
The argument starts from the first postulate of quantum mechanics: a pure state is a unit vector in a complex vector space. For a qubit, that vector space is \mathbb{C}^2, and the "unit" condition is \langle \psi | \psi \rangle = 1 — the sum of the squared moduli of the amplitudes equals 1.
Why the unit-vector condition matters: the amplitudes \alpha, \beta in |\psi\rangle = \alpha|0\rangle + \beta|1\rangle are the numbers whose squared moduli give measurement probabilities. |\alpha|^2 + |\beta|^2 = 1 is the same equation as \text{P}(0) + \text{P}(1) = 1 — the statement that something must happen when you measure. Drop this condition and probabilities no longer sum to 1.
Now add the second postulate: quantum evolution is linear. A gate U takes a state |\psi\rangle to a new state U|\psi\rangle, and linearity means U(\alpha|\psi\rangle + \beta|\varphi\rangle) = \alpha U|\psi\rangle + \beta U|\varphi\rangle. A gate is therefore fully specified by what it does to basis vectors — the rest follows from linearity. That is exactly what a matrix encodes.
Stack the two postulates together. The gate U must:
- Be a linear map (a matrix).
- Take unit vectors to unit vectors — because the output must still be a valid quantum state.
The second condition is where "unitary" comes from. A linear map that preserves norms is, by a standard theorem of linear algebra, norm-preserving, which in complex vector spaces is the same thing as inner-product-preserving, which is the definition of a unitary operator.
Why norm-preserving implies inner-product-preserving (in one sentence): the inner product \langle \psi | \varphi \rangle can be reconstructed from norms of sums (polarisation identity — 4\langle \psi|\varphi\rangle = \|\psi+\varphi\|^2 - \|\psi-\varphi\|^2 + i\|\psi-i\varphi\|^2 - i\|\psi+i\varphi\|^2), so if every norm is preserved, every inner product is too.
So if you want "valid quantum state in, valid quantum state out," linearity plus norm-preservation forces U to be unitary. There is no wiggle room. Any linear map that is not unitary will, on some input state, produce an output whose squared norms do not sum to 1 — and that output is not a quantum state anymore.
The definition
Unitary operator
A matrix U is unitary if it satisfies
where U^\dagger (called "U-dagger") is the conjugate transpose — take the transpose of U, then complex-conjugate every entry. Equivalently, U preserves the inner product: for any two states |\psi\rangle, |\varphi\rangle,
In particular, U preserves norms: \|U\psi\| = \|\psi\|. Geometrically, U is a "generalised rotation" of the complex vector space — it shuffles states around the unit sphere in Hilbert space without stretching, shrinking, or reflecting any length.
A quick notation refresher: the symbol |\psi\rangle — "ket psi" — is a column vector in \mathbb{C}^n. The bra \langle \psi | is the conjugate transpose of that column: a row whose entries are the complex conjugates of the column's entries. The inner product \langle \psi | \varphi \rangle is the row times the column — a single complex number. And U^\dagger extends the same idea to matrices: every entry flips across the diagonal and gets conjugated.
Equivalent characterisations
The three statements below are all equivalent — any one of them can serve as the definition of "unitary":
- Algebraic. U^\dagger U = I.
- Geometric. U preserves the inner product: \langle U\psi|U\varphi\rangle = \langle \psi|\varphi\rangle for all |\psi\rangle, |\varphi\rangle.
- Columns. The columns of U form an orthonormal basis. (And equivalently, the rows do too.)
The third characterisation is the quickest way to check whether a concrete matrix is unitary. Write down the columns; check that each has length 1 and that any two different ones are orthogonal. If yes, the matrix is unitary. You will use this check constantly.
Unitary as a rotation
The word "rotation" is not a metaphor here — it is the honest geometric content of the definition.
In the real 3D world, a rotation is a map that keeps every length the same and preserves angles between vectors. A cube rotated about its centre is still a cube with the same edge lengths; the angles between its faces are unchanged. Rotations are exactly the linear maps that preserve the ordinary Euclidean inner product \vec{a} \cdot \vec{b}.
Now replace "real 3D" with "complex n-dimensional" and "Euclidean dot product" with "Hermitian inner product \langle \psi | \varphi \rangle." The linear maps that preserve this inner product are the unitaries. They are the generalised rotations of a complex vector space.
For a single qubit (n = 2), the state space is the 2-dimensional complex vector space — a space that, after you quotient out the global phase and the normalisation, becomes the familiar 2-sphere you know as the Bloch sphere. On the Bloch sphere, unitaries act as ordinary 3D rotations. Every single-qubit gate — X, Y, Z, H, S, T, R_x(\theta) — is a rotation of the sphere about some axis by some angle. You cannot build a gate on a qubit that is not some kind of rotation of this sphere. Rotations are all there is.
For multi-qubit systems, the same picture still applies; it is just that the "sphere" is now a higher-dimensional surface you cannot draw. The algebra is still U^\dagger U = I, and the action is still a length-preserving rotation of that higher-dimensional surface.
Why unitary implies reversible
This is the single most important consequence of unitarity for computing, and the argument is a two-liner.
From the definition, U^\dagger U = I. Read that equation as: "the matrix U^\dagger, applied to the output of U, gives back the identity." In other words, U^\dagger is the inverse of U:
Every unitary has an inverse — and the inverse is not some mysterious object that may or may not exist. It is the conjugate transpose, which you can always compute in a few lines of algebra. Moreover, U^\dagger itself is unitary (you can check: (U^\dagger)^\dagger U^\dagger = U U^\dagger = I), so the inverse is itself a valid quantum gate.
The reversibility consequence. Every quantum gate has an "undo" gate. If you apply U and then apply U^\dagger, you are back where you started. In circuit form:
Some specific examples you will meet later:
- Hadamard H. Self-inverse: H^\dagger = H, so HH = I. Applying H twice returns the state.
- Pauli X, Y, Z. All three are self-inverse (since they are their own Hermitian conjugates and square to the identity).
- Rotation R_x(\theta). Inverse is R_x(-\theta) — rotate the other way.
- Phase gate S = \text{diag}(1, i). Inverse is S^\dagger = \text{diag}(1, -i), sometimes written S^{-1} or "S-dagger." Not self-inverse; you need a distinct undo gate.
- T gate T = \text{diag}(1, e^{i\pi/4}). Inverse is T^\dagger = \text{diag}(1, e^{-i\pi/4}).
The point is not to memorise this table; the point is that every entry has an inverse, always, by construction.
Contrast with classical gates
A classical AND gate takes two bits and returns one. That is a map from \{0, 1\}^2 (four possible inputs) to \{0, 1\} (two possible outputs). It is not a bijection — it cannot be inverted. This is a structural, information-theoretic fact, not a technological limitation; no classical AND gate, however cleverly engineered, can be reversed.
Classical reversible computing (Fredkin, Toffoli) sidesteps this by building logic from gates that keep extra bits around as bookkeeping — but those extra bits take up real space, and classical machines rarely bother. Quantum mechanics forces this reversibility. There is no "quantum AND gate that throws away a bit." The closest thing is the Toffoli gate, which implements AND on two bits while keeping a third scratch bit to preserve invertibility. When you see a Toffoli in a quantum algorithm, that third wire is there because the universe insists on it.
Schrödinger — where unitaries come from physically
For a gate-level quantum computer, you write down unitaries directly and apply them to qubits. But where do these unitaries come from physically? The answer goes back to the Schrödinger equation — the fundamental law of time evolution in quantum mechanics.
For a closed quantum system with a Hamiltonian H (an operator representing energy, and a Hermitian matrix, H = H^\dagger — not to be confused with the Hadamard gate, also called H), time evolution over an interval t is
The operator U(t) is the unitary evolution operator: a quick check shows U(t)^\dagger U(t) = e^{+iHt/\hbar}\,e^{-iHt/\hbar} = I because H is Hermitian.
Why Hermitian H implies unitary U(t) = e^{-iHt/\hbar}: the exponential of an i-times-Hermitian matrix is always unitary, because (e^{iA})^\dagger = e^{-iA} when A is Hermitian, and e^{iA} e^{-iA} = e^0 = I.
Real quantum hardware implements gates by tuning the Hamiltonian of the system for a precisely controlled amount of time. A single laser pulse on a trapped ion, a microwave pulse on a superconducting qubit, a magnetic field applied to a nuclear spin — each of these turns on a specific H for a specific t, and the result is a specific unitary U(t) = e^{-iHt/\hbar} applied to the qubits. The gate you wrote down on paper as a 2 \times 2 matrix exists on the machine as "run Hamiltonian H for time t."
This is the deep connection between quantum gates and quantum physics. Unitaries are not a mathematical convenience imposed by theorists; they are the literal time evolution of closed physical systems. Part 15 of this track — Hamiltonian simulation — is about going the other way, using quantum gates to simulate arbitrary Hamiltonians. The two directions are the same coin.
Composition of unitaries is unitary
Quantum circuits compose many gates. If U and V are both unitary, is the product UV (first apply V, then U) also unitary? The answer is yes, and the check is one line of algebra:
Why (UV)^\dagger = V^\dagger U^\dagger: taking the dagger of a product reverses the order of the factors, just like taking the transpose of a matrix product. This is the same rule you know from linear algebra: (AB)^T = B^T A^T.
So any finite composition of unitaries is unitary. An entire quantum circuit — thousands of gates, any number of qubits — is still, at the end of the day, one big unitary acting on the full state space. The reversibility is inherited: the inverse of the whole circuit is the product of the inverses, in reverse order: (U_n \cdots U_2 U_1)^\dagger = U_1^\dagger U_2^\dagger \cdots U_n^\dagger. Run the gates backwards, each replaced by its dagger, and you undo the entire computation exactly.
Worked examples
Example 1: Verify the Hadamard gate is unitary
The Hadamard gate is
Verify H^\dagger H = I by direct computation.
Step 1. Compute H^\dagger. Take the transpose (swap rows and columns) and complex-conjugate every entry. Every entry of H is real, so the conjugate step does nothing. The transpose swaps the two off-diagonal entries, which in this case happens to give back the same matrix because the entries are symmetric: H_{12} = H_{21} = 1/\sqrt{2}.
Why H^\dagger = H: the Hadamard is Hermitian — equal to its own conjugate transpose. That is a special property of this particular gate, not a general feature of unitaries. Most unitaries are not Hermitian; their daggers are genuinely different matrices.
Step 2. Compute H^\dagger H.
Why the 1/2 out front: each factor of H carries a 1/\sqrt{2} normalisation, and (1/\sqrt{2})(1/\sqrt{2}) = 1/2.
Step 3. Multiply the two matrices entry by entry. Each entry of the product is the dot product of a row of the left factor with a column of the right factor.
Why only the diagonal survives: the off-diagonal entries mix a +1 with a -1 which cancel; the diagonal entries mix like signs which add to 2.
Step 4. Multiply by the 1/2 hanging out front.
Result. H is unitary. Moreover, H^\dagger = H, which means H is both unitary and Hermitian — it is its own inverse. This is why applying a Hadamard twice returns the original state.
Shortcut using the column test. An alternative way to verify: the columns of H are \tfrac{1}{\sqrt{2}}(1, 1)^T and \tfrac{1}{\sqrt{2}}(1, -1)^T. Their norms are \sqrt{(1/\sqrt{2})^2 + (1/\sqrt{2})^2} = 1 each. Their inner product is \tfrac{1}{2}(1\cdot 1 + 1 \cdot (-1)) = 0. Two unit vectors, orthogonal — the columns form an orthonormal basis, so H is unitary.
Example 2: A non-unitary operator shrinks the state
Consider a hypothetical operator
Is M unitary? Apply it to |1\rangle and see what happens.
Step 1. Compute M|1\rangle.
Why: the second column of M is (0, 1/2)^T, which is exactly what M does to |1\rangle = (0, 1)^T.
Step 2. Check the norm of the output.
Why: the squared norm of a vector is the sum of the squared moduli of its entries. Here only the second entry is nonzero, and its squared modulus is 1/4.
Step 3. Interpret. The input |1\rangle had squared norm 1. The output has squared norm 1/4. The "total probability" has shrunk from 1 to 1/4. The output is not a valid quantum state — the probabilities of measuring 0 and 1 no longer sum to 1.
Step 4. Confirm by the dagger check. Compute M^\dagger M:
Why: the (2,2) entry of the product is (1/2)(1/2) = 1/4, which is not 1. A unitary operator must give back the identity here; this one does not.
Result. M is not unitary, and it cannot be a valid closed-system quantum gate. Physically, an operator like this could represent a loss process — for example, a qubit coupled to a noisy environment that has a 3/4 chance of being "absorbed" when in state |1\rangle. Such operators appear in the formalism of quantum channels (the general open-system framework), where they are called Kraus operators and are not required to be unitary individually. They are important, but they live outside the world of pure gates.
Common confusions
-
"Unitary is just 'orthogonal' with a fancier name." Half-right. For real-valued matrices, the condition O^T O = I defines an orthogonal matrix — exactly a rigid rotation (possibly with reflection) of real space. Unitary is the complex-valued version: U^\dagger U = I, where the dagger is conjugate-transpose, not just transpose. Every orthogonal matrix is unitary (complex conjugation on real numbers does nothing), but most unitaries are not orthogonal — they can have complex entries. The Hadamard happens to be orthogonal (real entries); the S-gate \text{diag}(1, i) is not.
-
"Unitary means reversible, therefore quantum computers never lose information." True for closed systems evolving under gates. False in two important scenarios. First, measurement is not unitary — it is a projection, and it does destroy information (see the next chapter). Second, open systems, where a qubit is weakly coupled to an environment (thermal noise, stray photons, nearby materials), effectively lose information to the environment even when each individual microscopic evolution step is unitary. That information leak is what decoherence is. Fault-tolerant quantum computing is the engineering effort to keep the effective information loss below the threshold where quantum error correction can recover.
-
"Every physical process is unitary." No. Only closed-system, gate-level evolution is unitary. Measurement is not. Thermal relaxation is not (from the qubit's own point of view — if you enlarge the system to include the environment, the combined evolution is unitary, but you don't have access to the environment). Classical control electronics sending pulses into a quantum computer are not. Unitary applies to a very specific slice of physics; it is the right slice for understanding gates, but it is not the whole story.
-
"The Schrödinger equation is just for physicists." The Schrödinger equation is the continuous-time version of postulate 2 (unitary evolution), and it is how every quantum computer in the world actually implements its gates. A superconducting qubit controlled by a microwave pulse, a trapped-ion qubit rotated by a laser pulse, a nuclear-spin qubit driven by a magnetic field — each of these is an engineer dialling in a specific Hamiltonian for a specific duration, so that the resulting U(t) = e^{-iHt/\hbar} matches the target gate. The Schrödinger equation is the map from "what I want the qubits to do" to "what pulse sequence I have to fire."
-
"If a gate has determinant 1 it is unitary." No — that is the condition for special unitary (the SU group). Determinant-1 with the dagger condition gives SU; just dagger without the determinant condition gives U. For most of quantum computing the distinction is a global phase — SU vs U differs only by an overall e^{i\alpha} factor, which is physically irrelevant. But the two conditions are not the same.
Going deeper
If you only need the operational content — every gate is unitary, unitaries are norm-preserving and reversible, and compositions of unitaries are unitary — you are done. The rest of this section goes deeper: the group-theoretic structure of unitaries, the Solovay-Kitaev theorem that makes approximate compilation possible, the non-unitary operations that escape this framework, and why reversibility is essential for quantum interference.
The group structure of unitaries
The set of all n \times n unitary matrices, with matrix multiplication as the group operation, forms a group called the unitary group U(n). Three easy checks: the identity I is unitary (so the group has an identity element); every unitary has an inverse, namely its dagger, which is also unitary (closure under inverses); and the product of two unitaries is unitary (closure under the operation). These three properties make U(n) a group.
More than that: U(n) is a Lie group, meaning it has a smooth manifold structure. You can move continuously through unitaries the same way you move continuously through rotations in 3D space. Nearby unitaries are obtained from a given one by infinitesimally small perturbations, and those perturbations are generated by Hermitian matrices — the same Hermitians that appear as Hamiltonians. This is not a coincidence: the "infinitesimal generator" of U(t) = e^{-iHt/\hbar} is -iH/\hbar, and the Hermiticity of H is precisely what makes the exponential unitary.
For a single qubit, U(2) is 4-dimensional (4 real parameters) as a manifold. Modding out a global phase gives SU(2), which is 3-dimensional — the three parameters you recognise as "axis of rotation" (2 parameters for direction) plus "angle of rotation." SU(2) is a double cover of the 3D rotation group SO(3), which is why a 2\pi rotation on the Bloch sphere picks up a minus sign in the underlying Hilbert space (the famous spin-1/2 signature).
The Solovay-Kitaev theorem — approximating any unitary
A quantum computer has a finite gate set — say \{H, T, \text{CNOT}\}, the universal gate set most commonly used in practice. But there are infinitely many unitaries. How can finitely many gates, applied in finite combinations, reach every possible unitary?
The answer is that they do not reach every unitary exactly — but they can approximate every unitary to arbitrary precision. The Solovay-Kitaev theorem makes this precise: for any fixed universal gate set, any target single-qubit unitary U, and any precision \varepsilon > 0, there is a sequence of at most O(\log^c(1/\varepsilon)) gates from the set that approximates U within \varepsilon. The exponent c is a small number (best known is about 3.97).
This is one of the foundational theorems of quantum computing. It says that the "discrete gate set" model is not a limitation — you can always compile any clean mathematical unitary into a bounded-length gate sequence. Real-world quantum compilers (Qiskit transpile, Cirq's compile stack) are doing exactly this work behind the scenes.
Non-unitary operations — channels and Kraus operators
Unitaries describe closed-system gate evolution. Real quantum hardware has noise, and the noise is not unitary. How do you model noise?
The answer is the quantum channel formalism. A quantum channel is a linear map \mathcal{E} on density matrices that is completely positive and trace-preserving (CPTP). Every channel has a representation
where the K_k are called Kraus operators. A unitary gate is the special case of a channel with one Kraus operator, K_1 = U, satisfying U^\dagger U = I. But channels can have many Kraus operators — representing partial rotations, mixture of several possible actions, dephasing, relaxation, and so on.
Measurement is a channel too, but with classical output: the "outcome m" part of the channel has Kraus operator K_m = |m\rangle\langle m| (a projector), and the channel's job is to pick one at random according to the Born rule.
This is the framework that takes over when unitarity is not enough. You will meet it properly in Part 13 (density matrices and channels). For now, just know: unitarity is the clean, closed-system version; channels are the general version; and every channel can be realised as a unitary on a larger system (Stinespring dilation) at the cost of tracking ancilla qubits that represent the environment.
Why reversibility matters for quantum computing
The philosophical answer is "because physics is reversible." The practical answer is interference.
Every quantum algorithm that beats its classical counterpart does so by arranging amplitudes to interfere — constructively on the right answer, destructively on the wrong ones. Interference requires that amplitudes survive unspoiled from gate to gate. If any gate silently discarded amplitude (as a non-unitary operation would), the interference pattern would be blurred or destroyed, and the algorithm's advantage would evaporate.
This is a direct line to Feynman's 1982 argument for quantum computing. Feynman pointed out that classical computers cannot efficiently simulate quantum systems, because the state vector of n qubits is exponentially large. The reason a quantum computer can simulate a quantum system efficiently is that its natural dynamics — unitary evolution — is the same kind of dynamics the target system obeys. Throw away reversibility, and the quantum computer is no longer speaking the same mathematical language as the system it is trying to simulate.
From a hardware perspective, reversibility is also what makes quantum error correction possible. Errors show up as unwanted unitary (or near-unitary) perturbations of the computational state. If those perturbations were irreversible — if they destroyed information before the error-correction circuit could intervene — error correction could not recover the state. Reversibility gives the code time to act.
Where this leads next
- Projective measurement — the one operation in quantum mechanics that is not unitary. Where information really does get destroyed.
- The Hadamard gate — the workhorse unitary, a specific example of everything in this chapter.
- Pauli X, Y, Z — three more self-inverse unitaries, the building blocks of every Bloch-sphere rotation.
- Rotation gates R_x, R_y, R_z — the continuous families of unitaries that realise arbitrary Bloch rotations.
- The Schrödinger equation, computational perspective — the physics side of unitary evolution, and how real hardware implements gates by running Hamiltonians for set times.
- Part 13 on density matrices and channels — where non-unitary operations get their formal treatment.
References
- Nielsen and Chuang, Quantum Computation and Quantum Information (2010), §2.1.6 and §2.2.2 — the definitive treatment of unitary evolution and postulate 2. Cambridge University Press.
- John Preskill, Lecture Notes on Quantum Computation, Ch. 2 (unitary dynamics and the Schrödinger equation) — theory.caltech.edu/~preskill/ph229.
- Wikipedia, Unitary operator — the linear-algebra definition, equivalent characterisations, and group-theoretic structure.
- Wikipedia, Schrödinger equation — the physical origin of U(t) = e^{-iHt/\hbar}.
- Qiskit Textbook, Representing Qubit States and Gates — hands-on examples of unitary gates with live simulators.
- Christopher M. Dawson and Michael A. Nielsen, The Solovay-Kitaev algorithm (2005) — constructive approximation of any unitary by a discrete gate set. arXiv:quant-ph/0505030.