Gates as Matrices

Learn how matrices can be used to represent gate operations on state vectors, and the matrix multiplication rule using 2x2 matrices.

We saw in the previous chapter that computation can be carried out by using logic gates to act on the Cbits carried by the wires in the computer’s electrical circuits. We described the results of those operations using logic tables (or truth tables).

There is another neat way of representing what gates do to classical computing bits. To illustrate this, let’s consider the NOT\text{NOT} gate. Remember that a NOT\text{NOT} gate changes a bit 00 into a bit 11 and a bit 11 into a bit 00. How would we write those results in state vector language?

Get hands-on with 1400+ tech skills courses.