Linear Algebra Review and Exercises for Quantum Computing

Author

Your Name

Published

March 28, 2025

Introduction

This lecture focuses on reviewing essential concepts and performing exercises in linear algebra, specifically tailored for applications in quantum computing. We will cover operator representations, eigenvalue problems, properties of the dagger operator, tensor and matrix products, and representations of the Hadamard operator. These topics are fundamental for understanding quantum algorithms and quantum mechanics in general. The main objectives are to:

  • Express operators in both matrix and ket-bra notation.

  • Calculate eigenvalues and eigenvectors, and explore diagonalization.

  • Understand the properties of the dagger operator and its relation to normal and Hermitian matrices.

  • Examine tensor and matrix product operations.

  • Represent the Hadamard operator in different forms.

Linear Algebra Review and Exercises

Operator Representation: Ket-Bra and Matrix Forms

We use the computational basis, where \(\left|{0}\right\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}\) and \(\left|{1}\right\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}\). Operators can be represented as matrices or in ket-bra notation.

Single Qubit Operator (\(\sigma_y\))

The \(\sigma_y\) operator in the computational basis is given by:

\[\sigma_y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}\]

We want to express this operator in ket-bra notation. An operator in ket-bra form is a sum of terms like \(\left|{i}\right\rangle\left\langle{j}\right|\), which acts on a vector \(\left|{\psi}\right\rangle = \alpha\left|{0}\right\rangle + \beta\left|{1}\right\rangle\) as follows: \((\left|{i}\right\rangle\left\langle{j}\right|)\left|{\psi}\right\rangle = \left\langle{j}\middle|{\psi}\right\rangle\left|{i}\right\rangle\). This means the operator \(\left|{i}\right\rangle\left\langle{j}\right|\) projects the input vector onto the basis vector \(\left|{j}\right\rangle\) and then outputs the result along the direction of \(\left|{i}\right\rangle\).

For \(\sigma_y\), we analyze its action on the basis vectors:

  • The first row corresponds to the \(\left|{0}\right\rangle\) output. The first element (0) multiplies the \(\left\langle{0}\right|\) component, and the second element (\(-i\)) multiplies the \(\left\langle{1}\right|\) component.

  • The second row corresponds to the \(\left|{1}\right\rangle\) output. The first element (\(i\)) multiplies the \(\left\langle{0}\right|\) component, and the second element (0) multiplies the \(\left\langle{1}\right|\) component.

Therefore, the ket-bra representation is:

\[\sigma_y = 0\cdot\left|{0}\middle\rangle\middle\langle{0}\right| - i\left|{0}\middle\rangle\middle\langle{1}\right| + i\left|{1}\middle\rangle\middle\langle{0}\right| + 0\cdot\left|{1}\middle\rangle\middle\langle{1}\right| = -i\left|{0}\middle\rangle\middle\langle{1}\right| + i\left|{1}\middle\rangle\middle\langle{0}\right|\]

Let’s verify this by applying it to a general state \(\left|{\psi}\right\rangle = \alpha\left|{0}\right\rangle + \beta\left|{1}\right\rangle\):

\[\begin{aligned}\sigma_y \left|{\psi}\right\rangle &= (-i\left|{0}\middle\rangle\middle\langle{1}\right| + i\left|{1}\middle\rangle\middle\langle{0}\right|)(\alpha\left|{0}\right\rangle + \beta\left|{1}\right\rangle) \\&= -i\alpha\left\langle{1}\middle|{0}\right\rangle\left|{0}\right\rangle - i\beta\left\langle{1}\middle|{1}\right\rangle\left|{0}\right\rangle + i\alpha\left\langle{0}\middle|{0}\right\rangle\left|{1}\right\rangle + i\beta\left\langle{0}\middle|{1}\right\rangle\left|{1}\right\rangle \\&= -i\beta\left|{0}\right\rangle + i\alpha\left|{1}\right\rangle\end{aligned}\]

In matrix form, this corresponds to:

\[\begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} \begin{pmatrix} \alpha \\ \beta \end{pmatrix} = \begin{pmatrix} -i\beta \\ i\alpha \end{pmatrix}\]

which is consistent. The ket-bra representation provides an alternative, and sometimes more intuitive, way to understand the action of the operator.

Two-Qubit Operator (\(\sigma_x \otimes \sigma_z\))

The two-qubit operator \(\sigma_x \otimes \sigma_z\) is given by:

\[\sigma_x \otimes \sigma_z = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \otimes \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} 0\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} & 1\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \\ 1\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} & 0\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \end{pmatrix} = \begin{pmatrix} 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \\ 1 & 0 & 0 & 0 \\ 0 & -1 & 0 & 0 \end{pmatrix}\]

The basis ordering is \(\left|{00}\right\rangle, \left|{01}\right\rangle, \left|{10}\right\rangle, \left|{11}\right\rangle\). The ket-bra representation is derived by identifying the non-zero matrix elements:

  • Element (1,3) = 1: This corresponds to taking the input \(\left|{10}\right\rangle\) (the third basis vector) and outputting \(\left|{00}\right\rangle\) (the first basis vector). So, we have \(\left|{00}\middle\rangle\middle\langle{10}\right|\).

  • Element (2,4) = -1: This corresponds to taking the input \(\left|{11}\right\rangle\) (the fourth basis vector) and outputting \(\left|{01}\right\rangle\) (the second basis vector) with a factor of -1. So, we have \(-\left|{01}\middle\rangle\middle\langle{11}\right|\).

  • Element (3,1) = 1: This corresponds to taking the input \(\left|{00}\right\rangle\) (the first basis vector) and outputting \(\left|{10}\right\rangle\) (the third basis vector). So, we have \(\left|{10}\middle\rangle\middle\langle{00}\right|\).

  • Element (4,2) = -1: This corresponds to taking the input \(\left|{01}\right\rangle\) (the second basis vector) and outputting \(\left|{11}\right\rangle\) (the fourth basis vector) with a factor of -1. So we have \(-\left|{11}\middle\rangle\middle\langle{01}\right|\).

So, the ket-bra representation is:

\[\sigma_x \otimes \sigma_z = \left|{00}\middle\rangle\middle\langle{10}\right| - \left|{01}\middle\rangle\middle\langle{11}\right| + \left|{10}\middle\rangle\middle\langle{00}\right| - \left|{11}\middle\rangle\middle\langle{01}\right|\]

This is consistent with the general rule that the matrix element \(A_{ij}\) corresponds to the ket-bra term \(\left|{i}\right\rangle\left\langle{j}\right|\). The indices \(i\) and \(j\) now refer to the composite basis states of the two-qubit system.

Eigenvalues, Eigenvectors, and Diagonalization

Finding Eigenvalues and Eigenvectors of \(\sigma_y\)

To find the eigenvalues of \(\sigma_y\), we solve the characteristic equation:

\[\det(\sigma_y - \lambda I) = 0\]

where \(I\) is the identity matrix. This equation arises from the eigenvalue equation \(A\left|{v}\right\rangle = \lambda\left|{v}\right\rangle\), which can be rewritten as \((A - \lambda I)\left|{v}\right\rangle = 0\). For non-trivial solutions (\(\left|{v}\right\rangle \neq 0\)), the matrix \((A - \lambda I)\) must be singular, meaning its determinant is zero.

\[\det\begin{pmatrix} -\lambda & -i \\ i & -\lambda \end{pmatrix} = \lambda^2 - (-i)(i) = \lambda^2 - 1 = 0\]

So, the eigenvalues are \(\lambda_1 = 1\) and \(\lambda_2 = -1\).

For \(\lambda_1 = 1\), we solve \((\sigma_y - I)\left|{v}\right\rangle = 0\):

\[\begin{pmatrix} -1 & -i \\ i & -1 \end{pmatrix} \begin{pmatrix} \alpha \\ \beta \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}\]

This gives us \(- \alpha - i\beta = 0\) and \(i\alpha - \beta = 0\). Both equations imply \(\beta = i\alpha\). Let \(\alpha = 1\), then \(\beta = i\). Normalizing the eigenvector (requiring \(|\alpha|^2 + |\beta|^2 = 1\)), we get:

\[\left|{v_1}\right\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ i \end{pmatrix}\]

For \(\lambda_2 = -1\), we solve \((\sigma_y + I)\left|{v}\right\rangle = 0\):

\[\begin{pmatrix} 1 & -i \\ i & 1 \end{pmatrix} \begin{pmatrix} \alpha \\ \beta \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}\]

This gives us \(\alpha - i\beta = 0\) and \(i\alpha + \beta = 0\). Both equations imply \(\beta = -i\alpha\). Let \(\alpha = 1\), then \(\beta = -i\). Normalizing the eigenvector, we get:

\[\left|{v_2}\right\rangle = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ -i \end{pmatrix}\]

The eigenvectors \(\left|{v_1}\right\rangle\) and \(\left|{v_2}\right\rangle\) form an orthonormal basis.

Eigenvalues of a 4x4 Matrix: Example

Consider the matrix from the previous example, \(\sigma_x \otimes \sigma_z\), with \(-\lambda\) along the diagonal:

\[A = \begin{pmatrix} -\lambda & 0 & 1 & 0 \\ 0 & -\lambda & 0 & -1 \\ 1 & 0 & -\lambda & 0 \\ 0 & -1 & 0 & -\lambda \end{pmatrix}\]

We compute the determinant by expanding along the first row. This is a recursive process where we reduce the determinant of a larger matrix to a sum of determinants of smaller matrices.

\[\begin{aligned}\det(A) &= -\lambda \det\begin{pmatrix} -\lambda & 0 & -1 \\ 0 & -\lambda & 0 \\ -1 & 0 & -\lambda \end{pmatrix} + 1 \cdot \det\begin{pmatrix} 0 & -\lambda & -1 \\ 1 & 0 & 0 \\ 0 & -1 & -\lambda \end{pmatrix} \\&= -\lambda(-\lambda(\lambda^2 - 0) - 1(0 - \lambda)) + 1(1(\lambda - 0)) \\&= -\lambda(-\lambda^3 + \lambda) + \lambda \\&= \lambda^4 - \lambda^2 - \lambda^2 + 1\\&= \lambda^4 - 2\lambda^2 + 1 = (\lambda^2 - 1)^2\end{aligned}\]

Setting \(\det(A) = 0\), we get \((\lambda^2 - 1)^2 = 0\), which means \(\lambda^2 = 1\), so \(\lambda = \pm 1\). Both eigenvalues have multiplicity 2. This means each eigenvalue has two linearly independent eigenvectors associated with it.

Non-Diagonalizable Matrix: Example

Consider the matrix:

\[M = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}\]

First, we check if it’s normal: \(MM^\dagger = M^\dagger M\). A matrix is normal if it commutes with its conjugate transpose. This is a necessary condition for diagonalizability.

\[M^\dagger = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}\]

\[MM^\dagger = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix}\begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 1 & 1 \\ 1 & 2 \end{pmatrix}\]

\[M^\dagger M = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix}\begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix} = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}\]

Since \(MM^\dagger \neq M^\dagger M\), the matrix is not normal, and thus not necessarily diagonalizable.

To find eigenvalues, we solve \(\det(M - \lambda I) = 0\):

\[\det\begin{pmatrix} 1-\lambda & 0 \\ 1 & 1-\lambda \end{pmatrix} = (1-\lambda)^2 = 0\]

So, \(\lambda = 1\) is the only eigenvalue, with multiplicity 2.

Now we find the eigenvectors:

\[(M - I)\left|{v}\right\rangle = \begin{pmatrix} 0 & 0 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} \alpha \\ \beta \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix}\]

This gives us \(\alpha = 0\), and \(\beta\) can be any value. So, the eigenvector is \(\left|{v}\right\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix}\) (normalized). We have only one linearly independent eigenvector, so the matrix is not diagonalizable. A diagonalizable matrix must have a complete set of linearly independent eigenvectors that span the entire vector space.

The Dagger Operator and Matrix Properties

\(\left\langle{U}\right|A\left|{W}\right\rangle^\dagger = \left\langle{W}\right|A^\dagger\left|{U}\right\rangle\)

We want to show that \((\left\langle{U}\right|A\left|{W}\right\rangle)^\dagger = \left\langle{W}\right|A^\dagger\left|{U}\right\rangle\). The expression \(\left\langle{U}\right|A\left|{W}\right\rangle\) represents a scalar (a complex number). The dagger operation on a scalar is simply complex conjugation. The dagger operation on a ket turns it into a bra, and vice-versa. The dagger operation on an operator is the conjugate transpose.

We can express any operator \(A\) in an orthonormal basis \(\{\left|{i}\right\rangle\}\) as:

\[A = \sum_{i,j} a_{ij} \left|{i}\middle\rangle\middle\langle{j}\right|\]

where \(a_{ij} = \left\langle{i}\right|A\left|{j}\right\rangle\) are the matrix elements of \(A\) in this basis.

Let’s consider the expression \(\left\langle{U}\right|A\left|{W}\right\rangle\). We can insert a complete set of states, \(\sum_k \left|{k}\middle\rangle\middle\langle{k}\right| = I\) (the identity operator), multiple times:

\[\left\langle{U}\right|A\left|{W}\right\rangle = \sum_{i,j} \left\langle{U}\right| (\left|{i}\middle\rangle\middle\langle{j}\right|) \left|{W}\right\rangle a_{ij} = \sum_{i,j} \left\langle{U}\middle|{i}\right\rangle\left\langle{j}\middle|{W}\right\rangle a_{ij}\]

Taking the dagger (complex conjugate transpose) of this scalar:

\[\begin{aligned}(\left\langle{U}\right|A\left|{W}\right\rangle)^\dagger &= \left( \sum_{i,j} \left\langle{U}\middle|{i}\right\rangle\left\langle{j}\middle|{W}\right\rangle a_{ij} \right)^* \\&= \sum_{i,j} \left\langle{U}\middle|{i}\right\rangle^*\left\langle{j}\middle|{W}\right\rangle^* a_{ij}^* \\&= \sum_{i,j} \left\langle{i}\middle|{U}\right\rangle\left\langle{W}\middle|{j}\right\rangle a_{ij}^*\end{aligned}\]

Now consider \(\left\langle{W}\right|A^\dagger\left|{U}\right\rangle\). First, we find the dagger of \(A\):

\[A^\dagger = \sum_{i,j} a_{ij}^* (\left|{i}\middle\rangle\middle\langle{j}\right|)^\dagger = \sum_{i,j} a_{ij}^* \left|{j}\middle\rangle\middle\langle{i}\right|\]

So,

\[\left\langle{W}\right|A^\dagger\left|{U}\right\rangle = \sum_{i,j} \left\langle{W}\right| (a_{ij}^* \left|{j}\middle\rangle\middle\langle{i}\right|) \left|{U}\right\rangle = \sum_{i,j} a_{ij}^* \left\langle{W}\middle|{j}\right\rangle\left\langle{i}\middle|{U}\right\rangle\]

This is the same as the expression we derived for \((\left\langle{U}\right|A\left|{W}\right\rangle)^\dagger\). Therefore, \((\left\langle{U}\right|A\left|{W}\right\rangle)^\dagger = \left\langle{W}\right|A^\dagger\left|{U}\right\rangle\). This property is fundamental in quantum mechanics, as it relates the matrix elements of an operator to the matrix elements of its adjoint.

Normal and Hermitian Matrices: Relationship via Eigenvalues

A matrix is normal if \(AA^\dagger = A^\dagger A\).

A matrix is Hermitian if \(A = A^\dagger\).

A normal matrix is Hermitian if and only if its eigenvalues are real.

**Part 1: Hermitian implies real eigenvalues.**

Suppose \(A\) is Hermitian (\(A = A^\dagger\)). Let \(\left|{v}\right\rangle\) be an eigenvector of \(A\) with eigenvalue \(\lambda\): \(A\left|{v}\right\rangle = \lambda\left|{v}\right\rangle\). Then:

\[\left\langle{v}\right|A\left|{v}\right\rangle = \lambda\left\langle{v}\middle|{v}\right\rangle\]

Taking the dagger:

\[(\left\langle{v}\right|A\left|{v}\right\rangle)^\dagger = \left\langle{v}\right|A^\dagger\left|{v}\right\rangle = \left\langle{v}\right|A\left|{v}\right\rangle = \lambda^*\left\langle{v}\middle|{v}\right\rangle\]

Since \(\left\langle{v}\right|A\left|{v}\right\rangle = \lambda\left\langle{v}\middle|{v}\right\rangle\), we have \(\lambda\left\langle{v}\middle|{v}\right\rangle = \lambda^*\left\langle{v}\middle|{v}\right\rangle\). Since \(\left\langle{v}\middle|{v}\right\rangle \neq 0\) (because \(\left|{v}\right\rangle\) is a non-zero eigenvector), we must have \(\lambda = \lambda^*\), which means \(\lambda\) is real.

**Part 2: Real eigenvalues and normal imply Hermitian.**

Suppose \(A\) is normal (\(AA^\dagger = A^\dagger A\)) and has real eigenvalues. Since \(A\) is normal, it has a spectral decomposition:

\[A = \sum_i \lambda_i \left|{v_i}\middle\rangle\middle\langle{v_i}\right|\]

where \(\lambda_i\) are the eigenvalues and \(\left|{v_i}\right\rangle\) are the orthonormal eigenvectors. This means that a normal matrix can be diagonalized by a unitary transformation. Taking the dagger:

\[A^\dagger = \sum_i \lambda_i^* (\left|{v_i}\middle\rangle\middle\langle{v_i}\right|)^\dagger = \sum_i \lambda_i^* \left|{v_i}\middle\rangle\middle\langle{v_i}\right|\]

Since the eigenvalues are real, \(\lambda_i = \lambda_i^*\), so \(A^\dagger = \sum_i \lambda_i \left|{v_i}\middle\rangle\middle\langle{v_i}\right| = A\). Thus, \(A\) is Hermitian. This shows that for normal matrices, the property of having real eigenvalues is equivalent to being Hermitian.

Tensor and Matrix Products

Tensor Product Operations

Transpose, Conjugate, and Adjoint of a Tensor Product

Let \(A\) and \(B\) be matrices, with elements \(A_{ij}\) and \(B_{kl}\) respectively. The tensor product \(A \otimes B\) creates a larger matrix where each element of \(A\) is multiplied by the entire matrix \(B\).

* **Transpose:** \((A \otimes B)^T = A^T \otimes B^T\) To see this, consider the elements of the tensor product. The element in row \((i-1)m + k\) and column \((j-1)n + l\) of \(A \otimes B\) (where \(B\) is \(m \times n\)) is \(A_{ij}B_{kl}\). The transpose swaps rows and columns. So, the element in row \((j-1)n + l\) and column \((i-1)m + k\) of \((A \otimes B)^T\) is \(A_{ji}B_{lk}\). This is precisely the element in the same position in \(A^T \otimes B^T\).

* **Conjugate:** \((A \otimes B)^* = A^* \otimes B^*\) The complex conjugate simply takes the complex conjugate of each element. The element in row \((i-1)m + k\) and column \((j-1)n + l\) of \((A \otimes B)^*\) is \((A_{ij}B_{kl})^* = A_{ij}^* B_{kl}^*\), which is the same as the corresponding element in \(A^* \otimes B^*\).

* **Adjoint:** \((A \otimes B)^\dagger = A^\dagger \otimes B^\dagger\) The adjoint is the conjugate transpose. Combining the previous two results, we have \((A \otimes B)^\dagger = ((A \otimes B)^T)^* = (A^T \otimes B^T)^* = A^{T*} \otimes B^{T*} = A^\dagger \otimes B^\dagger\).

These properties are straightforward because the tensor product distributes over these operations.

Matrix Product Operations

Transpose and Adjoint of a Matrix Product

Let \(A\) and \(B\) be matrices. The matrix product \(AB\) is defined only if the number of columns of \(A\) equals the number of rows of \(B\).

* **Transpose:** \((AB)^T = B^T A^T\) * **Adjoint:** \((AB)^\dagger = B^\dagger A^\dagger\)

The transpose property can be shown by considering the matrix elements:

\[\begin{aligned}((AB)^T)_{ij} &= (AB)_{ji} \quad \text{(Definition of transpose)}\\&= \sum_k A_{jk}B_{ki} \quad \text{(Definition of matrix product)} \\&= \sum_k B_{ki}A_{jk} \quad \text{(Commutativity of scalar multiplication)} \\&= \sum_k (B^T)_{ik}(A^T)_{kj} \quad \text{(Definition of transpose)} \\&= (B^T A^T)_{ij} \quad \text{(Definition of matrix product)}\end{aligned}\]

The adjoint property follows from the transpose and conjugate properties: \((AB)^\dagger = ((AB)^T)^* = (B^T A^T)^* = (B^T)^* (A^T)^* = B^\dagger A^\dagger\). The key difference from the tensor product is the *reversal* of the order of the matrices when taking the transpose or adjoint of a matrix product. This is crucial for maintaining consistency in calculations.

Hadamard Operator Representations

Single Qubit Hadamard Gate

The Hadamard gate is a fundamental single-qubit gate in quantum computing, given by:

\[H = \frac{1}{\sqrt{2}}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\]

It maps the computational basis states as follows: \(H\left|{0}\right\rangle = \frac{1}{\sqrt{2}}(\left|{0}\right\rangle + \left|{1}\right\rangle) = \left|{+}\right\rangle\) and \(H\left|{1}\right\rangle = \frac{1}{\sqrt{2}}(\left|{0}\right\rangle - \left|{1}\right\rangle) = \left|{-}\right\rangle\).

Ket-Bra Notation

The ket-bra representation is obtained by directly mapping the matrix elements:

\[H = \frac{1}{\sqrt{2}}(\left|{0}\middle\rangle\middle\langle{0}\right| + \left|{0}\middle\rangle\middle\langle{1}\right| + \left|{1}\middle\rangle\middle\langle{0}\right| - \left|{1}\middle\rangle\middle\langle{1}\right|)\]

This can be written compactly as:

\[H = \frac{1}{\sqrt{2}} \sum_{x,y \in \{0,1\}} (-1)^{xy} \left|{x}\middle\rangle\middle\langle{y}\right|\]

Here, the summation iterates over all possible combinations of \(x\) and \(y\) (00, 01, 10, 11). The term \((-1)^{xy}\) generates the correct sign for each term:

  • \(x=0, y=0\): \((-1)^{0\cdot0} = 1\)

  • \(x=0, y=1\): \((-1)^{0\cdot1} = 1\)

  • \(x=1, y=0\): \((-1)^{1\cdot0} = 1\)

  • \(x=1, y=1\): \((-1)^{1\cdot1} = -1\)

N-Qubit Hadamard Gate

The N-qubit Hadamard gate is the tensor product of \(N\) single-qubit Hadamard gates, denoted as \(H^{\otimes N}\). This gate is crucial for creating superposition states across multiple qubits. Applying \(H^{\otimes N}\) to the state \(\left|{00\dots 0}\right\rangle\) creates an equal superposition of all \(2^N\) computational basis states.

Compact Representation with Summation and Dot Product

The N-qubit Hadamard gate can be represented as:

\[H^{\otimes N} = \frac{1}{\sqrt{2}^N} \sum_{x_1, \dots, x_N \in \{0,1\}} \sum_{y_1, \dots, y_N \in \{0,1\}} (-1)^{\sum_{i=1}^N x_i y_i} \left|{x_1\dots x_N}\middle\rangle\middle\langle{y_1\dots y_N}\right|\]

This expands on the single-qubit representation. We now have \(N\) indices \(x_i\) and \(N\) indices \(y_i\), each ranging from 0 to 1. The exponent in \((-1)^{\sum_{i=1}^N x_i y_i}\) determines the sign of each term in the expansion.

This can also be written using vector notation \(\mathbf{x} = (x_1, \dots, x_N)\) and \(\mathbf{y} = (y_1, \dots, y_N)\), which are binary strings of length \(N\):

\[H^{\otimes N} = \frac{1}{\sqrt{2}^N} \sum_{\mathbf{x}, \mathbf{y} \in \{0,1\}^N} (-1)^{\mathbf{x} \cdot \mathbf{y}} \left|{\mathbf{x}}\middle\rangle\middle\langle{\mathbf{y}}\right|\]

where \(\mathbf{x} \cdot \mathbf{y} = \sum_{i=1}^N x_i y_i\) is the dot product (modulo 2). This compact notation is particularly useful in analyzing quantum algorithms that utilize the Hadamard transform, such as the Deutsch-Jozsa algorithm and Grover’s algorithm. The dot product in the exponent effectively controls the interference pattern created by the Hadamard gates. The factor \(1/\sqrt{2}^N\) ensures the resulting operator is unitary.

Conclusion

This lecture reviewed several key concepts in linear algebra, including operator representations, eigenvalue problems, properties of the dagger operator, tensor and matrix products, and representations of the Hadamard operator. We performed several exercises to solidify these concepts, demonstrating how to express operators in ket-bra notation, calculate eigenvalues and eigenvectors, and understand the properties of various matrix operations. These concepts are crucial for understanding quantum computing and quantum algorithms.

Key takeaways:

* Operators can be represented both as matrices and in ket-bra notation, and converting between these representations is a useful skill. The ket-bra notation often provides a more intuitive understanding of an operator’s action. * The dagger operator is essential for understanding Hermitian and normal matrices and their properties. Hermitian operators have real eigenvalues and represent physical observables in quantum mechanics. * Tensor and matrix products have distinct properties, especially regarding transpose and adjoint operations. The order reversal in matrix products (\((AB)^T = B^T A^T\)) is a critical distinction. * The Hadamard operator can be represented compactly using summation and dot product notation, which is useful for analyzing quantum algorithms. This compact form highlights the superposition-creating nature of the Hadamard gate.

For the next lecture, we will transition into quantum mechanics. Some topics to think about in preparation are:

  • What makes quantum mechanics different from classical mechanics? (Consider concepts like superposition, entanglement, and measurement.)

  • What are the postulates of quantum mechanics? (How do we mathematically describe states, observables, and evolution?)

  • How do we describe the state of a quantum system? (What is a quantum state vector, and how does it relate to probabilities?)