1 Introduction

What is the quantum state? The ontic view holds that it is a property of the physical system. The epistemic view is that it merely represents some agent’s knowledge about the system. To support the latter view, Spekkens has constructed a toy theory [1] where the underlying physical systems are classical yet many quantum features are recovered through an epistemic restriction.

The states, transformations and measurements in the toy theory bear a striking resemblance to those described by the stabilizer formalism for qubits. That formalism describes a non-trivial subset of the quantum mechanical states, transformations and measurements of qubits in a much more compact manner than the normal Hilbert space formalism. A surprising consequence of this compactness, known as the Gottesman-Knill theorem, is that a non-trivial subset of quantum mechanics can be efficiently simulated on a classical computer. The subset is rich enough to include many quantum phenomena, for instance entanglement, non-locality, quantum teleportation and dense coding.

The formalism was originally developed [2] to study quantum error correcting codes, but has seen widespread use since, for example in the study of measurement based quantum computation [3]. I will review the relevant parts of the qubit stabilizer formalism during this paper. For the reader that has never encountered it before, a full introduction to that formalism can be found in Sect. 10.5 of [4], and further useful details in [5, 6].

The purpose of this paper is to provide a new notation for the toy theory which explains the similarities with the qubit stabilizer formalism, whilst also pinning down exactly how the predictions of the toy theory differ from those of quantum mechanics. A sneak preview of the notation is given by Table 1, showing how similar it is to the qubit stabilizer formalism. The key difference is that whilst for qubits XZ=−iY, in the toy theory \({\mathcal {X}} {\mathcal {Z}}= {\mathcal {Y}}\).

Table 1 Dense coding [7] in two theories (the quantum version closely follows Sect. 2.3 of [4]), each in two notations. For the benefit of those readers that are familiar with [1], the column labelled “ontic space” reproduces the relevant diagrams from that paper. The remaining readers may ignore that column. Initially the joint state of two systems indicated in row 1 is prepared. Alice is given the first system and Bob the second. In isolation, each system can only be used to transmit a single bit of classical information, yet the dense coding protocol allows two bits (b 1,b 2) to be sent from Alice to Bob with the transfer of only one system. If b 1=1 then Alice performs the operation indicated in row 2 on her system. Similarly, if b 2=1 she performs the operation indicated in row 3. For example, if (b 1,b 2)=(1,1) she performs both operations and the joint state of the system is then as shown in row 4. Finally, Alice sends her system to Bob, who performs the joint measurement indicated in row 5 to recover two bits of information

The fact that the toy theory can be described using a notation so similar to the qubit stabilizer formalism may itself be considered further evidence for the epistemic view of quantum states.

The notation is also useful for carrying out calculations in the theory, as shown by the examples in Sect. 6. This is primarily for two reasons. Firstly the notation is much more compact: the description of the key objects of the theory (pure epistemic states and reversible transformations) using the stabilizer notation scales polynomially in the number of systems. A direct description, as used in [1], scales exponentially. Secondly, there is widespread experience with, and extensive literature on, the qubit stabilizer formalism. Much of this can be applied to the toy theory thanks to the notation provided here.

The use of the notation to describe states, transformations, and measurements is described in Sects. 2, 3 and 4 respectively. Convex combinations and coherent superpositions are discussed in Sect. 5.

Spekkens has already outlined a new phase-space based formulation of the toy theory [8] which is closely related to this notation as shown in Appendix B. The theory has also been reformulated using category theory [9], but since that is very different to the standard qubit stabilizer formalism it does not facilitate calculations and comparisons in the same way as the notation provided here.

2 States

2.1 Qubits

Denote the 2 by 2 identity matrix by I and let

(1)

Define P n , the Pauli group on n qubits, as the 2n by 2n matrices of the form \(\alpha p_{1} \otimes\dotsm\otimes p_{n}\) for some α∈{1,−1,i,−i} and p k ∈{I,X,Y,Z}. Call the Hermitian elements (i.e. those with α∈{1,−1}) Pauli observables. Define X k as X acting on the k-th qubit, i.e. I ⊗(k−1)XI ⊗(nk). Similarly for Y k and Z k . P n is generated by the X k and the Z k along with iI n.

An element g of the Pauli group, ignoring its phase α, can be written as a check vector r(g). This is a vector of 2n bits, where the first n bits give the locations of Xs, whilst the second n bits give the locations of Zs, a Y being indicated by 1s in both positions. For example, r(XYZ)=(1,1,0,0,1,1), r(−ZI)=(0,0,1,0). A useful property of check vectors is that r(gh)=r(g)⊕r(h), where ⊕ indicates addition modulo 2 (making r a group homomorphism from P n to (ℤ2)2n).

Let S be a subgroup of P n that does not contain −I n (a qubit stabilizer subgroup). It is conventional to associate S with the subspace V S of pure states |ψ〉 satisfying g|ψ〉=|ψ〉 for all gS. The projector onto this subspace is [5]

$$P_S = \frac{1}{ \lvert S \rvert} \sum_{g \in S} g. $$
(2)

For comparison with what follows it is useful instead to associate S with the quantum state ρ S =|S|2n P S . This is a pure state if and only if |S|=2n. Otherwise it is a uniform mixture of \(\frac{2^{n}}{ \lvert S \rvert}\) pure states (which form a basis for V S ). States of this form are also considered in [10, 11].

For any Pauli observable g

$$\operatorname {Tr}(g\rho_S) = \begin{cases}1 & g \in S, \\[-2pt] -1 & -g \in S, \\[-2pt] 0 & \text{otherwise.}\end{cases} $$
(3)

In epistemic language we could say that ρ S represents complete knowledge about the Pauli observables g with ±gS and zero knowledge about the rest.

2.2 Toy Theory

In Spekkens toy theory, the simplest systems, called elementary systems, are always in one of the four possible ontic states. The ontic state is a “hidden variable” that completely describes the physical state of affairs of the system. In the stabilizer notation these ontic states are identified with the vectors e 1=(1,0,0,0), e 2=(0,1,0,0), e 3=(0,0,1,0) and e 4=(0,0,0,1).

A composite system is composed of elementary systems, and its ontic state is specified by specifying the ontic state of each elementary system. For example 2⋅4 means that the first system is in ontic state 2 and the second is in state 4. In the stabilizer notation this is identified with the tensor product e 2e 4, whilst 1⋅3⋅2 is identified with e 1e 3e 2, and so on. In this way ontic state for n elementary systems will therefore correspond to a 4n-dimensional vector v with a single component taking the value 1 and the rest zero.

An epistemic state describes an agent’s knowledge about a system. An agent that assigns the epistemic state 1∨2 to an elementary systems knows that its ontic state is either 1 or 2. Crucial to Spekkens’ argument is the observation that the epistemic states resemble quantum states, whilst the ontic states do not.

Notice that the knowledge is incomplete: the agent does not know the exact ontic state. This is required by the theory’s “knowledge balance principle” [1]. Detailed discussion of this principle is relegated to Appendix A, where it is shown that the epistemic states satisfying it are exactly those that can represented as follows:

Denote the 4 by 4 identity matrix by \({{\mathcal {I}}}= \operatorname {diag}(1,1,1,1)\) and let

(4)
(5)
(6)

These correspond to the possible measurements of an elementary system, where if the ontic state is k then a measurement of \(g \in\{{\mathcal {I}}, {\mathcal {X}},{\mathcal {Y}}, {\mathcal {Z}}\}\) will return v∈{1,−1} according to the eigenvalue equation g e k =v e k .

Define G n as the 4n by 4n matrices of the form αg 1⊗⋯⊗g n for some α∈{1,−1} and \(g_{k} \in \{ {\mathcal {I}}, {\mathcal {X}}, {\mathcal {Y}}, {\mathcal {Z}}\}\). This group plays the same role as the Pauli group does in the qubit case. Call the elements toy observables. Denote \({\mathcal {X}}_{k} = {\mathcal {I}}^{\otimes(k-1)} \otimes {\mathcal {X}}\otimes {\mathcal {I}}^{\otimes (n-k)}\), and similarly for \({\mathcal {Y}}_{k}\) and \({\mathcal {Z}}_{k}\). G n is generated by \(-{\mathcal {I}}^{\otimes n}\) together with \({\mathcal {X}}_{k}\) and \({\mathcal {Z}}_{k}\) for all k∈{1,…,n}.

Let m:G n P n be the mapping suggested by our notation, so that \(m(-{\mathcal {X}}\otimes {\mathcal {Z}}) = -X \otimes Z\) and so on. Abuse terminology by saying g,hG n commute (anticommute) if m(g) and m(h) commute (anticommute). Define the check vector of gG n to be r(m(g)), the check vector of m(g). As with the qubit case, we have that multiplication in G n corresponds to addition of check vectors modulo two. (More formally, rm:G n →(ℤ2)2n is a group homomorphism, even though m:G n P n is not. Furthermore, appending a “phase bit” \(\frac{1}{2}(1+\alpha)\) to the check vector gives a group isomorphism between G n and (ℤ2)(2n+1).)

Let S be a subgroup of G n that does not contain \(-{\mathcal {I}}^{\otimes n}\) and for which every g,hS commute (a toy stabilizer subgroup). S represents an epistemic state for n elementary systems, namely the knowledge that the ontic state v satisfies g v=v for all gS. This is a subgroup because if g v=v and h v=v then gh v=v also. The projector P S onto the ontic states compatible with S is of the form (2).

Notice that whilst in the qubit case −I nS automatically ensures the elements of S commute, in the toy theory the commuting requirement is added “by hand”.

The only element of S with non-zero trace is \({\mathcal {I}}^{\otimes n}\) and so \(\operatorname {Tr}{P_{S}}\), which is the number of ontic states compatible with S, is 4n/|S|. Since we assume a uniform distribution over the possible ontic states, ρ s =|S|4n P S gives a diagonal matrix of the probabilities for each ontic state.

Some examples of toy stabilizer subgroups are shown in Tables 2 and 3. They are all reminiscent of qubit stabilizer states, and the following lemma shows why.

Table 2 All of the toy stabilizer subgroups for an elementary system. The filled boxes in the first column correspond to the possible ontic states, as in [1]. The symbol ∨ should be read as “or”
Table 3 Some toy stabilizer subgroups for composite systems. They are each composed of two elementary systems, except for the last which is composed of three. The pictures use the same conventions as in [1], briefly: each axis corresponds to an elementary system, and the possible ontic states are filled. In the two-system cases each row is a state of the first system and each column a state of the second, with the ontic state 1⋅1 in the bottom-left corner. In the three-system case the “depth” gives the state of the third system, with the ontic state 1⋅1⋅1 is the bottom-left-back corner

Lemma 1

(Proven in Appendix A)

g 1,g 2,…,g l G n are independent generators of a toy stabilizer subgroup if and only if m(g 1),m(g 2),…,m(g l ) are independent generators of a qubit stabilizer subgroup.

It is crucial to note that although valid lists of independent generators are the same in both theories, the resultant subgroups are in general different. For example \(\langle {\mathcal {X}}_{1}{\mathcal {X}}_{2}, {\mathcal {Y}}_{1}{\mathcal {Y}}_{2}\rangle = \{ {\mathcal {I}}^{\otimes2}, {\mathcal {X}}_{1}{\mathcal {X}}_{2}, {\mathcal {Y}}_{1}{\mathcal {Y}}_{2}, {\mathcal {Z}}_{1}{\mathcal {Z}}_{2}\}\) whilst 〈X 1 X 2,Y 1 Y 2〉={I ⊗2,X 1 X 2,Y 1 Y 2,−Z 1 Z 2}.

It is easy to see that if g 1,…,g l are independent generators for S then |S|=2l. The maximum number of independent generators for a qubit stabilizer subgroup is n [4], and the above lemma means this is also true for toy stabilizer subgroups. Hence an S with |S|=2n represents a state of maximal knowledge, or a pure state.

Two epistemic states are called disjoint if no ontic state is compatible with both. In this notation there is a useful criterion for disjoint states, which is identical to the criterion for orthogonality in the qubit stabilizer case.

Lemma 2

A pair of toy stabilizer subgroups S,TG n represent disjoint epistemic states if and only if there exists some gS withgT.

Proof

S and T represent disjoint states if and only if 0=P S P T =P ST. This holds if and only if \(-{\mathcal {I}}^{\otimes n} \in \langle S \cup T \rangle\). But since \(-{\mathcal {I}}^{\otimes n} \notin S, T\), this holds if and only if there exists gS with −gT. □

Finally, note that the theory of qubits restricted to the computational basis is just the classical probability theory of bits. It is occasionally helpful to view the above notation as being based on the encoding of the ontic level of the toy theory (two classical bits per elementary system) in the computational basis states of qubits. Since \({\mathcal {X}}= I \otimes Z\), \({\mathcal {Y}}= Z \otimes Z\) and \({\mathcal {Z}}= Z \otimes I\), the toy observables are then Hermitian observables on those qubits. This device should not be taken too seriously, for example (as discussed in Sect. 4) a measurement of \({\mathcal {X}}\) can disturb the value of \({\mathcal {Z}}\) in the toy theory, whereas the observables IZ and ZI are compatible in quantum mechanics.

3 Transformations

3.1 Qubits

Define C n , the Clifford group on n qubits as the 2n by 2n unitaries U satisfying UgU P n for all gP n . These take stabilizer states to stabilizer states, since S U =ρ T where T={UgU |gS} is another stabilizer subgroup.

Since UghU =UgU UhU we can specify the action of U by its action on the generators of P n . Since UiI n U =iI n it suffices to specify the action on the X k and Z k . Note that [UgU ,UhU ]=U[g,h]U . Hence if UX k U =g k and UZ k U =h k we will have that the g k commute, the h k commute, and g k commutes with h l if and only if kl. Since U is reversible we must have that the h k and g k , together with iI n, generate P n .

Such h k ,g k are described in [5] as canonical generator sets. It is then shown that, conversely, for any given canonical generator set there is a Clifford unitary that maps the X k and Z k to it. That unitary can be generated from the single qubit Clifford unitaries plus the controlled-NOT gate, which sends X 1X 1 X 2,X 2X 2,Z 1Z 1,Z 2Z 1 Z 2. Furthermore the single qubit Clifford unitaries can themselves be generated from the Hadamard gate, which sends XZ,ZX, and the phase gate, which sends XY,ZZ.

3.2 Toy Theory

In the toy theory reversible transformations are permutations of the ontic states that take any valid epistemic state to another valid epistemic state. In this section I show that the group of reversible transformations in the toy theory has a very similar structure to the Clifford group. The transformations act on the \({\mathcal {X}}_{k}\) and \({\mathcal {Z}}_{k}\) in the same way as the qubit case. Furthermore the transformations can be generated in a similar fashion to the Clifford group.

We can write a reversible transformation on n elementary systems as a 4n by 4n permutation matrix U. For example, the permutation matrix for the permutation 1→2→3→1 on an elementary system is

(7)

If v is the ontic state before the transformation then U v is the state afterwards. Hence if we know that the ontic state is in the support of a projector P S before then our new knowledge is exactly that the ontic state is in the support of the projector UP S U T.

Before the transformation the epistemic state may have been 〈g〉 for any gG n . Since \(P_{ \langle g \rangle} = \frac{1}{2} ({\mathcal {I}}^{\otimes n} +g)\), for the new epistemic state to be valid (and hence represented by a toy stabilizer subgroup) we must have UgU TG n . Compare this to the definition of the Clifford group. To ensure the elements of the new subgroup commute we must also require that UgU T and UhU T commute if and only if g and h commute.

The theory now develops much like the qubit case. Since UghU T=UgU T UhU T and \(U(-{\mathcal {I}}^{\otimes n})U^{T} = -{\mathcal {I}}^{\otimes n}\) we can specify the action of U by its action on the \({\mathcal {X}}_{k}\) and \({\mathcal {Z}}_{k}\). The resulting elements must have the same commutation structure and, along with \(-{\mathcal {I}}^{\otimes n}\), generate G n . Call such elements canonical generating sets, and note that applying m gives a qubit canonical generator set.

For an elementary system, it is shown in Table 4 that all of the 4!=24 permutations of the ontic states are valid, and that there is a permutation that sends the \({\mathcal {X}}\) and \({\mathcal {Z}}\) to any canonical generator set.

Table 4 The valid reversible transformations for an elementary system. The first column shows the permutations to the ontic states in cycle notation, for example (342) indicates that 3→4→2→3. The second shows the result of UgU T on two non-trivial generators of G 1

It is well known that the group of permutations on n elements can be generated by a transposition and an n-cycle. Hence any elementary transformation can be written as a sequence of, for example 3↔2 and 1→4→2→3→1 transformations. The first is reminiscent of a Hadamard gate in that it maps \({\mathcal {X}}\to {\mathcal {Z}}\) and \({\mathcal {Z}}\to {\mathcal {X}}\), although it maps \({\mathcal {Y}}\to {\mathcal {Y}}\) whereas a Hadamard maps Y→−Y. The second is reminiscent of a phase gate in that it maps \({\mathcal {X}}\to {\mathcal {Y}}\) and \({\mathcal {Y}}\to-{\mathcal {X}}\), although it maps \({\mathcal {Z}}\to-{\mathcal {Z}}\) whereas a phase gate maps ZZ.

The argument in [5] now gives that there is a permutation on a composite system that sends the \({\mathcal {X}}_{k}, {\mathcal {Z}}_{k}\) to any given canonical generator set, and that it can be generated using the elementary system transformations and the controlled-NOT gate shown in Table 5.

Table 5 Two reversible transformations for pairs of elementary systems. The first column shows the permutations to the ontic states (laid out in a grid using the same conventions as [1] and Table 3). The second shows the action on the non-trivial generators of G 2. The first transformation acts on each system separately. The second transformation is analogous to a controlled-NOT

One difference between the transformations in the two theories has already been noted: transformations that act on \({\mathcal {X}}_{k}\) and \({\mathcal {Z}}_{k}\) in the same way in both theories do not necessarily act in the same way on other group elements, for example the \({\mathcal {Y}}_{k}\). Another difference is that whilst commutation structure is automatically preserved by any unitary transformation on qubits, this requirement must be added “by hand” in the toy theory. For example, the matrix U for the two-system permutation

$$1\cdot2 \leftrightarrow3\cdot1,\qquad 1\cdot4\leftrightarrow3\cdot3,\qquad 2\cdot2 \leftrightarrow4\cdot 1,\qquad 2\cdot4 \leftrightarrow4\cdot3$$
(8)

satisfies the requirement that UgU G 2 for all gG 2, but has \(U{\mathcal {X}}_{1}U^{T} = {\mathcal {X}}_{1}\) and \(U{\mathcal {X}}_{2}U^{T} = {\mathcal {Z}}_{1}\) and so is not a valid transformation.

4 Measurements

4.1 Qubits

Suppose a Pauli observable g is measured on a state described by S. If ±gS then ±1 is returned and the state is unchanged.

If ±gS, then the result v∈{1,−1} will be completely random. To find the state after the measurement, first write down a set of independent generators for S with at most one element h that anticommutes with g. (Any other elements that anticommute can be multiplied by h.) Add vg to the list and remove h (if present) to obtain a list of independent generators for the new state.

4.2 Toy Theory

A measurement in the toy theory is specified by partitioning the ontic state into valid epistemic states. The result of the measurement is simply whichever member of the partition the ontic state lies in. In order to ensure that the new epistemic state is valid, the measurement must disturb the ontic state.

In the toy stabilizer notation we can describe measurements of toy observables g, i.e. the partitioning of the ontic states into 〈g〉 and 〈−g〉. In this section I will show that measurements of toy observables behave in exactly the same way as Pauli observables in the qubit case, but that not every measurement in the toy theory can be described using toy observables.

Let the epistemic state before the measurement be described by a toy stabilizer subgroup S. If gS then all the possible ontic states lie in the +1 eigenspace of g, so we are certain to get the +1 outcome. Similarly if −gS we are certain to get the −1 outcome. Notice that the expected value of g is \(\operatorname {Tr}(g\rho_{S})\). If g,−gS then this gives 0. Hence the measurement of such a toy observable must give either outcome with equal probability.

In order to ensure that the epistemic state after the measurement is valid, there must be a random disturbance to the value of any anticommuting toy observables. Let us assume this is the only disturbance—all commuting observables are unaffected.

If ±g was already in the subgroup then there is no change to the epistemic state. Otherwise, if the outcome of a measurement is ±1 the new toy stabilizer subgroup will be generated by ±g and the old stabilizer subgroup without any elements that anticommute with g. A systematic way to update the toy stabilizer subgroup is to follow the qubit stabilizer procedure: write a list of independent generators for the old state with at most one element that anticommutes with g, delete that element if present, and add ±g.

An example of a valid measurement with four outcomes is the partitioning of the ontic states into those associated with \(\langle {\mathcal {X}}_{1}{\mathcal {X}}_{2}, {\mathcal {Z}}_{1}{\mathcal {Z}}_{2} \rangle\), \(\langle-{\mathcal {X}}_{1}{\mathcal {X}}_{2}, {\mathcal {Z}}_{1}{\mathcal {Z}}_{2} \rangle\), \(\langle {\mathcal {Z}}_{1}, -{\mathcal {Z}}_{2}\rangle\) and \(\langle-{\mathcal {Z}}_{1}, {\mathcal {Z}}_{2} \rangle\). This measurement can be handled in the stabilizer notation by first considering a measurement of \({\mathcal {Z}}_{1}{\mathcal {Z}}_{2}\). The +1 outcome means that the ontic state must lie in one of the first two sets and we can measure \({\mathcal {X}}_{1}{\mathcal {X}}_{2}\) to determine which. Similarly the −1 outcome narrows it down to the last two sets and we then measure \({\mathcal {Z}}_{1}\).

Can every valid measurement be described using sequences of toy observables in this way? Somewhat surprisingly, the answer is no.

Lemma 3

(Proven in Appendix A)

Any valid measurement on one or two elementary systems is equivalent to measuring a sequence of toy observables.

Lemma 4

Not every valid measurement on three or more elementary systems is equivalent to measuring a sequence of toy observables.

Proof

Consider the measurement on three or more elementary systems with eight outcomes

(9)

There is no non-trivial toy observable g with ±g in all the outcome subgroups (indeed there is no such g for the first three outcomes alone). Therefore there is no g that can be the first in the sequence of toy observable measurements. □

Since the only valid measurements on elementary systems are toy observables (Lemma 3), the above set of eight uncorrelated (product) states cannot be distinguished using local measurements alone. The same situation arises in quantum mechanics, where it is known as “non-locality without entanglement” [12]. Indeed equation 43 in [12] is very similar to (9). As noted in [1], the presence of this effect in the toy theory, which is local by construction, may indicate that “non-locality without entanglement” is a misnomer.

A similar structure also arises in so-called “boxworld” [13]: the measurement in their proof of Theorem 3 is also reminiscent of (9).

5 Mixtures and Superpositions

5.1 Qubits

I have been unable to find procedures for constructing mixtures (convex combinations) and superpositions of qubit stabilizer states in the literature, so I briefly develop the theory here.

Let S and S′ be two stabilizer subgroups on n qubits. When gS if and only if ±gS′, call S′ a rephasing of S. In that case, either S=S′, or they represent orthogonal states and can be written S=〈g 1,…,g l−1,g l 〉, S′=〈g 1,…,g l−1,−g l 〉. For example, S′=〈Z 1,−Z 2〉 is a rephasing of S=〈−Z 1,Z 2〉. For each list of generators we then multiply first by the second to obtain S′=〈−Z 1 Z 2,−Z 2〉, S=〈−Z 1 Z 2,Z 2〉.

Consider the mixture \(\frac{1}{2}(\rho_{S} + \rho_{S'})\). It is easy to check that the result is equal to ρ T for some stabilizer subgroup T if and only if S′ is a rephasing of S. In that case T=SS′ and \(P_{T} \propto P_{S} + P{_{S}'}\). For example, with S and S′ as above we would have T=〈−Z 1 Z 2〉.

The rephasing condition also applies to coherent superpositions, provided we restrict attention to orthogonal states. This excludes somewhat irregular cases such as |00〉−|++〉, which happens to be a stabilizer state.

Lemma 5

(Proven in Appendix A)

Let S,S′,T be stabilizer subgroups of size 2n. Let S and Sstabilize orthogonal states |ψand |ψ′〉 respectively. Then there exists a θ∈ℝ such that T stabilizes \(\frac{1}{\sqrt{2}}(\vert \psi \rangle + e^{i\theta }\vert \psi' \rangle)\) if and only if we can write S=〈g 1,…,g n−1,g n 〉, S′=〈g 1,…,g n−1,−g n and T=〈g 1,…,g n−1,hfor some hSS′.

There are always four such superpositions:

Lemma 6

(Proven in Appendix A)

Let S=〈g 1,…,g n−1,g n and S′=〈g 1,…,g n−1,−g n 〉. Then there are exactly four distinct stabilizer subgroups of the formg 1,…,g n−1,hwith hSS′.

For example, take S=〈Z 1,Z 2〉 and S′=〈−Z 1,−Z 2〉, which correspond to |00〉 and |11〉 respectively. Then we obtain four distinct superpositions of the form T=〈Z 1 Z 2,h〉 by setting h to ±X 1 X 2 or ±X 1 Y 2, corresponding to \(\frac{1}{\sqrt{2}}(\vert 00 \rangle \pm \vert 11 \rangle )\) or \(\frac{1}{\sqrt{2}}(\vert 00 \rangle \pm i\vert 11 \rangle)\) respectively.

5.2 Toy Theory

Define rephasing for toy stabilizer subgroups in the same way. Convex combinations then work in exactly the same way as the qubit case. If S and S′ represent disjoint states then P S +P S is a projector onto the union of the epistemic states compatible with S and S′, which is how convex combinations are defined in [1]. Defining convex combinations for any rephasing also allows S=S′, which is a trivial extension.

Since the toy theory does not have a direct analogue of Hilbert space there is no inherent definition of a coherent superposition. Instead we simply define it by analogy to the qubit case. Suppose S and S′ are two toy stabilizer subgroups for pure states, and S is a rephasing of S′. Then either S=S′ (in which case we can trivially define S to be a coherent superposition of S and S′), or we can write S=〈g 1,…,g n−1,g n 〉 and S′=〈g 1,…,g n−1,−g n 〉. Call an epistemic state of the form T=〈g 1,…,g n−1,h〉 with hSS′ a uniform coherent superposition of S and S′.

This definition generalizes the coherent superpositions for elementary systems found in [1] to composite systems. For any pair of distinct epistemic states, one being a rephasing of the other, there are four distinct coherent superpositions (using the same proof as for Lemma 6 above). The epistemic states thus obtained contain ontic states from both of the epistemic states in the superposition.

It was shown in Sect. 3 that for any pair of canonical generating sets, there is a permutation which maps one to the other. Take S,S′ and a coherent superposition T written as above. Write a canonical generating set g 1,…,g n ,h 1,…,h n . Fix h n =h (h anticommutes with g n by the same argument used in the proof of Lemma 5). The other h k are irrelevant, provided they satisfy the requirements of a canonical generator set (such h k can always be found). Another canonical generating set is obtained by changing g n to h and h n to −g n . So there exists a permutation that sends S to T and T to S′. This is considered in [1] to be indicative of a coherent superposition.

6 Examples

In this section the computational power of the notation is used to demonstrate some similarities of the toy theory to qubit stabilizers not identified in [1]. On the other hand, to show why not every phenomena involving qubit stabilizers is found in the toy theory, this section concludes with a discussion of the Mermin-Peres square.

6.1 Counting States and Transformations

The number of pure stabilizer states on n qubits is calculated in [10] to be

$$2^n \prod_{k=0}^{n-1}\bigl(2^{n-k} + 1\bigr).$$
(10)

Their argument applies equally to toy stabilizers and so the number of pure epistemic states for n elementary systems in the toy theory is identical.

The number of ordered canonical generator sets, and hence the elements of the Clifford group (modulo global phases) is calculated in [5] to be

$$2^{2n^2 + 3n}\prod_{k=1}^n \bigl(1 -2^{-2k}\bigr).$$
(11)

The same argument applies equally to toy stabilizers and so, recalling the link between transformations and canonical generator sets outlined in Sect. 3, the number of valid reversible transformations in the toy theory is identical.

6.2 Classical Simulation

It was already noted in [1] that the ontic states of the toy theory can be tracked efficiently by a classical computer. Using the stabilizer notation a classical computer can furthermore efficiently track the epistemic state. Indeed the proof in [10] that the simulation of qubit stabilizer circuits is complete for the classical complexity class ⊕L (which is believed to be strictly weaker than P, polynomial-time universal classical computation) can now easily be adapted to the toy theory.

6.3 Graph States

Let G be a finite simple graph on n vertices. We can associate G with a pure state on n elementary systems as follows. Begin with each system in the state \(\langle {\mathcal {X}}\rangle\). Apply the two-system permutation that sends \({\mathcal {X}}_{1} \to {\mathcal {X}}_{1}{\mathcal {Z}}_{2}\), \({\mathcal {X}}_{2} \to {\mathcal {Z}}_{1}{\mathcal {X}}_{2}\), \({\mathcal {Z}}_{1} \to {\mathcal {Z}}_{1}\) and \({\mathcal {Z}}_{2} \to {\mathcal {Z}}_{2}\) (analogous to a controlled-Z gate) to each pair of systems connected by an edge on the graph (in any order). The toy stabilizer subgroup for the resulting state is generated by

$$g_k = {\mathcal {X}}_k \prod_{l \in N(k)}{\mathcal {Z}}_l$$
(12)

for k∈{1,…,n} where N(k) are the vertices connected to vertex k.

Such states are analogous to graph states on qubits [14], and share many qualitative features with them. For example, a \({\mathcal {Z}}_{k}\) commutes with all of the generators except for g k . Hence a \({\mathcal {Z}}\) measurement on the k-th system will return ±1 with equal probability and generators for the new toy stabilizer can be found by replacing g k with \(\pm {\mathcal {Z}}_{k}\). By multiplying the g l with lN(k) by this we obtain another list of generators. If the value −1 is returned then apply the transformation that sends \({\mathcal {X}}\to-{\mathcal {X}}\) and \({\mathcal {Z}}\to {\mathcal {Z}}\) to the systems in N(k). The new generators are now those of the graph state for G with the vertex k deleted, along with \(\pm {\mathcal {Z}}_{k}\). Compare this to the qubit case, Proposition 1 of [14]. The effect of \({\mathcal {X}}\) and \({\mathcal {Y}}\) measurements is also analogous to the qubit case.

6.4 Non-example: Mermin-Peres Square

Having seen all these examples it may tempting to conclude that any feature of the qubit stabilizer formalism has an analogue in the toy theory. This is not the case. The Mermin-Peres square [15] of 9 Pauli observables

$$\begin{aligned}&X_1 \qquad X_2 \qquad X_1X_2 \\[-3pt]&Y_2 \qquad Y_1 \qquad Y_1Y_2 \\[-3pt]&X_1Y_2 \qquad Y_1X_2 \qquad Z_1Z_2\end{aligned} $$
(13)

has the property that every row and column is a set of commuting observables that multiply to give I ⊗2, except for the last row which gives −I ⊗2. Suppose we replace every observable in the square with some pre-determined value ±1, which is independent of how the observable is measured (non-contextual). To agree with quantum mechanical predictions each row and column of the square must multiply to 1, except the last row which must multiply to −1. Since this is impossible, we conclude that in quantum mechanics observables do not have pre-determined non-contextual values.

The square of toy observables corresponding to (13) has the property that every row and column is a set of commuting observables that multiply to give \({\mathcal {I}}^{\otimes2}\). Hence the corresponding values must multiply to 1, and this does not give rise to a contradiction. This is to be expected since in the toy theory all toy observables do indeed have a pre-determined non-contextual value, which could be calculated if the exact ontic state were known.

7 Summary

The similarities and differences between the qubit stabilizer formalism and Spekkens’ toy theory can be summarised as follows. States, transformations, and measurements in their most compressed representation—independent generators, canonical generator sets, and observables respectively—appear to be identical in both theories and are manipulated according to the same procedures.

Yet the underlying groups G n and P n are by no means identical, and so the results of “decompression”—calculation of the full subgroup of a state, and the effect of a transformation on all observables—will usually differ. This is the key difference between the two theories.

With the notation in hand it becomes much easier to make calculations in the theory. This enables proofs of two important facts not shown in [1]: that the number of epistemic states on n elementary systems is equal to the number of stabilizer states on n qubits, and a similar result for transformations. Whilst dealing with just three elementary systems was previously very difficult, the stabilizer notation makes the consideration of states on a arbitrary number of elementary systems tractable.