# Chapter 2 Qubits

About

quantum bitsandquantum circuits, including the “impossible”square root of, as well as an introduction to\texttt{NOT} single-qubit unitariesand rotations of theBloch sphere, and the implications concerninguniversal gates.

When studying classical information theory, one single bit isn’t usually the most interesting object to think about — it’s either **qubit**) opens up a whole world of interesting mathematics.
In fact, **single qubit interference** is arguably one of the fundamental building blocks for quantum computing, and deserves to be thoroughly investigated and understood.

## 2.1 Composing quantum operations

In order to understand something in its full complexity it is always good to start with the simplest case.
Let us take a closer look at quantum interference in the simplest possible computing machine: the one that has only two distinguishable configurations — two quantum states — which we label as **evolve**: the machine undergoes a prescribed sequence of computational steps, each of which induces transitions between the two “computational states”, **operation**) sends state **amplitude**

Thus any computational step **unitary**.^{28}

We can also describe

Now how can we find some quantum interference to study?
Consider two computational steps,

In general, given

If you want to hone your quantum intuition think about it the following way.
The amplitude that input

## 2.2 Quantum bits, called “qubits”

A two-state machine that we have just described in abstract terms is usually realised as a controlled evolution of a two state system, called a quantum bit or a qubit.
For example, state **ground state**), and state **excited state**).
Pulses of light of appropriate frequency, duration, and intensity can take the atom back and forth between the basis states

Some other pulses (say, half the duration or intensity) will take the atom into states that have no classical analogue.
Such states are called **coherent superpositions** of

A **qubit** is a quantum system in which the Boolean states **computational** (or **standard**) basis, and so any other state of an isolated qubit can be written as a coherent superposition

In practice, a qubit is typically a microscopic system, such as an atom, a nuclear spin, or a polarised photon.

As we have already mentioned, any^{29} computational step, that is, any physically admissible operation

## 2.3 Quantum gates and circuits

Atoms, trapped ions, molecules, nuclear spins and many other quantum objects, which we call qubits, can be used to implement simple quantum interference, and hence simple quantum computation. There is no need to learn about physics behind these diverse technologies if all you want is to understand the basics of quantum computation. We may now conveniently forget about any specific experimental realisation of a qubit and just remember that any manipulations on qubits have to be performed by physically admissible operations, and that such operations are represented by unitary transformations.

A **quantum (logic) gate** is a device which performs a fixed unitary operation on selected qubits in a fixed period of time, and a **quantum circuit** is a device consisting of quantum logic gates whose computational steps are synchronised in time.
The **sizes** of the circuit is the number of gates it contains.

Some unitary

This diagram should be read from left to right.
The horizontal line represents a qubit that is inertly carried from one quantum operation to another.
We often call this line a **quantum wire**.
The wire may describe translation in space (e.g. atoms travelling through cavities) or translation in time (e.g. a sequence of operations performed on a trapped ion).
A sequence of two gates acting on the same qubit, say

and is described by the matrix product

## 2.4 Single qubit interference

Let me now describe what is probably the most important sequence of operations performed on a single qubit, namely a generic **single qubit interference**.
It is typically constructed as a sequence of three elementary operations:

- the Hadamard gate
- a phase-shift gate
- the Hadamard gate again.

We represent it graphically as

Hadamard |
||

Phase-shift |

You will see it over and over again, for it is quantum interference that gives quantum computation additional capabilities.^{30}

Something that many explanations of quantum computing say is the following: “quantum computers are quicker because they evaluate all possible solutions at once, in parallel”.
**This is not accurate.**

Firstly, quantum computers are not necessarily “quicker” than classical computers, but can simply implement quantum algorithms, some of which *are* quicker than their classical counterparts.
Secondly, the idea that they “just do all the possible computations at once” is false — instead, they rely on thoughtfully using interference (which can be constructive or destructive) to modify the probabilities of specific outcomes.

*The power of quantum computing comes from quantum interference.*

The product of the three matrices

Given that our input state is almost always ^{31}

## 2.5 The square root of NOT

Now that we have poked our heads into the quantum world, let us see how quantum interference challenges conventional logic.
Consider a following task: design a logic gate that operates on a single bit and such that when it is followed by another, identical, logic gate the output is always the negation of the input.
Let us call this logic gate **the square root of \texttt{NOT}**, or

A simple check, such as an attempt to construct a truth table, should persuade you that there is no such operation in logic.
It may seem reasonable to argue that since there is no such operation in logic, ^{32}

We could also step through the circuit diagram and follow the evolution of the state vector:

Or, if you prefer to work with column vectors and matrices, you can write the two consecutive application of *right to left*)^{33}, where each

One way or another, quantum theory explains the behaviour of ^{34} that corroborate this theory, logicians are now entitled to propose a new logical operation

## 2.6 Phase gates galore

As well as the generic phase gate

Generic phase-shift |
||

Phase-flip |
||

Note that the phase gate ^{35}, and so we can write its matrix either as

The remaining gate (**Pauli operators**, which we will now discuss.

## 2.7 Pauli operators

Adding to our collection of common single-qubit gates, we now look at the three **Pauli operators**^{36}

Identity |
||

Bit-flip |
||

Bit-phase-flip |
||

Phase-flip |

The identity is just a quantum wire, and we have already seen the

In fact, this is just one of the equations that the Pauli matrices satisfy.
The Pauli matrices are unitary and Hermitian, they square to the identity, and they anti-commute.
By this last point, we mean that

These operators are also called **sigma matrices**, or **Pauli spin matrices**.
They are so ubiquitous in quantum physics that they should certainly be memorised.

## 2.8 From bit-flips to phase-flips, and back again

The Pauli

If you wish to verify this, write the Hadamard gate as ^{37}
So the Hadamard gate turns phase-flips into bit-flips, but it also turns bit-flips into phase-flips:

Let us also add, for completeness, that ^{38}

## 2.9 Any unitary operation on a single qubit

There are infinitely many unitary operations that can be performed on a single qubit.
In general, any complex *four* real parameters to specify a

*Yes, we can.*

Any unitary operation on a qubit (up to an overall multiplicative phase factor) can be implemented by a circuit containing just two Hadamards and three phase gates, with adjustable phase settings, as in Figure 2.2.

If we multiply the matrices corresponding to each gate in the network (remember that the order of matrix multiplication is reversed) we obtain

## 2.10 The Bloch sphere

Unitary operations on a single qubit form a group.
More precisely, the set of all ^{39}
That is,

There are many ways to introduce this isomorphism.
Here we will just show how to represent single-qubit state vectors in terms of Euclidean vectors in three dimensions; in Chapter 3 we will actually relate unitary operations on state vectors to rotations in this Euclidean space, demonstrating this isomorphism.^{40}

Any single qubit state can be written as

The parametrisation in terms of

We call this sphere the **Bloch sphere**, and the unit vector **Bloch vector**.^{41}
This is a very useful way to visualise quantum states of a single qubit and unitary operations that we perform on it.
Any unitary action on the state vector will induce a rotation of the corresponding Bloch vector.
But what kind of rotation?

We give a complete answer to this question in Chapter 3, but we might as well give some specific results here first, since some are easy enough to calculate “by hand”.
Note that *any two orthogonal state vectors appear on the Bloch sphere as two Bloch vectors pointing in opposite directions*.
Now, the two eigenvectors of a single-qubit unitary

It is instructive to work out few simple cases and get a feel for the rotations corresponding to the most common unitaries.
For example, it is easy to check that a phase gate

As previously mentioned, the Pauli operator

**!!!TO-DO!!! points on the intersection of the axes with the Bloch sphere are exactly the eigenstates of the corresponding Pauli operator**

How about the Hadamard gate?
Like the Pauli operators, it squares to the identity (

One can show^{42} that the effect of the rotation represented by unitary

### 2.10.1 Drawing points on the Bloch sphere

We know that the state

- Calculate
\lambda=\beta/\alpha (assuming that\alpha\neq0 , since otherwise|\psi\rangle=|1\rangle ). - Write
\lambda=\lambda_x+i\lambda_y and mark the pointp=(\lambda_x,\lambda_y) in thexy -plane (i.e. the plane\{z=0\} ). - Draw the line going through the south-pole and the point
p . This will intersect the Bloch sphere in exactly one other point, and this is exactly the point corresponding to|\psi\rangle .

Note that this lets you *draw* the point on the sphere, but doesn’t (immediately) give you the *coordinates* for it.
That is, this method is nice for geometric visualisation, but the parametrisation method is much better when it comes to actually doing calculations.

## 2.11 Composition of rotations

We are now in a position understand the circuit in Figure 2.2 in geometric terms.
Recall that *any* rotation in the Euclidean space can be performed as a sequence of three rotations: one about the

The first phase gate effects rotation by **Euler’s angles**.

## 2.12 A finite set of universal gates

The Hadamard gate and the phase gates, with adjustable phases, allow us to implement an arbitrary single-qubit unitary *exactly*.
The tacit assumption here is that we have here *infinitely many* phase gates: one gate for each phase.
In fact, we can pick just one phase gate, namely any phase gate ^{43} with

If you want to be *just one* phase gate to *approximate* the *three* phase gates in the circuit in Figure 2.2.

There are other ways of implementing irrational rotations of the Bloch sphere.
For example, take the Hadamard gate and the

For more details on all the above, see Chapter 3.

## 2.13 *Remarks and exercises*

### 2.13.1 Unknown phase

Consider the usual quantum interference circuit:

Suppose you can control the input of the circuit and measure the output, but you do not know the phase shift

Now you are promised that

### 2.13.2 One of the many cross-product identities

Derive the identity

*(Hint: all you need here are the Pauli matrices’ commutation and anti-commutation relations, but it is instructive to derive the identity using the component notation, and below we give a sketch of how such a derivation would go.)*

First, notice that the products of Pauli matrices can be written succinctly as
**Levi-Civita symbol**:

Recall that matrix

U is called**unitary**ifU^\dagger U = UU^\dagger = \mathbf{1} where the**adjoint**or**Hermitian conjugate**U^\dagger of any matrixU with complex entriesU_{ij} is obtained by taking the complex conjugate of every element in the matrix and then interchanging rows and columns (U^\dagger_{kl}= U^\star_{lk} ).↩︎Here we are talking about

*isolated*systems. As you will soon learn, a larger class of physically admissible operations is described by completely positive maps. It may sound awfully complicated but, as you will soon see, it is actually very simple.↩︎Indeed, you have already seen this sequence: recall our study of Ramsey interferometry, and note how this is essentially the same!↩︎

We ignore the global phase factor

e^{i\frac{\varphi}{2}} .↩︎There are infinitely many unitary operations that act as the square root of

\texttt{NOT} .↩︎Just remember that circuits diagrams are read from

*left to right*, and vector and matrix operations go from*right to left*.↩︎We discuss this in more detail in [Appendix:

**!!to-do!!**Physics against logic, via beamsplitters].↩︎In general, states differing only by a global phase are physically indistinguishable, and so it is physical experimentation that leads us to this mathematical choice of only defining things up to a global phase.↩︎

We use the standard basis

\{|0\rangle,|1\rangle\} most of the time, and so often refer to operators as matrices.↩︎\begin{aligned}HXH &= Z\\HZH &= X\\HYH &= -Y\end{aligned} ↩︎Unitaries, such as

H , that take the three Pauli operators to the Pauli operators via conjugation form the so-called**Clifford group**, which we will meet later on. Which phase gate is in the Clifford group of a single qubit?↩︎Note that

\mathrm{U}(1)\cong\mathbb{C}^\times , where\mathbb{C}^\times is the multiplicative group of unit elements of the complex numbers, i.e. the set\mathbb{C}\setminus\{0\} with the group operation given by multiplication.↩︎That is, we have the group

\mathrm{U}(2) acting on the space of single-qubit state vectors, and we have the group\mathrm{SO}(3) acting on the unit sphereS^2\subset\mathbb{R}^3 . In this chapter we will discuss how to go from one*space*(i.e. the thing being acted upon by the group) to the other; in Chapter 3 we will discuss how to go from one*group*(i.e. the thing acting on the space) to the other.↩︎We will revisit this construction again in more detail, and from a slightly different point of view, in Chapter 3.↩︎

That is, there do

*not*exist anym,n\in\mathbb{Z} such thatm\alpha=n\pi . For example, it suffices to take\alpha to be rational.↩︎