Quantum Basics

In this tutorial, we’ll cover the basic things you’ll need to know about quantum physics in order to start using quantum computing and quantum annealing. If you have any experience at all with anything quantum, you probably don’t need this tutorial.

What Does Quantum Mean?

Quantum refers to the fact that in quantum physics, certain properties of particles (like energy, position, and spin) can only take on discrete values, or “quanta”. This is in contrast to classical physics, where these properties can vary continuously. The quantum nature of particles leads to phenomena that are fundamentally different from classical physics, which in some cases allows for new capabilities that are not possible with classical computers.

What is Quantum Advantage?

The term “quantum advantage” refers to the potential for quantum computers to solve certain problems more efficiently than classical computers. This is often discussed in the context of specific algorithms, such as Shor’s algorithm for factoring large numbers, which can run exponentially faster on a quantum computer than the best known classical algorithms.

Quantum advantage has been demonstrated for certain specific problems, but it is still an open question as to how broadly it can be applied. It is likely that quantum computers will be able to provide huge advantages for some very specific types of problems, whilst offering more modest advantage in the general case.

There is also the consideration that quantum computers tend to be more energy-efficient than classical computers, at least in the theoretical limit, so even if they don’t provide a speed advantage for a particular problem, they may still be advantageous in terms of energy consumption.

What is a Qubit?

The simplest and most fundamental unit of quantum information is the qubit, which is the quantum version of a classical bit. A classical bit can only be in one of two states, 0 or 1, but a qubit can be in a mix of both states at the same time.

Whilst it is possible to choose any “basis” to represent a qubit, the most common is the computational basis, where our two main states are denoted as \(|0⟩\) and \(|1⟩\). This is known as “bra-ket” notation, and is a common way to represent quantum states. So, say in our system we have a single qubit, we might write our quantum state \(|ψ⟩\) as either:

\[|ψ⟩ = |0⟩ \qquad \text{(the qubit is in the state 0)}\]
\[|ψ⟩ = |1⟩ \qquad \text{(the qubit is in the state 1)}\]

If we instead want to use matrix notation, we can represent these states as column vectors:

\[\begin{split}|0⟩ = \begin{pmatrix} 1 \\ 0 \end{pmatrix}\end{split}\]
\[\begin{split}|1⟩ = \begin{pmatrix} 0 \\ 1 \end{pmatrix}\end{split}\]

What is Superposition?

Superposition is a fundamental concept in quantum mechanics, where a qubit can exist as both \(|0⟩\) and \(|1⟩\) at the same time. This is represented mathematically as a linear combination of the basis states. For example, a qubit in superposition can be written as:

\[|ψ⟩ = α|0⟩ + β|1⟩\]

where \(α\) and \(β\) are complex numbers that represent the probability of the qubit being in the states 0 and 1, respectively. Similarly, in matrix notation we can represent this state as:

\[\begin{split}|ψ⟩ = \begin{pmatrix} α \\ β \end{pmatrix}\end{split}\]

When we measure a qubit in such a superposition, we will get 0 with probability \(|α|^2\) and 1 with probability \(|β|^2\). As such, the probability amplitudes must be normalized to ensure that we have a valid probability distribution:

\[|α|^2 + |β|^2 = 1\]

When we measure a qubit, the superposition collapses, so we would no longer have a superposition of states, but instead we would have either \(|0⟩\) or \(|1⟩\). If we were to measure the same qubit again immediately after the first measurement, we would get the same result, since the state has collapsed to a definite state.

What Happens if We Have More Than One Qubit?

When we have more than one qubit, we can represent the state of the system as a tensor product of the individual qubits, which we usually write by placing the states of the individual qubits next to each other. For example, if we have two qubits, we can represent their general state as:

\[|ψ⟩ = α|00⟩ + β|01⟩ + γ|10⟩ + δ|11⟩\]

where \(α\), \(β\), \(γ\), and \(δ\) are the probability amplitudes for each of the four possible states of the two qubits, which again should be normalized so that we have a valid set of probabilities to measure each state.

When we switch to matrix notation we will need to perform the tensor product of the individual qubits to get a 4-dimensional vector that represents the state of the two-qubit system, for example:

\[\begin{split}|00⟩ = |0⟩ \otimes |0⟩ = \begin{pmatrix} 1 \\ 0 \end{pmatrix} \otimes \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 1 \begin{pmatrix} 1 \\ 0 \end{pmatrix} \\ 0 \begin{pmatrix} 1 \\ 0 \end{pmatrix} \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix}\end{split}\]

So our general two-qubit state in matrix notation would be:

\[\begin{split}|ψ⟩ = α\begin{pmatrix} 1 \\ 0 \\ 0 \\ 0 \end{pmatrix} + β\begin{pmatrix} 0 \\ 1 \\ 0 \\ 0 \end{pmatrix} + γ\begin{pmatrix} 0 \\ 0 \\ 1 \\ 0 \end{pmatrix} + δ\begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} = \begin{pmatrix} α \\ β \\ γ \\ δ \end{pmatrix}\end{split}\]

As before, we will need to make sure our state is normalized, meaning:

\[|α|^2 + |β|^2 + |γ|^2 + |δ|^2 = 1\]

What is Entanglement?

If we now have more than one qubit, we can also have a phenomenon called entanglement, where the state of one qubit is dependent on the state of another qubit. Imagine we have two qubits, and we prepare them in the state:

\[|ψ⟩ = \frac{1}{\sqrt{2}}(|00⟩ + |11⟩)\]

If we were to measure the first qubit and we saw that it was in the state 0, then we would immediately know that the second qubit is also in the state 0. Similarly for state 1. This is because the two qubits are entangled, and their states are correlated in such a way that the state of one qubit cannot be described independently of the state of the other qubit.

This quantum entanglement is a key resource for quantum physics, as when combined with superposition it can allow for quantum algorithms that can solve certain problems more efficiently than classical algorithms.

How Can We Visualize a Qubit?

For a single qubit, we can visualize the state of the qubit using the Bloch sphere, which is a sphere where any point on the surface represents a valid quantum state.

To do so, we can represent the state of the qubit in terms of two angles, \(θ\) and \(φ\), calculated from the probability amplitudes \(α\) and \(β\) as follows:

\[θ = 2 \arccos(|α|)\]
\[φ = \arg(β) - \arg(α)\]

We can then plot the point corresponding to these angles on the surface of the Bloch sphere, which gives us a visual representation of the state of the qubit. For example, the state \(|0⟩\) corresponds to the point at the top of the sphere:

../../_images/bloch_light.svg ../../_images/bloch_dark.svg

Other points on the sphere correspond to different superpositions of the \(|0⟩\) and \(|1⟩\) states, such as the state \(|+⟩\) on the equator, which is an equal superposition of \(|0⟩\) and \(|1⟩\).

Further Reading