Matrices as Linear Maps
A matrix is more than a table of numbers — it is a precise rule for transforming one vector into another. That rule is called a linear map, and it sits at the heart of every quantum gate, observable, and evolution operator you will encounter.
Vectors as columns, matrices as grids
A matrix has four entries arranged in two rows and two columns:
A column vector with two entries is written
Applying to — written — produces a new column vector whose entries are computed by taking dot products of each row of with the column :
The first output component is the dot product of row 0 with ; the second is the dot product of row 1 with .
Why "linear map"?
The map is linear because it preserves two operations:
- Addition: .
- Scalar multiplication: for any scalar .
Both follow directly from the row-dot-column definition above. Linearity is not a coincidence — it is the property behind the superposition principle, which makes quantum evolution predictable. (Reversibility is a separate, stronger requirement: it comes from the gate being unitary, not from linearity alone.)
A concrete example
Let
Applying the rule:
Notice what happened geometrically: is the first standard basis vector, and is exactly the first column of . This is a general fact: applying any matrix to a basis vector simply reads off the corresponding column.
Matrices as quantum gates
Every single-qubit quantum gate is a matrix acting on the two-component state vector . For example, the Pauli-X gate
swaps the two components: and — a quantum bit-flip. You can verify this by applying the matrix-times-column recipe to each basis vector.
Try it
This is a numerical exercise — your code should return a number. Apply the
matrix to
the vector and return the first component of the
result.
Sign in on the full site to ask questions and join the discussion.