Chapter 6
Stabiliser theory

In Chapter 5, we already built up a good collection of practical tools for working efficiently with Clifford diagrams and circuits using rewriting. However, this is quite different from the toolkit one more typically encounters in the literature. An alternative way to work with Clifford maps is to focus not on the maps themselves, but rather families of Pauli operators that stabilise them. This approach is sometimes referred to as stabiliser theory or the stabiliser formalism. In this section, we will see that this formalism gives a fully equivalent way to represent and efficiently simulate Clifford maps. In order to do this, we will develop a theory of Pauli projections, which are maps that project onto the + 1 or 1 eigenspace of an n-qubit Pauli operator. Interestingly, these always chop a space precisely in half: the 2n-dimensional space of n qubits can be regarded as the direct sum of two 2n1-dimensional subspaces in the range of a Pauli projection and its orthocomplement. As we’ll see, subsequent commuting Pauli projections will further chop the space in half, until we get all the way down to a 20 = 1 dimensional space. This leads us to what we will call the Fundamental Theorem of Stabiliser Theory in Section 6.2.1, which states that k independent, commuting Pauli operators on n qubits uniquely fix a 2nk-dimensional subspace of (2)n. In particular, when n = k, this gives us a 1D space so that it uniquely fixes a state up to a scalar factor. We will see that these states, often called stabiliser states in the literature, are precisely the Clifford states we saw in Chapter 5. We will also see that all of the interesting things we might want to compute about a stabiliser state, such as its evolution through a Clifford circuit or measurement probabilities, can be computed in terms of its associated Pauli operators. This gives us a powerful second perspective on Clifford maps, which we will apply to quantum error correction and fault-tolerant quantum computation in Chapter 11. In Chapter 7, we will see that Pauli projections induce a related type of map, called Pauli exponentials. These are closely related to phase gadgets and give us a new way to talk about universal quantum computations as well as allowing us to synthesise circuits that simulate physical processes on a quantum computer.

6.1 Paulis and stabilisers

We met the Pauli matrices back in Chapter 2. Here they are again:

X = ( 0 1 1 0 )Y = ( 0 i i 0 )Z = ( 1 0 0 1 )

These are self-adjoint matrices, so they each have a basis of eigenstates. These are respectively:

Z|0 = |0 X|+ = |+ Y |+i = |+i Z|1 = |1 X| = | Y |i = |i

When viewed on the Bloch sphere these six states lie in the corners corresponding to the three principal axes:

(6.1)

Each of these states is uniquely defined (up to global phase) as being the + 1 eigenvector of one of the Pauli matrices. In particular, |0,|+ and |+i are the + 1 eigenvectors of Z,X,Y , respectively, while |1, |−⟩ and |i are the + 1 eigenvectors of Z,X,Y . So while we don’t care about the global phase of the vectors, for this definition of being the + 1 eigenstate, we do care about the global phase of the Pauli operators, since the + 1 eigenvector of Z is |0 while the + 1 eigenvector of Z is |1.

Definition 6.1.1. We say a linear map A is a stabiliser of the state |ψ when A|ψ = |ψ, i.e. when |ψ is a + 1 eigenvector of A.

An important fact about stabilisers is that the product of stabilisers is also a stabiliser. Suppose A|ψ = |ψ and B|ψ = |ψ. Then, AB|ψ = A|ψ = |ψ. For that reason, we’ll soon be interested not in just single operators stabilising a state, but whole groups of them. Each of the Pauli matrices is its own inverse: X2 = Y 2 = Z2 = I, and if we multiply two different Pauli matrices, we get the third one, up to a factor of i:

XY = iZZX = iY Y X = iZXZ = iY
(6.2)

One way to remember this is to think of the Pauli matrices arranged in a cycle:

If we multiply two Paulis going forward in the cycle, we get the third one with a factor of +i, and if we multiply backwards, we get it with a factor of i. Note that from the multiplications of (6.2) we also see that if we have two different Paulis P and Q that then PQ = QP. We say then that these Paulis anti-commute. Accounting for scalar multiples of i, we get a 16-element group, called the single-qubit Pauli group:

P1 = {ikP|k {0,1,2,3},P {I,X,Y,Z}}

We can then ask which subgroups of this group stabilise some state |ψ. The trivial subgroup {I}P1 stabilises everything, so that’s not very interesting. Also, I|ψ = |ψ, so any group containing I doesn’t stabilise anything except the zero state, which is also not very interesting. This rules out the whole group P1 P1, and any group containing ± iP, because (±iP)2 = (±i)2I = I. That leaves just 6 subgroups, corresponding exactly to the 6 points on the Bloch sphere of (6.1):

X,Y ,Z,X,Y ,ZP1

Note we write ⟨...⟩ to mean the subgroup generated by the given operators, so for example X = {I,X}.

Exercise 6.1. Show that X,Y,Z = P1, but X,Z generates a strict subset of P1.

In this section, we will generalise this idea of groups stabilising a state from one qubit to n qubits, by looking at subgroups of the following group.

Definition 6.1.2. The n-qubit Pauli group is defined as follows:

Pn = {ikP 1 Pn|k {0,1,2,3},Pj {I,X,Y,Z}}

We will refer to the elements of the n-qubit Pauli group as Pauli strings, and introduce special notation for them:

P := ikP 1 Pn

Concretely, fixing a Pauli string consists of choosing a global phase from the set {1,+i,1,i} and for each Pj, a Pauli from the set {I,X,Y,Z}. Since each of these choices yields a distinct element of Pn, it follows that |Pn| = 4n+1.

Exercise 6.2. Fix an arbitrary pair of Pauli strings P,Q Pn, where:

P := ikP 1 PnQ := ilQ 1 Qn

Prove the following properties:

a)

P is unitary.

b)

P = P if k is even, otherwise P = P.

c)

P2 = I if k is even, otherwise P2 = I.

d)

P and Q either commute (PQ = QP) or anti-commute (PQ = QP).

For the majority of this chapter and the next one, we will mostly be interested in self-adjoint Pauli strings, i.e. those whose global phase is ± 1. As the name suggests, this implies that P = P. Since Pauli strings are unitaries, being self-adjoint implies that they are also self-inverse, i.e. P2 = I.

6.1.1 Clifford conjugation, a.k.a. pushin’ Paulis

As we first pointed out way back in Example 3.2.2, whenever there are Z or X gates on the input of a Clifford circuit, we can always ‘push them through’ to the outputs using ZX rules. We now know enough about Clifford unitaries to prove this straightforwardly. We saw in Proposition 5.3.14 that any Clifford unitary U can be written as a circuit built out of CNOT, Hadamard, and S gates. Hence, we only need to check that we can push arbitrary single Pauli gates through each of these three. That is, for any single Z or X on any input, we can push it through to Z and X gates on the outputs. For the Hadamard gate, Z pushes through and becomes X and X pushes through to become Z:

For the S gate, Z commutes straight through, whereas X turns into Y :

Note that we picked up the global phase of e2 = i when we used the π-commutation rule (π). Finally, for the CNOT gate, there are 4 cases to consider, corresponding to a Z or X gate on either of the two inputs:

Since we can push any Z or X gate through any Clifford gate, we can push any Y = iXZ gate through as well. Putting these rules together, we can see that, for any Pauli string P and Clifford unitary U, we can push P through U gate-by-gate, getting a (probably different) Pauli string Q on the outputs.

Proposition 6.1.3. For any Clifford unitary U and Pauli string P, there exists a Pauli string Q such that:

or equivalently:

The second equation above, written symbolically as Q = UPU, says that conjugating a Pauli string by a Clifford unitary yields another Pauli string. We will see in Section 6.4 that the converse of Proposition 6.1.3 also holds: any unitary that sends Pauli strings to Pauli strings under conjugation is Clifford. A variation on this result, which will prove to be very useful in this chapter, is that we can use Clifford unitaries to simplify a multi-qubit Pauli string to one that is non-trivial on just one qubit (say Z1).

Proposition 6.1.4. Let P = ±P1 Pn be a non-trivial self-inverse Pauli string. Then there exists a Clifford unitary U such that UPU = Zj for any choice of j.

Proof. The first step will be to find a Clifford unitary that conjugates P to a Pauli string P where Pi{I,Z} for all i. Set V i = I if Pi = I or Pi = Z, set V i = H if Pi = X, and set V i = X(π 2 ) if Pi = Y . Then V := V 1 V n gives V PV = P with the desired property. We will now find a CNOT circuit W such that WPW = ±Zj. The desired unitary is then U := W V , potentially composed with an additional Xj in order to get rid of the unwanted minus sign in ± Zj. We will build W step by step as follows. By assumption P is non-trivial, and hence so is P, which means at least one Pk is non-trivial. If Pj = I, then we add a CNOT from j to k to W (meaning the control is on j and the target is on k). This ensures that there is a Z on qubit j. Now it remains to ‘clean up’ the Z’s on the other qubits. To do this, for every Pk where kj and Pk = Z we apply a CNOT from k to j. □

Example 6.1.5. Suppose we have P = Y XIZ and that we want to find a U that maps it to Z3. First conjugating P with the right single-qubit Cliffords gives us just Z’s and identities and removes the 1 phase:

(6.3)

Then first doing a CNOT from the third qubit to get a Z there, and then adding CNOTs to it to get rid of the Z’s on the other qubits we get the following:

Since any Clifford isometry can be written as a Clifford unitary with some ancilla qubits, the ‘Pauli pushing’ property holds for isometries as well.

Proposition 6.1.6. For any Clifford isometry V : (2)k (2)n and any Pauli string P, there exists a Pauli string Q such that:

Proof. By Exercise 5.14, for any Clifford isometry V , there exists a Clifford unitary U such that:

Since P I I is a Pauli string on n qubits, we can use Proposition 6.1.3 to push it through U:

6.1.2 Stabiliser subspaces

We already noted that, if unitaries A and B both stabilise the same state |ψ, then their product AB also stabilises that state, as AB|ψ = A|ψ = |ψ. Hence, the set of stabilisers of a given state forms a group. In the other direction, if two states |ψ and |ϕ are stabilised by a map A, then:

A(λ|ψ + μ|ϕ) = λA|ψ + μA|ϕ = λ|ψ + μ|ϕ.

This means the set of states stabilised by a group of linear operators always forms a subspace of (2)n.

Definition 6.1.7. For a group S Pn, we define the stabiliser subspace of S as:

Stab(S) := {|ψ|P|ψ = |ψ,P S}

If Stab(S){0}, we call S a stabiliser group.

Note that in our definition of stabiliser group, we have explicitly ruled out those groups which only stabilise the zero state |ψ = 0. This is very convenient because it immediately puts several constraints on which subgroups form stabiliser groups. Most importantly, stabiliser groups are always commutative (a.k.a. Abelian), meaning all of their elements commute.

Proposition 6.1.8. If a subgroup S Pn is a stabiliser subgroup, then:

1..

IS,

2..

P2 = I for all P S, and

3..

S is commutative.

Proof. If I S, then all |ψStab(S) satisfy |ψ = I|ψ = |ψ, so that Stab(S) = {0}. If, for some P, we have P2I, then by Exercise 6.2, P2 = I. But then I S, so again Stab(S) = {0}. Finally, since every element in S is self-adjoint (or equivalently for unitaries, self-adjoint), S must be commutative: PQ = PQ = (QP) = QP. □

Remark 6.1.9. From this proof we in fact see that for any subgroup S Pn, as long as IS, that then S is commutative and it only contains self-adjoint Pauli strings.

Thus we have shown that, in order to stabilise a non-zero subspace, a subgroup of the Pauli group must satisfy several conditions. But are those conditions also sufficient? That is, does any subgroup of the Pauli group satisfying the conditions in Proposition 6.1.8, or by Remark 6.1.9 just the property that IS, form a stabiliser group? As it turns out, the answer is yes, and we can even figure out the dimension of the subspace stabilised by such a group. The key point to figuring this out has to do with number of independent generators of S.

Definition 6.1.10. We say a collection of Paulis P1,,Pk Pn is independent when none of the Paulis can be written as a product of some of the others (even up to global phase), or equivalently, when the Paulis can’t be multiplied together to give ikI for any k, when we only allow each Pauli to appear once in the product.

Exercise 6.3. Let S Pn be a group satisfying the properties of Proposition 6.1.8.

a)

Show that there exists a set of independent Paulis P1,,Pk that generates S.

b)

Show that any Q S can be written uniquely as some product of these Paulis (taking the convention that the “empty product” is equal to I S).

c)

Show that such a product gives Q exactly, and not up to phase.

Hence, we can describe a stabiliser group by a set of independent Paulis that generate it. While n-qubit stabiliser groups may in general be very large, we will see that we can work with them efficiently by representing them as sets of generators.

6.2 Stabiliser measurements

In Section 2.2.4, we defined measurements as sets of projectors that sum up to the identity:

M = {M1,,Mk} iMi = I

We also noted in that section that a self-adjoint operator O always defines such a set of projections, on to each of the subspaces associated with each distinct eigenvalue of O. Any self-adjoint Pauli string P is, in particular, a self-adjoint operator, so we can find such a set of projectors. In fact, these projectors always take a particularly simple form.

Definition 6.2.1. For a self-adjoint Pauli string, we define the associated Pauli projectors as follows:

Π(0) P = 1 2(I + P)Π(1) P = 1 2(I P)

Proposition 6.2.2. The maps Π(k) P for k = 0,1 are projectors and furthermore:

P|ψ = (1)k|ψΠ(k) P|ψ = |ψ
(6.4)

Proof. We can show that (Π(k) P) = Π(k) P and Π(k) PΠ(k) P = Π(k) P by concrete calculation, using the fact that P = P and P2 = I. For (6.4), first assume P|ψ = (1)k|ψ for k = 0,1. Then:

Π(k) P|ψ = 1 2(I + (1)kP)|ψ = 1 2(|ψ + (1)2k|ψ) = |ψ

Conversely, if Π(k) P|ψ = |ψ, then 1 2(I + (1)kP)|ψ = |ψ. Multiplying both sides by 2 gives:

|ψ + (1)kP|ψ = 2|ψ

Subtracting a |ψ from both sides gives (1)kP|ψ = |ψ. Multiplying both sides by (1)k then gives P|ψ = (1)k|ψ. □

In the next exercise, you will prove some facts about Pauli projectors that will come in handy later.

Exercise 6.4. For P,Q self-adjoint Pauli strings, show that Pauli projectors satisfy the following properties:

a)

Π(0) P + Π(1) P = I and Π(0) P Π(1) P = P.

b)

UΠ(k) PU = Π(k) UPU for any unitary U.

c)

PQ = QPΠ(j) PΠ(k) Q = Π(k) QΠ(j) P.

d)

Π(0) PΠ(0) Q = Π(0) PΠ(0) PQ.

e)

Π(0) I = I and Π(1) I = 0.

In this section, we will derive a useful graphical representation for the projectors Π(0) P and Π(1) P. This representation will help us prove the Fundamental Theorem of Stabiliser Theory in the next section, as well as leading naturally to Pauli exponentials, which we’ll introduce in Chapter 7. Rather than directly building the Pauli projectors Π(k) P, we will construct a “controlled” version of the projector, namely a ZX-diagram with the property that, when we plug in the computational basis effect k| to the first output, we’ll be left with the projector Π(k) P. This will give us a handy way to build up projectors for arbitrary Pauli strings from the basic Pauli projectors for X, Y , and Z. We’ll start with Z. The Pauli projectors are simply the projections onto the two Z eigenstates, i.e. the computational basis elements:

Π(0) Z = 1 2(I+Z) = ( 1 0 0 0 ) = |00|Π(1) Z = 1 2(IZ) = ( 0 0 0 1 ) = |11|

So, we want to find a “box” that satisfies this property:

Thanks to the copy law, a single Z-spider will do the job:

More generally, we want to construct a new kind of generator, called a Pauli box that produces the projector Π(k) P when we plug in a computational basis effect k|. We can get the other two basic Pauli boxes, corresponding to projectors Π(k) X and Π(k) Y , by applying unitaries to send the Z eigenstates to X and Y eigenstates, respectively. To do that, let’s ZX-ify the Bloch sphere picture from (6.1).

(6.5)

Note that, while there is one obvious choice for the Z and X eigenstates, using spiders of the opposite colours, we actually have two choices for Y : either using Z phases or (negative) X phases. For our purposes, it will be more convenient to use the X phases, so:

Recall that because the +i| is defined to be the adjoint of |+i, we need to flip the phase to represent the +i|. By conjugating the Z-spider with H or X(π 2 ), we obtain Pauli boxes for X and Y . That is, for P {X,Y,Z}, we have:

(6.6)

For building up generic Pauli strings P, we should also have a trivial Pauli box corresponding to Π(k) I . We can obtain this simply as |0 I. In summary, the four basic Pauli boxes are given as:

Exercise 6.5. Show that:

for P {I,X,Y,Z}.

Curiously, we can also use Pauli boxes to ‘switch on’ the Pauli unitary by plugging in basis elements of the other colour.

Exercise 6.6. Show that:

for P {I,X,Y,Z}.

There is a good reason for this, which we’ll discuss in more detail when we introduce Pauli exponentials in Chapter 7. For now, we’ll see that this gives us everything we need to construct the projectors Π(k) P for longer Pauli strings.

Definition 6.2.3. For a self-inverse Pauli string P = P1 Pn with Pi {I,X,Y,Z}, the associated Pauli box is defined as follows:

Using this definition, we can prove the generalisation of the equation in Exercise 6.5 to any self-adjoint Pauli string P.

Proposition 6.2.4. Pauli projectors can be defined by plugging (normalised) Z-basis effects into Pauli boxes as follows:

Proof. This follows from decomposing the X spider as a number of Z spiders (i.e. X basis elements):

(6.7)

Applying (6.7), we have:

Then, by Exercise (6.6), the diagram above equals 1 2(I + (1)kP) = Π(k) P. □

By unrolling the definition of the Pauli box, we can see that, for any Pauli string P = P1 Pn with Pi {X,Y,Z}, we have:

(6.8)

The general case can be obtained by additionally representing any Pi = I by simply not connecting to the i-th qubit, as we will see in the following example.

Example 6.2.5. The single-qubit and two-qubit Pauli projectors correspond to some simple ZX-diagrams. In particular, for a single qubit it always disconnects:

(6.9)

While Π(0) P for P = X X (abbreviated XX) becomes a 2-to-2 X spider:

(6.10)

Note that for a Pauli string P, if some Pi = I, then the projector does not interact with the qubit i:

(6.11)

Exercise 6.7. Show that the Z Z and X X measurements:

MZ...Z := {Π(k) Z...Z}kMX...X := {Π(k) X...X}k

are defined by the following Pauli projectors:

We conclude this section by noting that Pauli boxes are an example of a more general object, which we call a measure box, that can be used to represent a generic 2-outcome measurement.

Definition 6.2.6. A map M : H 2 H is called a measure box when it satisfies the following identities:

(6.12)

Exercise 6.8. Let M : H 2 H be a measure box.

a)

Show that the following is a projector for k {0,1}:

b)

Show that M0 + M1 = I.

c)

Show that each of the 4 Pauli boxes:

are measure boxes.

d)

Let N : K 2 K be a second measure box. Show that M and N can be combined as follows to form a new measure box satisfying (6.12):

and hence that Pauli boxes for an arbitrary self-adjoint Pauli string P are measure boxes.

Since we’ll use it later, we’ll write down the conclusion of the above exercise explicitly in the following proposition.

Proposition 6.2.7. For any self-adjoint Pauli P, the associated Pauli box satisfies the following equations:

(6.13)

Exercise 6.9. Show diagrammatically that Proposition 6.2.7 implies that Pauli projectors on to different measurement outcomes are orthogonal:

6.2.1 The Fundamental Theorem of Stabiliser Theory

Any self-adjoint Pauli string (except the trivial one I) chops a space into two orthogonal parts: the + 1 eigenspace, a.k.a. the stabiliser subspace, and the 1 eigenspace, a.k.a. the “anti-stabiliser” subspace. It turns out that these spaces have equal dimension, so we can see a single Pauli string P as chopping n-qubit space in half. Hence, the image of the projector Π(0) P (or Π(1) P) is 2n2 = 2n1 dimensional. We can see this explicitly by splitting the projector Π(0) P, i.e. finding an isometry V : (2)(n1) (2)n such that:

Proposition 6.2.8. Let P be a non-trivial self-inverse Pauli string P. Then there exists a Clifford unitary U such that V = U(I I |0) splits Π(0) (1)kP.

Proof. By Proposition 6.1.4, there exists a Clifford unitary U such that U(1)kPU = Zn. Then, by Exercise 6.4, we have UΠ(0) (1)kPU = Π(0) U(1)kPU = Π(0) Zn. As V = U(I I |0) is then a normalised state followed by a unitary, it is an isometry. We can show directly that it splits Π(0) (1)kP:

As this proposition shows that a potential minus sign on the Pauli can be incorporate into the splitting isometry, we will just ignore these minus signs in this section and without loss of generality assume that every Pauli string has a constant of + 1. If we split Π(0) P as V V , then Π(0) PV = V V V = V . Hence, for any state |ϕ on n 1 qubits we have Π(0) P(V |ϕ) = V |ϕ, so that V |ϕ is stabilised by P for any choice of |ϕ. Conversely, when Π(0) P|ψ = |ψ then |ψ = V (V |ψ) so that taking |ϕ = V |ψ shows that any stabilised state is of this form. We then see that Stab(P) = {V |ϕ||ϕ 2n1 } where we have written P for the stabiliser group generated by P. We hence have shown the following.

Proposition 6.2.9. Let P Pn be a non-trivial self-inverse Pauli string. Then dim Stab(P) = 2n1.

Now we claim that this ‘splitting’ of the 2n-dimensional Hilbert space into 2n1-dimensional parts continues on if we have an additional independent commuting Pauli. In particular, if we have two independent commuting self-inverse Paulis P and Q, then we claim that dim Stab(P,Q) = 2n2. This follows from the next lemma.

Lemma 6.2.10. Let P,Q Pn be commuting self-inverse Pauli strings. Then there exists a Clifford unitary U and Pauli string QPn1 such that:

Proof. The U from Proposition 6.2.8 is such that P = UZnU, and hence:

Π(0) QΠ(0) P = UUΠ(0) QUUΠ(0) PUU = UΠ(0) QΠ(0) ZnU,
(6.14)

where Q = UQU. Now, as Q and P commute, the Pauli strings that result from conjugating by the same unitary will also commute. Hence, Q commutes with Zn. This can only be the case when Qn = I or Qn = Z. In both cases we then have:

(6.15)

Note that we still write Q to denote Q where the nth Pauli is removed to get a string of length n 1. We then calculate:

If Q is independent from P, then the Q we get here in this lemma is non-trivial, so that we can then also split Π(0) Q using Proposition 6.2.8. We then end up with n 2 wires in the middle, showing that indeed dim Stab(P,Q) = 2n2. We can now iterate this procedure, so that if we have k independent commuting Pauli strings, that the states they mutually stabilise has dimension 2nk. In fact, this result is so crucial to this chapter, that we will give it a grand name: the Fundamental Theorem of Stabiliser Theory.

Theorem 6.2.11. Let P1,,Pk be independent commuting self-adjoint Pauli strings on n qubits. Then there exists a Clifford unitary U such that:

(6.16)

Consequently, letting S denote the group generated by the Pj, we see that dim Stab(S) = 2nk.

Proof. We prove this by induction on k. The case of k = 1 is just Proposition 6.2.8. So suppose we know Eq. (6.16) holds when we have k 1 independent generators. Then let U1 be a Clifford unitary such that U1P1U1 = Zn. We can then use an argument similar to that of Lemma 6.2.10 to write:

Here Qj = U1PjU1. In order to use the induction hypothesis on Q2,,Qk we need to show that they are still commuting and independent when we are ignoring the last qubit. First note that because we conjugated them all with the same unitary U1 that Zn,Q2,,Qk are all still commuting and independent (not ignoring the n-th qubit). As a result each of the Qj has either an I or Z in the nth position. This means that they all commute on the n-th position, and hence the Qj must also be commuting when we ignore this last qubit. Additionally, no product of Q2,,Qk can result in Zn due to the them being independent of Zn, so that no product of the Qj can result in I when we ignore the last qubit. Hence, now ignoring the nth qubit, the Qj are independent and commuting, so that we can use the induction hypothesis. We then simply combine the resulting unitary U with U1, and we are done. □

There is a bunch of important results that follow from this theorem. First, it allows us to bound how many independent commuting Pauli strings there can be.

Corollary 6.2.12. If P1,,Pk is a set of commuting independent Pauli strings on n qubits, then k n.

Proof. Suppose k is at least n + 1. Then applying the proof of Theorem 6.2.11 to the first n + 1 generators, we end up in the following situation once we have repeated the procedure n 1 times:

We see that we end up with single-qubit Pauli projectors Π(0) Qn and Π(0) Qn+1 that must be commuting, but also independent. But such single-qubit Paulis don’t exist, so we have reached a contradiction. □

This corollary allows us to answer the question we raised before: any subgroup of the Paulis satisfying the properties of Proposition 6.1.8 does in fact stabilise at least some non-zero state.

Corollary 6.2.13. Let S Pn be a subgroup satisfying the properties of Proposition 6.1.8. That is, it is commutative, consists only of self-adjoint Pauli strings, and does not contain I. Then S stabilises at least one non-zero state, and hence is a stabiliser group.

Proof. By Exercise 6.3, S is generated by independent Paulis P1,,Pk. Since S is commutative, all these Pj must also commute. Hence, the previous corollary applies and we must have k n. Then Theorem 6.2.11 tells us that dim Stab(S) = 2nk 20 = 1, so that there is at least a 1-dimensional space of states that are stabilised by S. □

In fact, recall from Remark 6.1.9 that as long as IS, the other properties of Proposition 6.1.8 are also satisfied, so any subgroup of Pn that does not contain I stabilises some non-zero state! We then also get the following corollary.

Corollary 6.2.14. Any set of commuting independent self-adjoint Pauli strings generates a stabiliser group.

Proof. By definition of independence there is no non-trivial product of independent Pauli strings that produces I, so that I is not in the group. Hence, the previous corollary applies so that we see that it is a stabiliser group. □

Some other major corollaries we will study in detail in the next section.

Exercise* 6.10. Generalise Equation (6.16) to account for other Pauli measurement outcomes. That is, show that:

for any s = (s1,,sm).

When Paulis commute, their projections cut down the space of states they jointly stabilise. However, when they do not commute, then the second projection can be seen as applying a unitary to the space.

Exercise 6.11. Let P and Q be two self-adjoint Pauli strings that anti-commute.

1..

Show that U = 1 2(P + Q) is unitary and self-adjoint and that UQ = P.

2..

Show that U is Clifford by proving that URU is Pauli for any Pauli string R. Hint: Make a case distinction on whether R (anti-)commutes with P and or Q.

3..

Show that Π(0) PΠ(0) Q = 1 2UΠ(0) Q = 1 2Π(0) PU.

4..

Show that if |ψ is an eigenstate of Q, that then the measurement {Π(k) P} has both outcomes occur with probability 1 2. Hint: Recall that the probability is given by ψ|Π(0) P|ψ. Now use the fact that |ψ = Π(0) Q|ψ for both |ψ and ψ|.

6.3 Stabiliser states and the Clifford group

In this section we will look at states that are uniquely determined by the Pauli strings that stabilise them. That such states exist follows from Theorem 6.2.11, as we will show next. We will then look at the unitaries that map Pauli strings into Pauli strings. These unitaries form the Clifford group, and as the name suggests these are related to the Clifford unitaries we studied in Chapter 5 (in fact, they are the same thing).

6.3.1 Maximal stabiliser groups

Theorem 6.2.11 shows that if the number of generators of S Pn is k, that its stabiliser subspace has dimension 2nk. This means that if the number of generators is exactly n, that its isometry V goes from 0 wires to n wires. But then V is just an n-qubit state! So let’s write V = |ψ. Then the projector onto the stabiliser subspace of S is |ψψ|. In other words: the only normalised state (up to global phase) that is stabilised by S is |ψ.

Corollary 6.3.1. Let S Pn be a stabiliser group with n generators. Then it stabilises a unique non-zero state (up to scalar).

From Theorem 6.2.11 it also turns out that no stabiliser group can have more than n generators. Before we prove this it will be helpful to define a new class of stabiliser group.

Definition 6.3.2. We say a stabiliser group S is maximal when it is not strictly included in another stabiliser group. Equivalently, for any self-inverse QS that commutes with all of S there must be a P S such that QP = I.

Proposition 6.3.3. Any maximal stabiliser group has exactly n generators.

Proof. Suppose S is a stabiliser group with k < n generators. We will show that it is not maximal, which will prove our claim. Note that the right-hand side of Eq. (6.16) says that we can write the projection to Stab(S) as UΠ(0) Znk+1Π(an) Zn U, and hence that we can take Pj := UZnjU for j = 1,,k to be a set of generators for S. Now, let Q be any non-trivial Pauli string on n k qubits. Then Q = Q I2k commutes with all the Znk+1,,Zn, and is also independent of this set. Hence UQU is also independent from all the UZnjU = Pj, and also still commutes with them. Hence, the stabiliser group generated by Q,P1,,Pk strictly includes S, so that S is not maximal. □

Corollary 6.3.4. The following are equivalent for a stabiliser group S on n qubits.

6.3.2 Stabiliser states

A maximal stabiliser group stabilises a unique state. Such states turn out to be very special, so we will give them a special name.

Definition 6.3.5. We say a non-zero state is a stabiliser state if there is a maximal stabiliser group that stabilises it.

It might seem hard to determine when a state is stabilised by a maximal stabiliser group. Luckily, Corollary 6.3.4 offers an easier way to figure out when a state is stabiliser.

Proposition 6.3.6. Let |ψ be a non-zero n-qubit state. Then |ψ is a stabiliser state if and only if it is stabilised by n independent Pauli strings.

Proof. Suppose |ψ is a stabiliser state, so that it is stabilised by a maximal stabiliser group S. Then Corollary 6.3.4 shows that S has n generators. These generators are independent Pauli strings that stabilise |ψ. Conversely, suppose |ψ is stabilised by n independent Pauli strings. Then these Pauli strings generate a stabiliser group, that again by Corollary 6.3.4 must be a maximal group, so that |ψ is indeed a stabiliser state. □

Example 6.3.7. Let |Ψ := 1 2(|00 + |11) be the maximally entangled Bell state. This state is stabilised by ZZ and XX. Indeed

(Z Z)(|00 + |11) = (Z|0) (Z|0) + (Z|1) (Z|1) = |0|0 + (|1) (|1) = |00 + |11,

and (X X)(|00 + |11) = |11 + |00 = |00 + |11. As |Ψ is a two-qubit state that is stabilised by two independent Pauli strings, it is hence a stabiliser state.

Example 6.3.8. Any graph state is a stabiliser state: recall that in a graph state |G we have a one-to-one correspondence between qubits and the vertices of G. We claim that the Pauli string Pv := Xv wN(v)Zw is a stabiliser of |G, where N(v) denotes the neighbourhood of the vertex v, which is the set of vertices of G that are connected to v. As a Pauli string this stabiliser has an X on the qubit corresponding to v and a Z on every qubit that is connected to X. We can easily check this is a stabiliser of |G by writing the graph state as a ZX-diagram, and pushing the X into the graph state using (π) and (cc):

Exercise 6.12. Suppose |ψ is a stabiliser state, which is stabilised by maximal stabiliser groups S and S. Prove that S = S.

Recall from Chapter 5 that we defined a Clifford state to be any state of the form U|00 for some Clifford unitary U, and that these correspond to Clifford ZX-diagrams with no inputs. Observe that the isometries of Theorem 6.2.11 that split the projector onto a stabiliser subspace are Clifford diagrams. In particular, for a maximal stabiliser group, the isometry is a state, and hence is a Clifford state. We then have the following.

Proposition 6.3.9. Any stabiliser state is a Clifford state (up to potentially some non-zero scalar). That is, up to a scalar, we can represent any stabiliser state by a Clifford ZX-diagram.

The converse is also true: any Clifford state is a stabiliser state. Recall from Theorem 5.3.8 that we can rewrite any Clifford state to a graph state with local Cliffords. Example 6.3.8 shows that all graph states are stabiliser states, so to prove that any Clifford state is a stabiliser state it remains to show that (local) Cliffords send stabiliser states to stabiliser states. This turns out to follow from the property of Clifford unitaries we proved in Section 6.1.1, namely that conjugating a Pauli string by a Clifford results in another Pauli string.

Proposition 6.3.10. Let |ψ be a stabiliser state and let U be a Clifford unitary. Then U|ψ is also a stabiliser state.

Proof. Let |ψ be an n-qubit stabiliser state and let P1,Pn be a maximal set of independent stabilisers of |ψ. Then we claim that the Qk := UPkU are independent stabilisers of U|ψ so that U|ψ is indeed a stabiliser state. First note that the Qk are all Pauli strings because of Proposition 6.1.3. Second, they are indeed stabilisers of U|ψ as QkU|ψ = UPkUU|ψ = UPk|ψ = U|ψ. Finally, note that they are independent since if we had I = kjQkj then I = UU = kjUQkjU = kjPkj, which contradicts the independence of the Pk. □

So stabiliser states and Clifford states are exactly the same thing!

Proposition 6.3.11. Any Clifford state is a stabiliser state, and vice versa any stabiliser state is proportional to a Clifford state.

6.3.3 The Clifford group

The property we used to prove Proposition 6.3.10 above was that conjugations of Pauli strings by Cliffords produces Pauli strings. This is in fact quite a useful property that we have used many times throughout this chapter and the previous, so it is worthwhile to try and understand this a bit better. In particular, can we find more unitaries than just the Cliffords that have this property? For our next definition we need to know a little more group theory. Consider a group G with a subgroup H. An element g G normalises H when g1hg H for every h. For instance, every h H normalises H, and if G is abelian, then every element of G normalises H. We write NG(H) for the set of elements of G that normalises H.

Exercise 6.13. Show that NG(H) is a subgroup of G and that H NG(H).

We can now define the Clifford group.

Definition 6.3.12. We say an n-qubit unitary U is Pauli normalising when it normalises Pn. That is, when for every P Pn we have UPUPn. We write N(Pn) for the group of Pauli normalising unitaries.

The group of Pauli-normalising unitaries is usually just called the Clifford group. However, as we already defined the term ‘Clifford unitaries’, we will not use the term Clifford group for now. Rest assured though that there is in fact a reason for the conflict in the naming scheme, as it turns out that Clifford unitaries and Pauli-normalising unitaries are the exact same thing. One direction of this equivalence we already have:

Example 6.3.13. Proposition 6.1.3 shows that every Clifford unitary is Pauli normalising.

The remainder of this section will work towards proving the converse.

Exercise 6.14. Show that the conjugation of a self-adjoint Pauli string by a Pauli-normalising unitary is also self-adjoint.

The Z(π 2 ) phase gate is Clifford and hence Pauli normalising. What other Z phase gates are Pauli normalising? Consider the phase gate Z(α) = diag(1,e). Conjugating Z by this gate of course preserves Z as they commute, so it remains to check the case for X:

The only way for this to be equal to a Pauli is for the phase 2α to be equal to 0 or π. Hence, we get α = 0 (the identity), α = π (the Z Pauli), α = π 2 (the S gate), or α = π 2 (the adjoint of S). There are no other Z phase gates that are Clifford! By symmetry (i.e. colour-changing the spiders) the same situation of course also holds for X phase gates: only X(α) gates with α a multiple of π 2 are Pauli normalising. This seems to point towards ZX-diagrams only being Pauli normalising if all the phases involved are multiples of π 2 , and this is in fact exactly right.

Definition 6.3.14. Let U be an n-qubit unitary. We denote by |U the 2n-qubit Choi state that we get by applying U to one side of n nested cups (i.e. Bell states):

Lemma 6.3.15. Let U be a Pauli-normalising unitary. Then |U is a stabiliser state.

Proof. Let Pk be the Pauli string such that ZkU = UPk and similarly let Qk be such that XkU = UQk. Then we claim that PkT Zk and QkT Xk are stabilisers for |U. Here PkT denotes the componentwise transpose of the Paulis in Pk, such that ZT = Z, XT = X, and Y T = Y . That these are stabilisers is best demonstrated diagrammatically:

Here, the Z is taken to appear on the (n + k)th qubit. The same computation works for QkT Xk. We then have 2n stabilisers for a 2n-qubit state. It is easily seen that these are all independent as they all have a unique non-I component on the bottom n qubits. Hence, by Proposition 6.3.6, |U is a stabiliser state. □

Proposition 6.3.16. A Pauli-normalising unitary is Clifford.

Proof. Let U be Pauli normalising. Then |U is a stabiliser state, so that by Proposition 6.3.9 we can represent |U by a Clifford ZX-diagram. Then by bending the top wires in |U back to be inputs, we can also represent U as a Clifford ZX-diagram. Proposition 5.3.14 then shows that U must be equivalent to a circuit of CNOT, Hadamard and S gates. □

6.3.4 Putting it all together

We have now seen a lot of different perspectives, definitions and equivalences between them, so let’s summarise what we have learned.

Theorem 6.3.17. Let U be a unitary. The following are equivalent:

a)

U is Pauli normalising.

b)

The Choi state |U of U is a stabiliser state.

c)

U can be presented as a Clifford diagram.

d)

U is equivalent to a circuit consisting of Hadamard, S and CNOT gates.

Proof. a) to b) is Lemma 6.3.15, b) to c) follows from Proposition 6.3.9, c) to d) is Proposition 5.3.14 and d) to a) is Proposition 6.1.3. □

Because of these equivalences we don’t have to make a distinction between Pauli-normalising unitaries, Clifford unitaries (those built from CNOT, Hadamard and S), and Clifford unitary diagrams (those whose diagram only contains π 2 phases), and just refer to any of these as a Clifford unitary. We can write down a similar set of equivalences for stabiliser states.

Theorem 6.3.18. Let |ψ be a state. The following are equivalent:

a)

|ψ is a stabiliser state.

b)

|ψ can be presented (up to non-zero scalar) as a Clifford diagram (that has no inputs).

c)

|ψ is equal (up to non-zero scalar) to a circuit of Hadamard, S and CNOT gates applied to the |00 state.

d)

|ψ can be written as a graph state with local Cliffords.

Proof. a) to b) is Proposition 6.3.9, b) to c) is Proposition 5.3.10, c) to d) is Theorem 5.3.8 and d) to a) follows from Example 6.3.8 and Proposition 6.3.10. □

6.4 Stabiliser tableaux

We’ve seen that an n-qubit unitary is Clifford if and only if it maps every n-qubit Pauli string to a Pauli string under conjugation. There are exponentially many Pauli strings as n increases, but luckily we only have to check a few of them to verify the unitary is Clifford. In particular, it suffices to check that the Zi and Xi are mapped to Pauli strings under conjugation. This gives us 2n conditions to check for an n-qubit unitary. We can present the resulting information in the form of a table that we call a stabiliser tableau. This is what we will look at in Section 6.4.2. Another way to present this information is as a special type of matrix that is called a symplectic matrix. This is what we will look at in Section 6.4.4. Before we do so however, let’s look a bit closer at the information encoded by knowing the result of these Pauli conjugations.

6.4.1 Cliffords are determined by Pauli conjugations

We will show that a Clifford unitary is completely determined by its action on Pauli strings.

Proposition 6.4.1. Let U1 and U2 be Cliffords such that U1PU1 = U2PU2 for all Pauli strings P Pn. Then U1 = eU2 for some global phase α.

Proof. By Lemma 6.3.15, |U1 and |U2 are stabiliser states. Fix P and let Q be such that U1P = QU1. Then we can check that PT Q is a stabiliser of |U1 in the same way as in Lemma 6.3.15. Since U1PU1 = U2PU2 we also have U2P = QU2, and hence PT Q is also a stabiliser of |U2. As P was arbitrary, |U1 and |U2 have the same stabilisers and hence are equal up to a global phase α. Bending the wires back then shows that U1 = eU2. □

We have been using two similar properties interchangeably: that a Pauli is mapped to a Pauli under conjugation, and that we can push a Pauli through a Clifford to get another Pauli. However, the equivalence between these relies on the map being unitary. It turns out that we can recover unitarity just by looking at whether we can push the Zi and Xj through the map.

Lemma 6.4.2. Let A : 2n 2m be a non-zero linear map such that AZi = PiA and AXj = QjA for all i and j, and some Pauli strings Pi and Qj. Then A is proportional to an isometry. In particular, if n = m, then A is proportional to a unitary.

Proof. Taking adjoints in the equation AZi = PiA we get ZiA = APi. We then calculate: AAZi = APiA = ZiAA. Analogously, AAXj = XjAA for all j. We can then check that the 2n-qubit state |AA has the 2n stabilisers ZiZn+i and XiXn+i for all 1 i n so that it is a stabiliser state. Furthermore, these stabilisers match those of |In, where In is the n-qubit identity (|In is just n overlapping cups, connecting qubit i to i + n). Hence AA = eIn for some α. However, as AA is a positive map, we must have α = 0 so that A is indeed an isometry. Now if n = m then we have an isometry from the space to itself, and these maps are necessarily unitary. □

This lemma will prove useful later in this section.

6.4.2 Stabiliser tableaux

To check whether an n-qubit unitary is Clifford there are 2n conditions we need to check, corresponding to the conjugation of each of the Zi and Xi Pauli strings by the unitary for 1 i n. We can write this information succinctly in a table known as a stabiliser tableau. To demonstrate this principle let’s construct the stabiliser tableau for the CNOT gate. As it is a 2-qubit gate there are 4 conditions we need to check, corresponding to the conjugation of X1, Z1, X2 and Z2 by the CNOT. As demonstrated in Section 6.1.1, conjugating X1 leads to the Pauli string X1X2 and similarly Z1 is mapped to Z1, X2 to X2 and Z2 to Z1Z2. Each of these values corresponds to a column in the stabiliser tableau, which we can now write down:

Z1 Z2 X1 X2 ± + + + + 1 Z Z X I 2 I Z X X
(6.17)

The bottom two rows indicate the Pauli that each of the Pi is sent to on each of the qubits 1 and 2. The row labelled ± denotes whether the Pauli is sent to the Pauli listed, or minus that. For instance, conjugating Z by X gives XZX = ZXX = Z, and hence would have a minus sign in the respective column. This phase can indeed only be a + 1 or 1: the Zi and Xi are self-adjoint, and hence so are UZiU and UXiU. These minus signs are important as they allow us to distinguish the Paulis just from their tableaux:

I : Z1 X1 ± + + 1 Z X X : Z1 X1 ± + 1 Z X Z : Z1 X1 ± + 1 Z X Y : Z1 X1 ± 1 Z X
(6.18)

We can use a stabiliser tableau to understand how the unitary acts on other Pauli strings than just those present in the tableau. For instance, suppose we wish to know how the Pauli string X1Y 2 is changed when we conjugate it by a CNOT. We realise that X1Y 2 is just the product iX1X2Z2 and hence, writing U = CNOT, we get:

U(X1Y 2)U = iU(X 1X2Z2)U = iUX 1UUX 2UUZ 2U.

But this latter expression is just the product of the three columns of the stabiliser tableau of the CNOT corresponding to X1, X2 and Z2 (multiplied by a global factor of i). So we look at those columns in (6.17) and multiply them together:

i ( + X X )( + I X )( + Z Z ) = i ( + + + XZ XXZ ) = ( + Y Z )

Hence, XY is mapped to Y Z. If some of the +’s in these columns where , then the standard rules for multiplying phase applies, e.g. “negative times negative is positive”. For instance, if we take the stabiliser tableau of Y in (6.18), and wish to find the action of Y 1 = iX1Z1, we multiply the columns together as follows:

i ( X )( Z ) = i ( + XZ ) = ( + Y )

We then see that when Y is conjugated by Y we get Y , as we would expect. The information presented in a stabiliser tableau is enough to fully characterise a Clifford.

Proposition 6.4.3. Let U1 and U2 be two n-qubit Clifford unitaries. Then U1 and U2 are equal up to global phase iff they have equal stabiliser tableaux.

Proof. Of course, if U1 = eU2 for some global phase α, then they have equal stabiliser tableaux, so let’s prove the converse. We have U1ZiU1 = U2ZiU2 and U1XiU1 = U2XiU2 for all 1 i n. These Zi and Xi generate all n-qubit Pauli strings and hence we have U1PU1 = U2PU2 for all P Pn. The result then follows from Proposition 6.4.1. □

Suppose we have a stabiliser tableau for a unitary U1 and another one for a unitary U2. Can we then easily construct the tableau for the composition of the unitaries U2 U1? Suppose we wish to know the column in the stabiliser tableau of U2 U1 corresponding to a Zi. This is the Pauli string U2U1ZiU1U2. Here the inner expression U1ZiU1 corresponds to the column of Zi in the tableau of U1. This will be some Pauli string P1P2Pn, and so we need to know the values U2PjU2 and multiply these together. But the expressions U2PjU2 can be easily read from the tableau of U2. This means that in order to know the Pauli on the jth qubit of the Zi column in the tableau of U2U1, we need to look at the column of Zi in U1, and at the row corresponding to the jth qubit of the tableau of U2. This feels quite like matrix multiplication. In the next sections we will see that this is in fact, exactly like matrix multiplication.

6.4.3 Paulis as bit strings

We can represent elements of the Pauli group as certain bit strings. For instance, we will write:

X = (0|1)+ Y = (1|1)+ Z = (1|0)+ 
(6.19)

Generally, an element of the n-qubit Pauli group Pn will be represented as a vector of 2n bits, followed by an integer that is taken modulo 4:

sP1 Pn = (z|x)s .
(6.20)

Here, the bits in the length-n bit strings z,x are given by the Paulis Pi via the relation Pi = izixiZziXxi where zi,xi are the ith bits of z and x and s is a complex number in the set {1,i,1,i}. As a shorthand, we write + and - for 1 and 1. This mapping between Pauli operations and bit strings is just a convention, and there are probably other ones that work just as well. The useful feature of this representation is that multiplication of Pauli group elements corresponds to addition of bit strings modulo-2, followed by some book-keeping to get the correct scalar: if we have Pauli strings P and Q represented as bit strings P = (z1|x1)a  and Q = (z2|x2)b , then:

PQ = (z1 z2|x1 x2)c wherec := iz1 x2z2x1 ab
(6.21)

We will use the notation to represent combining bit-representations of Pauli operators in this way. That is:

(z1|x1)a  (z2|x2)b  := (z1 z2|x1 x2)iz1x2z2x1ab 

A little “gotcha” to watch out for here is that addition of the bit strings is performed modulo-2, but the dot products that appear in the exponent of i use normal addition of integers (or addition modulo 4, since i4 = 1). Instead of talking about ‘bit strings’ and ‘addition modulo-2’ it will be helpful to use a more mathematical way of talking about this, just like we had done in Chapter 4. We take the bits to be elements of field with two elements 𝔽2 := {0,1}. Recall from Definition 4.1.1 that the addition operation in this field is defined by 0 + 0 = 0,0 + 1 = 1 + 0 = 1,1 + 1 = 0, and the multiplication is the standard multiplication of the numbers 0 and 1. As this is a field, we can view the bit strings as being part of a vector space over 𝔽2. In particular, ignoring the global phases for now, we can represent n-qubit Pauli strings as elements of the vector space 𝔽22n. We can use these bit-representations to read off whether two Paulis commute or not. For Paulis P = (z1|x1)a  and Q = (z2|x2)b  we have

PQ = QPz1 x2 z2 x1 = 0 (mod 2).

The reason for this formula is that we are counting the number of places where there is a Z on a qubit i in P that matches to an X on a qubit i in Q (and vice versa for X’s on P and Z’s on Q). Each of these matches results in an anti-commutation, but as long as there are an even amount, the Pauli strings commute. It turns out that the expression z1 x2 z2 x1 fits into the language of a well-studied subject in mathematics: symplectic forms.

Definition 6.4.4. Let 𝔽 be a field (such as 𝔽2), and let V = 𝔽2n be an even-dimensional vector space over this field. Then the symplectic inner product ω : V × V 𝔽 on V is defined as

ω((a,b),(c,d)) = a d b c,

where a,b,c,d 𝔽n are arbitrary vectors and denotes the standard dot-product of elements of 𝔽na d = iaidi.

In words: we take the dot product of the top half of the first vector with the bottom half of the second vector and subtract from this the dot product of the bottom half of the first vector with the top half of the second vector. Another way we could have written this symplectic product is to realise that it is essentially the standard dot product, except that we have interchanged the top and bottom half of the second vector and introduced a negation. The matrix that does this operation is the following:

Ω := ( 0n In In 0n )
(6.22)

Here, 0n and In are respectively the n × n zero matrix and the n × n identity matrix. We can then write the symplectic inner product as v,w = vT Ωw. Note that if 𝔽 = 𝔽2 then a d b c = a d + b c (because 1 = 1 modulo 2). So combining what we’ve seen so far we see that we can represent length n Pauli strings as elements of the symplectic vector space 𝔽22n (ignoring global phase), and that Pauli strings commute precisely when their symplectic inner product is zero. Additionally, the multiplication of Paulis corresponds (when we ignore phases) to addition of the vectors in this symplectic vector space. Let’s capture this in the following proposition.

Proposition 6.4.5. Let Pn be the n-qubit Pauli group. Then there is a group homomorphism S : Pn 𝔽22n given by mapping a Pauli to its bit string representation. The kernel of this representation is given by the global phases: S(P) = 0 iff P = ikI. Furthermore, we have S(P),S(Q) = 0 iff P and Q commute, where ⟨⋅,⋅⟩ is the symplectic inner product on 𝔽22n.

6.4.4 Cliffords as symplectic matrices

We have now seen that we can just treat Pauli strings as vectors in a symplectic vector space, and that, up to a phase, multiplying Pauli strings corresponds to adding their bit strings. If we have a Clifford unitary U, then this maps a Pauli string P to another Pauli string UPU, so we should be able to write this as a map on the symplectic vector space as well, right? Let’s write Û : Pn Pn for the group homomorphism on the Pauli group given by conjugating by U. That is, Û(P) = UPU (this is indeed a group homomorphism as UPQU = UPUUQU). Note that Û is in fact an isomorphism, as it has an inverse U^. Let S : Pn 𝔽22n be the map from Proposition 6.4.5 that maps a Pauli string to its corresponding bit string in the symplectic vector space. Ignoring the phases in Pn, this map is an isomorphism of (abelian) groups. We can then make a ‘choice of inverse’ T : 𝔽22n Pn by setting

T(z,x) := izx(Zz1 Zzn )(Xx1 Xxn ).

Note that this map produces self-adjoint Pauli strings, but that the map is not a group homomorphism (you can check that T(1,1)T(1,0)T(0,1)). We see then that S T = id𝔽22n, but in the other direction we only have TS(P) P. Now let’s write Ŝ(U) : 𝔽22n 𝔽22n for the map Ŝ(U) := S Û T. What properties does this map have? Even though T is not a group homomorphism, it is the case that Ŝ(U) is a group homomorphism of 𝔽22n, i.e. a linear map: Ŝ(U)((z1,x1) + (z2,x2)) = Ŝ(U)(z1,x1) + Ŝ(U)(z2,x2). This is because T is a group homomorphism ‘up to phase’, and both Û and S don’t care about this phase, so that it doesn’t change the outcome. Additionally, Ŝ(U) has an inverse Ŝ(U) so that it is in fact a linear isomorphism. But it is not just any isomorphism. If the Pauli strings P and Q commute, then Û(P) and Û(Q) also commute, and similarly, if they didn’t commute, then Û preserves this property as well. We saw in the previous section that commuting Paulis are mapped by S to vectors whose symplectic inner product is zero. So putting these two facts together, we see that Ŝ(U) must be mapping vectors in such a way to preserve the symplectic inner product. There is a special name for such maps.

Definition 6.4.6. Let 𝔽 be a field, and let 𝔽2n be a symplectic vector space. We call a linear map A : 𝔽2n 𝔽2n symplectic when it preserves the symplectic inner product: Av,Aw = v,w. Symplectic maps are automatically invertible, and hence form a group that we will call Sp(𝔽2n).

For Hilbert spaces we care a great deal about unitaries, which are maps that preserve the inner product. Similarly, for symplectic vector spaces, we care about the maps that preserve the symplectic inner product. As Û preserves commuting Paulis, Ŝ(U) must be a symplectic map. Writing Cn for the n-qubit Clifford group, Ŝ then gives a group homomorphism Ŝ : Cn Sp(𝔽22n). This map is not injective, and that’s because 𝔽22n captures the Pauli group only up to phase. A Clifford U is in the kernel of this homomorphism, i.e. Ŝ(U) = I𝔽22n, when Û maps every Pauli to itself up to a phase. This phase can only be ± 1 for each Pauli, as a Clifford maps self-adjoint Paulis to self-adjoint Paulis under conjugation. The Pauli strings themselves are examples of Cliffords that are sent to the kernel. When U = P is a self-adjoint Pauli string, we see that indeed UQU = PQP = ±PPQ = ±Q, so that Ŝ(U) = I𝔽22n. The converse turns out to also be true.

Proposition 6.4.7. Let U be a Clifford such that for every Pauli string P we have UPU = ±P. Then U is itself a Pauli string (up to global phase).

Proof. Write Û for the conjugation map. We will construct a Pauli string Q that acts the same on all Paulis by conjugation as Û, and hence by Proposition 6.4.1, U must be equal to Q up to global phase. First we determine Q1. Write Û(X1) = aX1, Û(Z1) = bZ1 for a,b {1,1}. Then if a = b = 1, we set Q1 = I. If a = 1 and b = 1, we set Q1 = Z. If a = 1 and b = 1 we set Q1 = X, and finally if a = b = 1 we set Q1 = Y . It is then easy to check that Û(P1) = Q^(P1) for any Pauli P {I,X,Y,Z}. We similarly set Q2,,Qn, so that Û and Q^ agree on all Pauli strings Pi. As these generate all Pauli strings, we must then have Û = Q^ and we are done. □

With this proposition we see that Ŝ(U) = Ŝ(V ) iff U = eV Q for some global phase α and Pauli string Q. So just like how the symplectic representation of the Pauli strings ignores the global phase, the symplectic representation of the Cliffords ignores Paulis. Okay, so when thinking about the symplectic space, and ignoring Paulis, the Cliffords become symplectic maps. What about the converse? If we are given a symplectic map on 𝔽22n, can we find a Clifford that is mapped to it? In other words: is Ŝ surjective? To answer this questions it will be useful to define a ‘standard basis’ of 𝔽22n. Write zi = S(Zi) and xj = S(Xj) for the bit strings corresponding to the Pauli strings Zi and Xj. These zi and xj of course span the space and are linearly independent so that they are indeed a basis. Note furthermore that the symplectic inner products of these are zi,zj = xi,xj = 0, while zi,xj = δij, which encodes the fact that the Zi all mutually commute (and the same for the Xj), while Zi and Xj anti-commute when i = j.

Proposition 6.4.8. Every symplectic map M : 𝔽22n 𝔽22n comes from a Clifford unitary U via Ŝ(U) = M.

Proof. Define vi := Mzi and wj := Mxj, the images of the standard basis after applying M. As M is symplectic and hence invertible, the vectors vi and wj must then also be independent. Furthermore, as M preserves the symplectic inner product we still have vi,vj = wi,wj = 0 and vi,wj = δij. Let Pi be a self-adjoint Pauli string for which S(Pi) = vi and similarly let Qj be such that S(Qj) = wj (these Pauli strings are unique up to phases of ± 1). Then the Paulis Pi are commuting, since vi,vj = 0, and similarly all the Qj are commuting. The only pairs that don’t commute are Pi and Qj when i = j. We can ‘fix’ this lack of commutation by considering longer Pauli strings. Consider the following 2n Pauli strings acting on 2n qubits:

Z1 P1,Zn Pn,X1 Q1,,Xn Qn.

These Pauli strings all commute. Let’s check the only non-trivial commutation: Zi Pi and Xj Qj. When ij, we have that Zi and Xj commute, and Pi and Qj commute, so that the full strings obviously commute as well. When i = j, then Zi and Xi anti-commute, but so do Pi and Qi, so that the complete strings still commute. We then have built 2n independent, commuting, self-inverse Pauli strings acting on 2n qubits. These then uniquely define a 2n-qubit stabiliser state |ψ, which is unique up to scalar. Bending back the top n wires to be inputs, we then get a linear map A going from n qubits to n qubits. We want to show it is unitary. As Zi Pi is a stabiliser of |ψ, we then see that AZi = PiA:

Similarly, AXj = QjA. Lemma 6.4.2 then shows that A is (proportional to a) unitary, and as it comes from a stabiliser diagram it is Clifford. Furthermore AZiA = PiAA = Pi, so that Ŝ(A)zi = vi. We defined vi to be such that Mzi = vi, and hence Ŝ(A)zi = Mzi. Completely analogously we have Ŝ(A)xj = Mxj, so that Ŝ(A) and M agree on a basis of 𝔽22n, so that indeed Ŝ(A) = M. □

6.4.5 Adding back in the phases

So far we have ignored the phases in the symplectic representation. What happens when we try to add them back in? We get stabiliser tableaux! Let’s look again at the stabiliser tableau for the CNOT gate:

Z1 Z2 X1 X2 ± + + + + 1 Z Z X I 2 I Z X X

Now for each of the elements in the table we make the substitutions, corresponding to how we were encoding the Paulis as bitstrings:

I ( 0 0 )Z ( 1 0 )X ( 0 1 )Y ( 1 1 )

We then get the following matrix of values:

Z1 Z2 X1 X2 ± + + + + 1Z 1 1 0 0 1X 0 0 1 0 2Z 0 1 0 0 2X 0 0 1 1

Now let’s group the Z and X rows together:

Z1 Z2 X1 X2 ± + + + + 1Z 1 1 0 0 2Z 0 1 0 0 1X 0 0 1 0 2X 0 0 1 1
(6.23)

If we squint a bit we can see that this is in fact a symplectic matrix, but with some additional information to record the phases. If we remove those phases and the label for the columns and rows we in fact get the symplectic matrix representation for the CNOT:

Ŝ(CNOT) = ( 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 1 )

Then if we want to know for instance what happens when we conjugate Y X by CNOTs, we first write Y X as the vector S(Y X) = (1,0,1,1)T , and then we just multiply them:

S(CNOT)S(Y X) = ( 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 1 ) ( 1 0 1 1 ) = ( 1 0 1 0 )

This symplectic representation doesn’t contain the phase information though. We can fix this by just keeping the top row of the tableau 6.23 containing the phases, and also adding another top row to the Paulis to represent their global phase. If we do this, we however also have to modify how we multiply together tableaux and vectors, as the phase gets updated in quite a complicated way. This is not really relevant for us, so we leave it as an exercise.

Exercise* 6.15. Find out how to incorporate phases as an additional row on the symplectic matrix, so that matrix-vector multiplication works out the way it should.

6.4.6 Putting it all together

Let’s summarise what we have learned. We have seen that we can write a Pauli string as a bit string, where the first half of the bits tells you where the Z’s are, and the second half tells you where the X’s are (and so the overlap tells you where the Y ’s are). We can then consider the Pauli group as a vector space of bit strings 𝔽22n. Paulis either commute or anti-commute. This information is captured in 𝔽22n by whether the associated vectors have a symplectic inner product of zero (for commuting) or one (for anti-commuting). As Cliffords map Paulis to Paulis under conjugation, and are completely determined by this action, we can represent Cliffords as matrices on the symplectic vector space 𝔽22n. Conjugating by a Clifford preserves commutation, so that it preserves the symplectic inner product on this space. This means that the Cliffords correspond to symplectic maps. Conversely, any symplectic map on 𝔽22n comes from a Clifford unitary. These constructions with the symplectic phases ignore the phases of the Paulis, and hence capture the Cliffords only up to local Paulis. We can fix this by adding some additional phase information to our symplectic space. This representation is then equivalent to the stabiliser tableau of the Clifford.

6.5 The Clifford hierarchy

In Chapter 5 we introduced Clifford unitaries in a somewhat ad-hoc way as those unitaries built from CNOT, Hadamard and S gates. In this chapter we have seen that we can define them in a mathematically nicer way as precisely those unitaries that send Pauli strings to Pauli strings under conjugation. It turns out we can extend this idea to a whole hierarchy of gates. First, let’s denote the set of Pauli gates by C1.

Definition 6.5.1. The kth level of the Clifford hierarchy for k > 1 is defined as

Ck := {U|P : UPUC k1}

The first level of the hierarchy consists of the Paulis by definition, and the second C2 contains unitaries that map Pauli strings to unitaries in C1, i.e. the Paulis. Hence, C2 consists precisely of the Cliffords. The third level C3 then contains unitaries that map Pauli strings to Clifford unitaries. An example of a third-level unitary is the T gate  diagram of T-gate :

TZT = ZTXT SX

Similarly, the Z(π 8 ) gate is in the 4th level, and more generally Z(2π 2k) is in the kth level. The Clifford hierarchy is useful for thinking about gate teleportation protocols. As the name implies, gate teleportation generalises the idea behind quantum teleportation of Section 3.3.2. In quantum teleportation we move information from one qubit to another without changing the state. In gate teleportation we instead try to apply some specific unitary U to the state, without directly applying U to that qubit:

(6.24)

In this protocol we entangle our state with a specific maximally entangled state |ψ with the goal of executing U. However, we see that instead we end up with UZbXa. In order to actually end up with U, we hence need to apply a correction of UXaZbU. For a general U this doesn’t help us, since this requires us to execute U on the qubit after all. However, if U Ck, then UXaZbUCk1, so that instead of applying a Ck unitary, we can execute a Ck1 unitary. In Eq. (6.24) U is a single-qubit unitary, but the same idea works for an n-qubit unitary, in which case we essentially do the same operations on each of the n qubits in parallel, with the correction depending on a Pauli string of possible measurement outcomes. These gate teleportation protocols are especially useful when it is hard to correctly implement U. We can then first try to build the correct |ψ “offline”, until we get the result we require, and then apply it to the state we want by gate teleportation. If the correction operation is then easy, we can just apply that and we are done. For instance, we will see in Chapter 11 that in many fault-tolerant architectures it is difficult to execute a T gate, while it is easy to implement Clifford gates. As a T gate is in the third level of the Clifford hierarchy, we can implement it with gate teleportation, and its correction will be a Clifford. If instead we want to implement a 4th-level unitary, like T = Z(π 8 ), its correction will be third-level, which we then also implement with gate teleportation, so that the final correction is a Clifford. Note that we in fact have already encountered a version of T gate teleportation in the form of state injection in Section 3.3.1:

This can be rewritten into a more standard gate teleportation protocol:

Note though that while gate teleportation requires a two-qubit state, magic state injection requires just a single-qubit state, and hence is more efficient. In general, we can do the more efficient ‘magic state’ protocol for a unitary U when U semi-Clifford, which means that U = C1DC2 where C1 and C2 are Clifford and D is diagonal. While there is a nice connection between the Clifford hierarchy and how hard it is to implement a unitary through gate teleportation, in pretty much any other regard the Clifford hierarchy is not very nice at all. In particular, for k > 2, Ck is not even closed under composition. It is hence not possible to describe the elements of Ck just by enumerating some small number of generators. In fact, a full characterisation of Ck for arbitrary number of qubits and k is not known.

Exercise 6.16. Let C be any Clifford and U Ck. Show that CU Ck and UC Ck.

Exercise 6.17. Show that U = THT is not anywhere in the Clifford hierarchy. Hint: Show that UXU is within a Clifford of U itself, so that UXU being in Ck1 implies U is as well.

When we restrict to the diagonal unitaries in Ck the structure is a lot clearer. In particular, let Dk Ck denote the diagonal unitaries in the kth level. Then Dk is in fact closed under composition and forms a group, and is generated by unitaries of the form:

up to permutations of the qubits. These diagrams implement the unitary |x1,,xne2i π 2k(x1xn)|x 1,,xn and are the focal point of a lot of discussion in the next chapter.

6.6 Summary: What to remember

1..

The n-qubit Pauli strings form a group Pn.

2..

We can represent the projection onto the + 1-eigenspace of a Pauli using a Pauli box. This allows us to treat all Paulis on the same footing diagrammatically.

3..

We call a subgroup S Pn a stabiliser group if it stabilises at least one non-zero state. This is the case exactly when IS. Stabiliser groups are necessarily commutative.

4..

The Fundamental Theorem of Stabiliser Theory: If an n-qubit stabiliser group has k generators, then its stabiliser subspace has dimension 2nk.

5..

Maximal stabiliser groups have precisely n generators, and stabilise a unique state up to scalar factor. We call states stabilised by a maximal stabiliser group a stabiliser state.

6..

Stabiliser states correspond precisely to the Clifford states of Chapter 5.

7..

The Clifford unitaries of Chapter 5 send elements of Pn to Pn under conjugation. Any unitary with this property is in fact Clifford.

8..

We can fully describe a Clifford unitary by a stabiliser tableau, which lists its action on the Zi and Xi Pauli strings under conjugation.

9..

Additionally, we can describe Pauli strings, up to global phase, as elements of a symplectic vector space.

10..

We can then describe Clifford unitaries, up to multiplication with Paulis, by a symplectic matrix: a matrix preserving the symplectic inner product.

6.7 References and further reading

Cliffords as normalising the Pauli group The stabiliser formalism was introduced by [111] and further developed, with the help of some amusing examples, in [113]. In the former paper, it was treated mainly as a tool for defining quantum error correcting codes, whereas in the latter as a more general-purpose set of tools for dealing with quantum operations. In Chapter 5 we introduced Clifford unitaries as those built out of Hadamard, S and CNOT gates, and now in this chapter we see that they can also be understood to be those unitaries that send Paulis to Paulis under conjugation. Originally, the latter representation came first. That stabiliser unitaries (those that map Paulis to Paulis) can be implemented just using Hadamard, S and CNOT gates was noted in the context of error correcting codes in [27], and a proof was given using symplectic matrices in [44]. A more concrete proof by induction was presented in [112]. The modern form of using a stabiliser tableau to simulate a computation or to produce a normal form for the circuit was presented in [1]. Note that in different papers on this subject the rows and columns of a tableau might be interchanged.

The Clifford hierarchy The notion of a Clifford hierarchy is from [115] where they also introduce the technique of gate teleportation with these gates. A characterisation of diagonal gates in the Clifford hierarchy is given in [67]. That you can do gate teleportation with a smaller ancilla state is the unitary is semi-Clifford is from [238], though the term ‘semi-Clifford’ was only introduced in [119].