# Why is $Z_1Z_2$ spanned by this set ? Surely it's too small?

In the context of stabilizer codes my lecturer writes that $$Z_1Z_2$$ is spanned by $$\{|000\rangle,|001\rangle,|110\rangle\, |111 \rangle \}$$. But I don't see how this spans the matrix as it's given by

$$Z_1\otimes Z_2 \otimes I= \begin {pmatrix} 1& 0&0&0&0&0&&0&0 \\0& 1&0&0&0&0&&0&0 \\0& 0&-1&0&0&0&&0&0 \\ 0& 0&0&-1&0&0&&0&0 \\ 0& 0&0&0&-1&0&&0&0 \\0& 0&0&0&0&-1&&0&0 \\ 0 & 0&0&0&0&0&&1 &0 \\ 0& 0&0&0&0&0&&0&1 \end {pmatrix}$$

So I don't see how any linear combination of the given set can form all the elements of this matrix ?

• It’s not trying to create the matrix. It’s the space of eigenvectors with eigenvalue +1. – DaftWullie Aug 14 '19 at 20:50
• @DaftWullie ah I see that makes more sense, thank you once again daftwullie your name does not become you – bhapi Aug 14 '19 at 21:53

This is basically what DaftWullie said in the comments, with a bit of elaboration —$$\def\ket#1{\lvert #1 \rangle}\def\bra#1{\!\!\:\langle #1 \rvert}$$
Notice that $$Z_1 Z_2$$ is an $$8 \times 8$$ operator when taken as an operation on 3 qubits, and $$\{ \ket{000}, \ket{001}, \ket{110}, \ket{111} \}$$ is a set of $$8 \times 1$$ column-vectors. There can't be any question of $$Z_1 Z_2$$ being spanned by the vectors, so the question you should ask in cases like this is what is actually meant. You seem to have interpreted this as a statement that $$Z_1 Z_2$$ is spanned by the projectors onto those states — that is, $$\ket{000}\bra{000}$$, $$\ket{001}\bra{001}$$, $$\ket{110}\bra{110}$$, and $$\ket{111}\bra{111}$$. This isn't a bad first guess, but as these are each rank-1 projectors and $$Z_1 Z_2$$ is a rank-8 operator, as you say there aren't enough for this to hold. (Any unitary operator on $$n$$ qubits cannot be expressed as fewer than $$2^n$$ rank-1 projectors.)
What your lecturer presumably meant is that the space which is stabilised by $$Z_1 Z_2$$, that is to say the +1 eigenspace of $$Z_1 Z_2$$, is spanned by the vectors $$\{ \ket{000}, \ket{001}, \ket{110}, \ket{111} \}$$. We can see this is true because $$\ket{00}$$ and $$\ket{11}$$ are the two-qubit it states which are stabilised by $$Z_1 Z_2$$, and in the set of states above we are just taking the tensor product with linearly independent states of the third qubit. For instance, it would be as valid to say that the space stabilised by $$Z_1 Z_2$$ is spanned by the vectors $$\{ \ket{00+}, \ket{00-}, \ket{11+}, \ket{11-} \}$$, or indeed by the vectors $$\{ \ket{000}, \ket{00+}, \ket{111}, \ket{11-} \}$$ (though it would be unusual to see a spanning set such as the last one here, as it is not orthogonal).