Mathematical Foundations: Linear Algebra for Quantum Computing
Mathematical Foundations: Linear Algebra for Quantum Computing
The language of quantum computing is mathematics, and nowhere is this more evident than in the elegant framework of linear algebra that underlies every aspect of quantum information science. Before we can explore the mysterious behaviors of qubits, the remarkable power of quantum gates, or the surprising efficiency of quantum algorithms, we must first establish a solid mathematical foundation. This chapter provides that foundation, developing the essential concepts of vector spaces, inner products, matrices, and tensor products that form the backbone of quantum computation. These are not mere preliminaries to be rushed through; rather, they constitute the very vocabulary with which we describe, analyze, and understand quantum systems. A deep appreciation of linear algebra will prove indispensable as we progress through the chapters that follow, where these mathematical structures reappear in increasingly sophisticated contexts.
The connection between linear algebra and quantum mechanics is not incidental but fundamental. The postulates of quantum mechanics are, at their core, statements about linear algebra. Quantum states are vectors, evolutions are linear transformations, and measurements are projections onto eigenspaces. This tight correspondence means that mastering the mathematical structures we develop here is equivalent to mastering the conceptual toolkit of quantum computation itself. With this motivation firmly in mind, let us begin our exploration of the mathematical foundations of quantum computing.
Vector Spaces and State Representations
Definition and Structure of Vector Spaces
A vector space (also called a linear space) is a set of objects called vectors, together with two operations—vector addition and scalar multiplication—that satisfy a specific collection of axioms. For our purposes in quantum computing, we are primarily concerned with finite-dimensional complex vector spaces, denoted $\mathbb{C}^n$, though the concepts we develop extend naturally to infinite-dimensional Hilbert spaces encountered in continuous-variable quantum systems.
Let us state the formal definition precisely. A vector space $V$ over the field of complex numbers $\mathbb{C}$ consists of a set of vectors together with two operations: vector addition, which maps any two vectors $|\psi\rangle, |\phi\rangle \in V$ to their sum $|\psi\rangle + |\phi\rangle \in V$, and scalar multiplication, which maps a scalar $c \in \mathbb{C}$ and a vector $|\psi\rangle \in V$ to the product $c|\psi\rangle \in V$. These operations must satisfy the following axioms for all vectors $|\psi\rangle, |\phi\rangle, |\chi\rangle \in V$ and all scalars $a, b \in \mathbb{C}$:
The associativity of addition requires that $(|\psi\rangle + |\phi\rangle) + |\chi\rangle = |\psi\rangle + (|\phi\rangle + |\chi\rangle)$. The commutativity of addition requires that $|\psi\rangle + |\phi\rangle = |\phi\rangle + |\psi\rangle$. There must exist an additive identity (the zero vector), denoted $|\mathbf{0}\rangle$, such that $|\psi\rangle + |\mathbf{0}\rangle = |\psi\rangle$ for every $|\psi\rangle$. For every vector, there must exist an additive inverse $|\psi\rangle$ such that $|\psi\rangle + (-\psi\rangle) = |\mathbf{0}\rangle$. The multiplicative identity requires that $1|\psi\rangle = |\psi\rangle$. The operations must satisfy distributivity over vector addition: $a(|\psi\rangle + |\phi\rangle) = a|\psi\rangle + a|\phi\rangle$, and distributivity over scalar addition: $(a + b)|\psi\rangle = a|\psi\rangle + b|\psi\rangle$. Finally, associativity of scalar multiplication requires that $(ab)|\psi\rangle = a(b|\psi\rangle)$.
These axioms may appear abstract, but they capture precisely the algebraic properties that make vector spaces so useful in physics. The complex number field is essential for quantum mechanics because the amplitudes that characterize quantum states are inherently complex. This complexity gives rise to interference phenomena—constructive and destructive—that have no classical analog but lie at the heart of quantum computational advantage.
The Standard Basis and Component Representation
The most familiar vector space in quantum computing is $\mathbb{C}^n$, the space of $n$-dimensional column vectors with complex entries. A vector in this space takes the form
$$|\psi\rangle = \begin{pmatrix} \psi_1 \\ \psi_2 \\ \vdots \\ \psi_n \end{pmatrix},$$
where each component $\psi_i$ is a complex number. The standard basis (also called the computational basis) for $\mathbb{C}^n$ consists of $n$ vectors, each with a single 1 in one position and 0s everywhere else:
$$|0\rangle = \begin{pmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}, \quad |1\rangle = \begin{pmatrix} 0 \\ 1 \\ \vdots \\ 0 \end{pmatrix}, \quad \ldots, \quad |n-1\rangle = \begin{pmatrix} 0 \\ 0 \\ \vdots \\ 1 \end{pmatrix}.$$
These basis vectors form a complete set in the sense that any vector $|\psi\rangle \in \mathbb{C}^n$ can be uniquely expressed as a linear combination (superposition) of the basis vectors:
$$|\psi\rangle = \sum_{i=0}^{n-1} \psi_i |i\rangle,$$
where the coefficients $\psi_i \in \mathbb{C}$ are called the amplitude of the state $|i\rangle$ in the superposition $|\psi\rangle$. This representation is foundational to quantum computation because it captures the essence of quantum superposition—the ability of a quantum system to exist in a combination of multiple basis states simultaneously.
The power of this representation becomes apparent when we consider the geometric interpretation. Each basis vector corresponds to a distinct computational basis state, and a general state is a point (or, more precisely, a direction) in an $n$-dimensional complex vector space. The amplitudes $\psi_i$ carry both magnitude and phase information, and both contribute to the observable properties of the quantum state.
Hilbert Spaces in Quantum Mechanics
While $\mathbb{C}^n$ suffices for systems with a finite number of discrete states (such as a qubit or a register of $n$ qubits), many quantum systems require infinite-dimensional vector spaces for their accurate description. A Hilbert space is a complete inner product space—a vector space equipped with an inner product (which we define in the next section) that is complete with respect to the norm induced by that inner product. In practical terms, completeness means that every Cauchy sequence of vectors converges to a vector within the space, eliminating pathological sequences that approach no limit.
The most important infinite-dimensional Hilbert space for quantum computing is $L^2(\mathbb{R})$, the space of square-integrable functions on the real line. This space underlies continuous-variable quantum computation, where information is encoded in the quantum states of harmonic oscillators (such as the quadratures of an optical mode). The vectors in $L^2(\mathbb{R})$ are functions $\psi(x)$, and the inner product between two functions is
$$\langle\phi|\psi\rangle = \int_{-\infty}^{\infty} \phi^*(x)\psi(x)\,dx,$$
where $\phi^*(x)$ denotes the complex conjugate of $\phi(x)$. The requirement of square-integrability—that $\int |\psi(x)|^2\,dx$ is finite—ensures that the norm of the function is well-defined.
For the majority of this book, we focus on finite-dimensional Hilbert spaces because they are conceptually simpler and because most current quantum computing technologies operate in such spaces. However, the mathematical framework we develop is general enough to accommodate infinite-dimensional cases when we encounter them in later chapters, particularly when discussing continuous-variable quantum computation and quantum field theory.
Inner Products and the Structure of Space
Defining the Inner Product
The inner product is the mathematical structure that allows us to talk about lengths, angles, and orthogonality in a vector space. In the