Mathematical Interlude

Learn about the conditions necessary for a 2x2 matrix to represent a quantum gate and the associated mathematical concepts.

It turns out that we can’t use any combination of numbers in the 2×22×2 matrices representing quantum gates. To see why, we need to look at some of the math associated with matrices. If you don’t remember the details or you haven’t seen these manipulations in a math course, don’t worry. We’ll show you what you need to know.

The matrices allowed to represent quantum gates have to satisfy the following requirements:

  1. The determinant of the matrix must be equal to +1+1 or 1−1. This guarantees that the output column vector is a unit vector if the input vector is a unit vector. Remember that we use vectors with length 11 because we want our probabilities to sum to 11.

  2. The product of the matrix and its transpose must equal I\text{I}, the identity matrix.

  3. The columns in the matrix form a set of orthogonal unit vectors. So do the rows.

Let’s check the Hadamard gate matrix to see if it satisfies those conditions and, along the way, we will explain what determinant and transpose mean. For almost all of this course, we will restrict ourselves to gates that satisfy these conditions, and you won’t need to worry about the mathematical details. However, it is good to know some of the mathematical terminology in case you come across these terms in other books and articles.

The determinant of a 2×22 × 2 matrix is the product of upper-left and lower-right elements minus the product of the lower-left and the upper-right elements. In particular

Det(abcd)=adbc.\mathrm{Det} \begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc.

Here is an example with numerical entries in the matrix:

Det(120042)=440=1.\mathrm{Det} \begin{pmatrix} -\frac{1}{2} & 0 \\ 0 & \frac{4}{2} \end{pmatrix} = -\frac{4}{4}-0 = -1.

Get hands-on with 1400+ tech skills courses.