WHAT MAKES A MATRIX "UNITARY" (REVERSIBLE)
The exact test for whether a matrix is a physically valid quantum gate, with full worked examples.
Here's a critical fact about quantum mechanics that we haven't stated explicitly yet, but which has been implicit in every lesson so far: every operation a quantum computer performs on a qubit (short of measurement) must be perfectly reversible. Not "reversible in principle, given enough cleverness" — reversible in the strict mathematical sense that there is always an exact, well-defined operation that undoes it completely, with no information lost.
This is a real physical constraint, not a design choice: the equations governing quantum mechanics only allow transformations that preserve the total probability of a state — you can never end up with total probability more or less than 100% across all outcomes. Matrices with this reversible, probability-preserving property are called unitary, and every single quantum gate you will ever encounter in this entire curriculum — from Module 4 onward — is a unitary matrix. This lesson exists specifically so that word never feels undefined again.
Building the Definition, Piece by Piece
Step 1: What "Reversible" Means for a Matrix
A matrix is reversible if there exists another matrix, called its inverse (written ), such that applying and then gets you back to exactly where you started — equivalent to the identity matrix:
We already saw an example of this in Lesson 3: the "swap" matrix multiplied by itself gave the identity matrix. That means is its own inverse: .
Step 2: The Conjugate Transpose (the "Dagger" Operation)
For unitary matrices specifically, there's a convenient shortcut: instead of doing general (and often tedious) matrix inversion, you just need to compute the conjugate transpose, written (read "M dagger"). It's built from two simple steps:
- Transpose: flip the matrix over its diagonal — rows become columns.
- Conjugate: apply the complex conjugate (from Lesson 2: flip the sign of every imaginary part) to every entry.
Worked Example 1: Conjugate Transpose of a Real-Valued Matrix
Step 1 (transpose):
(This matrix happens to look identical after transposing, since it's symmetric.)
Step 2 (conjugate each entry — but since every entry is real, its conjugate is itself):
Worked Example 2: Conjugate Transpose of a Matrix with Complex Entries
Step 1 (transpose):
Step 2 (conjugate each entry):
Step 3: The Unitary Condition
A matrix U is unitary if its conjugate transpose is exactly equal to its inverse:
Fully Worked Examples: Testing Matrices for Unitarity
Worked Example 3: Testing the Identity Matrix
Unitary.
Worked Example 4: Testing the Swap Matrix from Lesson 3
Unitary. This confirms mathematically what we suspected in Lesson 3: this matrix represents a valid, reversible quantum operation (the Pauli-X gate, formally introduced in Module 4).
Worked Example 5: Testing a Matrix That Is NOT Unitary
Not unitary — the result is , not the identity matrix.
Why does this matter physically? This scaling matrix doubles the length of any vector it's applied to. A valid qubit state must always have length exactly 1 (normalized, from Lesson 1). If you applied this matrix to a valid qubit state, the output would have length 2 — no longer a physically valid state. This is exactly why unitary matrices are required: they are precisely the matrices guaranteed to preserve a vector's length, which is precisely what's needed to keep total measurement probability equal to 100% before and after every operation.
Worked Example 6: Testing a Matrix with Complex Entries
Transposing swaps the off-diagonal positions (top-right moves to bottom-left, bottom-left moves to top-right), giving . Then conjugating flips each sign, giving back:
Computing each entry: top-left is . Top-right is . Bottom-left is . Bottom-right is .
Unitary. (This is, in fact, the Pauli-Y matrix you'll meet formally in Module 4, Lesson 3.)
The dagger symbol (†) for conjugate transpose was popularized by physicist Paul Dirac (the same person behind the "Dirac notation" you'll fully learn in Lesson 8) in his foundational 1930 textbook on quantum mechanics. It's simply the standard symbol physicists chose; there's no deeper meaning behind the choice of a dagger shape specifically.
The Intuitive Picture: Unitary = Rotation
Here's the geometric takeaway to carry forward: a unitary matrix always represents some kind of rotation (possibly combined with a reflection) of the Bloch sphere, and never a stretch or a shrink. This matches perfectly with Module 1's description of gates as "moving the arrow around the surface of the sphere" — the arrow's length (always 1, per normalization) never changes; only its direction does. Module 4 will show you exactly which specific rotation each named gate performs.
Practice Questions
Test your understanding
KEY TAKEAWAYS
Remember these points
Every quantum gate must be perfectly reversible -- no quantum operation (aside from measurement) is allowed to destroy information
The conjugate transpose of a matrix is found by transposing it (swap rows/columns) and then taking the complex conjugate of every entry
A matrix U is unitary exactly when the dagger of U times U equals the identity matrix -- this single check tells you whether it's a valid, physically allowed quantum operation
Unitary matrices always preserve vector length, which is exactly why they preserve total probability -- a non-unitary matrix would produce an invalid, non-normalized quantum state
Geometrically, every unitary matrix represents a rotation (possibly with reflection) of the Bloch sphere -- never a stretch or shrink. Every gate in Module 4 is a specific unitary matrix