Quantum computing 1

November 11, 2020 — Support my next blog post, buy me a coffee ☕.

In my first research project as an undergraduate student in the summer of 2010, I worked on groups and symmetries in classical and quantum physics. One day in the library I came across Noether's theorem, which links symmetries (e.g., time invariance) to conserved quantities (e.g., energy). Noether was one of the leading mathematicians of her time and made major contributions to both algebra and mathematical physics. Learning about her work was a decisive moment in my life because I realized for the first time how deeply connected mathematics and physics were.

Thanks to Noether, I got really interested in mathematical physics and took classes in statistical mechanics and special relativity. My second research project as an undergraduate student was on Riemannian geometry and general relativity, with my friend and former classmate Olivier Martre—oh dear, how hard it was!

A couple of years down the road, I had to choose between an M.Sc. in applied mathematics and an MS.c. in mathematical physics. I ended pursuing a career in applied mathematics, but physics never really left my life—most of my work in applied mathematics has been on the numerical solution of the differential equations of physics. In particular, during my Ph.D. at Oxford, I built a partial differential equation solver called spin; the guide can be found here. While it stands for "stiff PDEs integrator", I named it after the quantum mechanical spin. The spin code is part of the MATLAB-based package Chebfun, a project led by my former Ph.D. advisor Nick Trefethen.

Quantum states and observables

In quantum physics, the state of a physical system is described by its wave function \(\psi\), an element of a separable complex Hilbert space \(X\) [1]. Physical quantities are represented by self-adjoint operators \(L:X\rightarrow X\) acting on \(\psi\), called observables. Note that \(X\) may or may not be finite-dimensional; in finite dimension, \(L\) is a Hermitian matrix. Examples of operators include the position operator (position), the momentum operator (momentum), the spin angular momentum operator (spin) and the Hamiltonian operator (total energy).

Let us first look at a finite-dimensional example by considering the spin operator along the \(y\)-axis for spin-\(\frac{1}{2}\) particles, such as the electron. In this case, the quantum state \(\psi=(\psi_1,\psi_2)^T\), with respect to \(y\)-spin, lives in is the Hilbert space \(X=\mathbb{C}^2\) of pairs of complex numbers, with inner product $$ \langle\psi,\phi\rangle = \overline{\psi}_1\phi_1 + \overline{\psi}_2\phi_2, $$ and the spin operator along the \(y\)-axis is the matrix \(L=S_y\) given by $$ S_y = \frac{\hbar}{2}\begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}. $$ Since it is a Hermitian matrix, the spectral theorem guarantees that it is diagonalizable with orthonormal eigenvectors and real eigenvalues. The eigenvalues are \(\pm\frac{\hbar}{2}\), while the eigenvectors are given by $$ \psi_{y+}=\frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ i \end{pmatrix}, \quad \psi_{y-}=\frac{1}{\sqrt{2}}\begin{pmatrix} 1 \\ -i \end{pmatrix}. $$ The quantum state of a spin-\(\frac{1}{2}\) particle, with respect to \(y\)-spin, may then be written as $$ \psi = \langle\psi_{y+},\psi\rangle\psi_{y+} + \langle\psi_{y-},\psi\rangle\psi_{y-}, $$ with the normalization condition $$ \langle\psi,\psi\rangle = \vert\langle\psi_{y+},\psi\rangle\vert^2 + \vert\langle\psi_{y-},\psi\rangle\vert^2 = 1. $$ When the \(y\)-spin is measured, the probability that it will be \(\pm\frac{\hbar}{2}\) is \(\vert\langle\psi_{y\pm},\psi\rangle\vert^2\). Following the measurement, \(\psi\) will collapse into the corresponding eigenstate. Note that the expected value of \(\psi\) is given by $$ \langle\psi\rangle = \frac{\hbar}{2}\vert\langle\psi_{y+},\psi\rangle\vert^2 - \frac{\hbar}{2}\vert\langle\psi_{y-},\psi\rangle\vert^2. $$

Let us now look at an example in infinite dimension by considering the Hamiltonian operator of a particle of mass \(m\) in a quadratic potential \(V(x)=\frac{1}{2}m\omega^2x^2\), the so-called quantum harmonic oscillator with frequency \(\omega\). In this case, the quantum state \(\psi\), with respect to total energy, belongs to the Hilbert space \(X=L^2(\mathbb{R})\) of square-integrable functions \(\psi\), with inner product $$ \langle\psi,\phi\rangle = \int_{\mathbb{R}}\overline{\psi}(x)\phi(x)dx, $$ and the Hamiltonian operator is the operator \(L=H\) defined by $$ H\psi(x) = -\frac{\hbar}{2m}\psi''(x) + \frac{1}{2}m\omega^2x^2\psi(x), \;\;x\in\mathbb{R}, $$ with domain [2] $$ D(H) = \big\{\psi\in H^2(\mathbb{R})\,|\,x^2\psi\in L^2(\mathbb{R})\big\}\subset L^2(\mathbb{R}). $$ It is an example of an unbounded operator, since the elements of its spectrum have unbounded amplitude. It is diagonalizable with orthonormal eigenfunctions and a discrete real spectrum [3]. The countably many eigenvalues are given by $$ \lambda_n = (2n+1)\frac{\hbar}{2}\omega, \quad n=0,1,2,\ldots, $$ while the eigenfunctions are scaled Hermite functions \(\psi_n\). Therefore, one may write the quantum state of the particle, with respect to total energy, as $$ \psi(x) = \sum_{n=0}^{\infty}\langle\psi_n,\psi\rangle\psi_n(x), $$ with the normalizaton condition $$ \langle\psi,\psi\rangle = \sum_{n=0}^{\infty}\vert\langle\psi_n,\psi\rangle\vert^2 = 1. $$ As in the finite-dimensional case, the meaning of the decomposition in the basis of eigenfunctions is that if we perform a total energy measurement, the state will have total energy \(\lambda_n\) with probability \(\vert\langle\psi_n,\psi\rangle\vert^2\), and following the measurement, the state will collapse into the corresponding eigenstate. Here, the expected value of \(\psi\) is given by $$ \langle\psi\rangle = \sum_{n=0}^{\infty}\lambda_n\vert\langle\psi_n,\psi\rangle\vert^2. $$ In Chebfun, quantum states can be computed with the quantumstates command; see, e.g., this example.

Bit versus qubit

Classical computers use bits to store information, which are commonly represented as "0" and "1". The way I like to think about bits is that each bit is like a small magnet that can either point North ("0") or South ("1"). By applying an appropriate magnetic field, one can change the magnetization of a bit, and change "0" to "1", or vice versa. Bits are then combined together into arrays of bits, called words. Numbers, for example, are stored as 32- or 64-bit words, following the IEEE 754 technical standard.

Quantum computers use qubits. A qubit is a two-state quantum-mechanical system, for example, the \(y\)-spin of the electron described in the previous section. In that scenario, a qubit would be $$ \psi = \alpha\psi_{y+} + \beta\psi_{y-}, $$ where \(\psi_{y+}\) corresponds to "0" and \(\psi_{y-}\) to "1". As in the classical case, one can change the value of a qubit by applying an appropriate magnetic field. Note that a qubit does not have a value in-between "0" and "1"; rather, as explained previously, when measured, it has a probability \(\vert\alpha\vert^2\) of the value "0" and a probability \(\vert\beta\vert^2\) of the value "1".

In the next post, I will talk about the Schrödinger equation and quantum logic gates.

[1] To be more precise, one has to consider equivalent classes of elements in \(H\) called rays, with \(\psi\sim\phi\) when \(\phi=\lambda\psi\) for some non-zero \(\lambda\in\mathbb{C}\).

[2] \(H^2(\mathbb{R})\) denotes the usual Sobolev space of functions in \(L^2(\mathbb{R})\) whose weak derivatives up to order two have a finite \(L^2(\mathbb{R})\)-norm.

[3] Self-adjoint unbounded operators can always be diagonalized in some sense but, in general, the spectrum has both a discrete and a continuous part; see, e.g., this.


Blog posts about quantum computing

2020   Quantum computing 4

2020   Quantum computing 3

2020   Quantum computing 2

2020   Quantum computing 1