Qubits

A qubit, or a quantum bit, is a quantum state that lives in a 2D Hilbert space. This means that qubits are two-dimensional complex vectors and their general state is

$$ \ket \Psi = \alpha \ket 0 + \beta \ket 1 $$

where $\alpha, \beta \in \mathbb C$. This state must be normalized so $\braket {\Psi|\Psi}=1$. Because we can choose to multiply the state by an overall phase without affecting the physics or $\ket \Psi \equiv e^{i\theta}\ket \Psi$, we can set one of the coefficients to be purely real, for example, $\alpha =a$ and $\beta=b+ic$. These two facts then imply that

$$ \begin{align*} 1&=\braket{\Psi|\Psi}\\ &=|\alpha|^2+|\beta|^2\\ &= a^2+b^2+c^2 \end{align*} $$

This condition specifies the space of all possible physically distinct qubits, which has the shape of a unit sphere. We can therefore visualize any qubit as a point on the so-called Bloch sphere. The north pole of the sphere typically corresponds to the basis vector $\ket 0$ and the south pole to the basis vector $\ket 1$.

Bloch sphere

Bloch sphere

We can, in fact, define a given qubit state by determining the angle $\theta$ it makes with the vertical z-axis and the angle $\varphi$ it makes with the x-axis of the Bloch sphere. A general state would look like

$$ \ket \Psi=\cos \left(\frac{\theta}{2}\right)\ket 0+e^{i\varphi}\sin\left(\frac{\theta}{2}\right)\ket 1 $$

There are two other commonly used bases on the Bloch sphere. The one alongside the x-axis is

$$ \begin{align*}\ket +&=\frac{1}{\sqrt2}(\ket0+\ket1)\\\ket -&=\frac{1}{\sqrt2}(\ket0-\ket1)\end{align*} $$

and the one along the y-axis is

$$ \begin{align*}\ket {i+}&=\frac{1}{\sqrt2}(\ket0+i\ket1)\\\ket {i-}&=\frac{1}{\sqrt2}(\ket0-i\ket1)\end{align*} $$

Bloch sphere with different bases

Bloch sphere with different bases

Single Qubit Quantum gates

Just as the classical gates we discussed in Classical Computing , quantum gates take an input based on which they give an output. There are however two important requirements that all quantum gates must meet.

  1. The number of input and output qubits must be equal.

    This is given by the conservation of quantum information.

  2. Both the input and the output must be physical states.

    This means that when the gate acts on an input state and an output is given $\hat O\ket\Psi_\text{in}=\ket\Psi_\text{out}$, the following must be true $\braket{\Psi_\text{in}|\Psi_\text{in}}=\braket{\Psi_\text{out}|\Psi_\text{out}}=1$. Quantum gates are therefore unitary operators, as they preserve the inner product of vectors. Quantum logic gates are thus also reversible, meaning we can always determine the initial input based on the output we receive.

Quantum gates take one qubit and transform it into another. Because these qubits are points on the same Bloch sphere, single qubit quantum gates are equivalent to rotations on the Bloch sphere. Now let’s take a look at some commonly used single-qubit gates.

Identity gate

The Identity gate is a single-qubit gate that leaves the qubit unchanged.

$$ I\ket0=\ket0\\I\ket1=\ket1 $$

Pauli Gates

Each Pauli matrix represents a Pauli gate. The Pauli X-gate also called the quantum NOT gate transforms the basis states as