Spekkens' toy model in all dimensions and its relationship with stabilizer quantum mechanics
Lorenzo Catani Dan E. Browne


]Spekkens' toy model in all dimensions and its relationship with stabilizer quantum mechanics



1University College London, Physics and Astronomy department, Gower St, London WC1E 6BT, UK
lorenzo.catani.14@ucl.ac.uk


Spekkens' toy model is a non-contextual hidden variable model with an epistemic restriction, a constraint on what an observer can know about reality. The aim of the model, developed for continuous and discrete prime degrees of freedom, is to advocate the epistemic view of quantum theory, where quantum states are states of incomplete knowledge about a deeper underlying reality. Many aspects of quantum mechanics and protocols from quantum information can be reproduced in the model. 

In spite of its significance, a number of aspects of Spekkens' model remained incomplete. Formal rules for the update of states after measurement  had not been written down, and the theory had only been constructed for prime-dimensional, and infinite dimensional systems. In this work, we remedy this, by deriving measurement update rules, and extending the framework to derive models in all dimensions, both prime and non-prime.

Stabilizer quantum mechanics is a sub-theory of quantum mechanics with restricted states, transformations and measurements. First derived for the purpose of constructing error correcting codes, it now plays a role in many areas of quantum information theory. Previously, it had been shown that Spekkens' model was operationally equivalent in the case of infinite and odd prime dimensions. Here, exploiting known results on Wigner functions, we extend this to show that Spekkens' model is equivalent to stabilizer quantum mechanics in all odd dimensions, prime and non-prime. This equivalence provides new technical tools for the study of technically difficult compound-dimensional stabilizer quantum mechanics.












[
    Lorenzo Catani1 and Dan E. Browne1
    
======================================





§ INTRODUCTION


A long tradition of research, starting from the famous “EPR paper” <cit.>, has consisted of analysing quantum theory in terms of hidden variable models, with the aim of obtaining a more intuitive understanding of it. This has led to some crucial results in foundation of quantum mechanics, namely Bell's and Kochen-Specker's no-go theorems <cit.><cit.>. Nowadays a big question is whether to interpret the quantum state according to the ontic view, i.e. where it completely describes reality, or to the epistemic view, where it is a state of incomplete knowledge of a deeper underlying reality which can be described by the hidden variables.
In 2005, Robert Spekkens <cit.> constructed a non-contextual hidden variable model to support the epistemic view of quantum mechanics. The aim of the model was to replace quantum mechanics by a hidden variable theory with the addition of an epistemic restriction (i.e. a restriction on what an observer can know about reality). The first version of the model <cit.> was developed in analogy with quantum bits (qubits), with 2-outcome observables. Despite the simplicity of the model, it was able to support many phenomena and protocols that were believed to be intrinsically quantum mechanical (such as dense coding and teleportation). Spekkens' toy model has influenced much research over the years: e.g. people provided a new notation for it <cit.>, studied it from the categorical point of view <cit.>, used it for quantum protocols <cit.>, exploited similar ideas to find a classical model of one qubit <cit.>, and tried to extend it in a contextual framework <cit.>. Also Spekkens' toy model addresses many key issues in quantum foundations: whether the quantum state describes reality or not, finding a derivation of quantum theory from intuitive physical principles and classifying the inherent non-classical features.


A later version of the model <cit.>, which we will call Spekkens' Theory (ST), introduced a more general and mathematically rigorous formulation,  extending the theory to systems of discrete prime  dimension, where dimension refers to the maximum number of distinguishable measurement outcomes of observables in the theory, and continuous variable systems.
Spekkens called these classical statistical theories with epistemic restrictions as epistricted statistical theories. By considering a particular epistemic restriction that refers to the symplectic structure of the underlying classical theory, the classical complementarity principle, theories with a rich structure can be derived. Many features of quantum mechanics are reproduced there, such as Heisenberg uncertainty principle, and many protocols introduced in the context of quantum information, such as teleportation. However, as an intrinsically non-contextual theory, it cannot reproduce quantum contextuality (and the related Bell non-locality), which, therefore arises as the signature of quantumness. Indeed, for odd prime dimensions and for continuous variables, ST was shown to be operationally equivalent to sub-theories of quantum mechanics, which Spekkens called quadrature quantum mechanics. 




In the finite dimensional case quadrature quantum mechanics is better known as stabilizer quantum mechanics (SQM). The latter is a sub-theory of quantum mechanics developed for the description and study of quantum error correcting codes <cit.> but subsequently playing a prominent role in many important quantum protocols. In particular, many studies of quantum contextuality can be expressed in the framework of SQM, including the GHZ paradox <cit.> and the Peres-Mermin square <cit.><cit.>. This exposes a striking difference between odd and even dimensional SQM. Even-dimensional SQM contains classical examples of quantum contextuality while odd-dimensional SQM exhibits no contextuality at all, necessary for its equivalence with Spekkens' Theory. While developed for qubits, SQM was rapidly generalised to systems of arbitrary dimension,  <cit.>. However, for non-prime dimensions SQM remains poorly characterised and little studied (recent progress in this was recently reported in <cit.>).


In spite of its importance, there remain some important aspects of Spekkens' Theory which have not yet been characterised and studied. First of all, all prior work on ST have only considered systems where the dimension is prime. Furthermore, while Spekkens' recent work strengthens the mathematical foundations of the model <cit.>, one key part of the theory has not yet been described in a general and rigorous way. These are the measurement update rules, the rules which tell us how to update a state after a measurement has been made. In prior work, these rules, and the principles behind them have been described but not formalised. 

In this paper, we complete this step, deriving a formal description of the measurement rules for prime-dimensional ST. Having done so, we now have a fully formal description of the model, which can be used as a basis to generalise it. We do so, generalising the framework from prime-dimensions to arbitrary dimensions and finding that it is the measurement update rule, where the richer properties of the non-prime dimension can be seen, which provides the key to this generalisation.

Having developed ST for all finite dimensions, we then focus on the general odd-dimensional case, and prove that in all odd-dimensional cases Spekken's Theory is equivalent to Stabilizer Quantum Mechanics. The bridge between SQM and ST is given by Gross' theory (GT) of discrete Wigner function <cit.>. Unlike most other studies, Gross' treatment considered both prime and non-prime cases in its original formulation. 


To summarise the contributions of this paper,  we provide a compete formulation of ST in all discrete dimensions, even and odd, endowed with the updating rules for sharp measurements both for prime and non-prime dimensional systems. We extend the equivalence between ST and SQM via Gross' Wigner functions to all odd dimensions,  and  find the measurement updating rules also for the Wigner functions. 
The above equivalence allows us to shed light onto a complete characterisation of SQM in non-prime dimensions.
Finally the incredibly elegant analogy between the three theories in odd dimensions: ST, SQM and GT, is depicted in terms of their updating rules.

The remainder of the paper is structured as follows.
In section 1 we precisely and concisely describe the original framework of Spekkens' theory, in particular we define ontic and epistemic states, observables and the rule to obtain the outcome of the measurement of an observable given a state.
In section 2 and 3 we state and prove the updating rules in Spekkens' theory respectively for prime and non-prime dimensional systems. We prove these in two steps: first considering the case in which the state and measurement commute, and then the more general (non-commuting) case.  The mathematical difference between the set of integers modulo d, for d prime and non-prime, results in having two levels of observables: the fundamental ones - the fine graining observables - and the ones that encode some degeneracy - the coarse-graining observables. The latter are problematic and are only present in the non-prime case. This is the reason why we need a different formulation in the two cases. The updating rules for the coarse graining observables will need a step in which the coarse-graining observables are written in terms of fine graining ones.
In section 4 we state the equivalence of ST and SQM via Gross' Wigner functions in all odd dimensions. We also express the already found updating rules in terms of Wigner functions and we use them to depict the elegant analogies between these three theories.  
The paper ends with a discussion of the possible applications of our achievements and with a summary of the main results.





§ SPEKKENS' THEORY



We start by reviewing and introducing Spekkens' theory for prime-dimensional systems. We take a slightly different approach to <cit.> and <cit.>. ST is a hidden variable theory, where the hidden variables are points in a phase space. The state of the hidden variables is called the ontic state. In Spekkens' model the ontic state is hidden and can never be known by an experimenter. The experimenter's best description of the system is the epistemic state, representing a probability distribution over the points in phase space. 












For a single d-dimensional system, a phase space can be defined via the values of two conjugate fiducial variables, which we label X and P, in analogy to position and momentum. X and P can each take any value between 0 and d-1, and a single ontic state of the system is specified by a pair (x,p), where x is the value of X and p is the value of P. This phase space is equivalent to the space ℤ_d^2. In figure <ref>  three examples of epistemic states of one trit (d=3) are depicted, where X and P are represented by the rows and columns in the phase space ℤ_3.



A collection of n systems is described by n pairs of independent conjugate variables X_j and P_j, with j∈0,…,n-1 a label indexing the systems. The phase space, denoted by Ω, is simply the cartesian product of single system phases spaces and thus Ω≡(ℤ_d)^2n.[The dimension d is any positive number, and we will not, in general, restrict it to odd or even, prime or non-prime, unless specified.] 

The ontic state of the n-party system represents a set of values for each fiducial observables X_j and P_j. In other words, an ontic state is denoted by a point in the phase space λ∈Ω. We call  X_j and P_j observables because they correspond to  measurable quantities, and assume that these observables are sufficient to uniquely define the ontic state. 
We can refer to Ω as a vector space where the ontic states are vectors (bold characters) whose components (small letters) are the values of the fiducial variables: 
    λ=(x_0,p_0,x_1,p_1,…,x_n-1,p_n-1).



Not only are the fiducial variables important for defining the state space, they also generate the set of all general observables in the theory. A generic observable, denoted by Σ, is defined by any linear combination of fiducial variables: 
    Σ=∑_m(a_mX_m+b_mP_m),
 where a_m,b_m∈ℤ_d and m∈0,…, n-1. 
The observables inhabit the dual space Ω^*, which is isomorphic to Ω itself. 
Therefore we can define them as vectors, in analogy with ontic states, 
    Σ=(a_0,b_0,a_1,b_1,…,a_n-1,b_n-1).

The formalism provides a simple way of evaluating the outcome σ of any observable measurement Σ given the ontic state λ, i.e. by computing their inner product: 
    σ=Σ^Tλ=∑_j(a_jx_j+b_jp_j),
 where all the arithmetic is over ℤ_d.

Spekkens' theory gains its special properties, and in particular, its close analogy with stabilizer quantum mechanics via the imposition of an epistemic restriction, a restriction on what an observer can know about the ontic state of a system. The observer's best description is called the epistemic state, which is represented by a probability distribution p(λ) over Ω (figure <ref>).



The epistemic restriction of ST is called classical complementarity principle and it states that two observables can be simultaneously measured only when their Poisson bracket is zero. This is motivated by Stabilizer Quantum Mechanics, since it captures the condition for two observables in SQM to commute. We shall adopt the quantum terminology here, and say that if the Poisson bracket between two observables is zero they commute. This can be simply recast in terms of the symplectic inner product:

    ⟨Σ_1,Σ_2⟩≡Σ_1^TJΣ_2=0,
 where J= ⊕_j=1^n[  0  1; -1  0 ]_j is the symplectic matrix.
Note that each observable Σ_j partitions Ω into d subsets, each of the form (span{Σ_j})^⊥+w, where w is any ontic state such that Σ_j^T·w=σ_j.

Let us now consider sets of variables that can be jointly known by the observer. Such variables commute, and represent a sub-space of Ω known as an isotropic subspace. We denote the subspace of the known variables as V=span{Σ_1,…,Σ_n}⊆Ω, where Σ_i denotes one of the generators (commuting observables) of V.

Sets of known commuting variables are important as these define the epistemic states within the theory. In particular, we can define an epistemic state by the set of  variables V that are known by the observer and also the values σ_1,…,σ_n that these variables take. 


This means that Σ_j^T·w=σ_j, where w∈ V is an ontic state that evaluates the known observables. We will call w a representative ontic state for the epistemic state. More precisely we can state the following theorem.
EpistemicTheoremProposition

The set of ontic states consistent with the epistemic state described by (V,w) is 
    V^⊥+w,
 where the perpendicular complement of V is, by definition, V^⊥={a∈Ω  | a^T b=0 ∀  b∈ V }.



Let us start by considering the set of ontic states λ such that Σ_j^Tλ=0  ∀ j. By definition of perpendicular complements, the ontic states λ belong to V^⊥. If we consider an ontic state w such that Σ_j^T w=σ_j, then Σ_j^T (λ+w)=σ_j. Therefore the ontic states consistent with the epistemic state associated to (V,w) are the ones of the kind λ+w, i.e. the ones belonging to V^⊥+w. 

Note that the presence of w≠0 simply implies a translation, that is why we can also call it shift vector.



By assumption the probability distribution associated to the epistemic state (V,w) is uniform (indeed we expect all possible ontic states to be equiprobable), so the probability distribution of one of the possible ontic states in the epistemic state (V,w) is 
    P_(V,w)(λ)=1/d^nδ_V^⊥+w(λ),
 where the delta is equal to one only if λ∈ V^⊥+w (note this means that the theory is a possibilistic theory). 
In figure <ref> we specify the subspaces V and V^⊥ in three different examples of epistemic states of one trit.

We can sum up our approach to Spekkens' model as follows:


  * Start from the intuitive (physically justified) formula (<ref>) that relates observables Σ_j, ontic states λ and outcomes σ_j.

  * Epistemic restriction: the compatible observables are the ones whose symplectic inner product is zero.

  * Compute the shift vector w. This allows us to shift back the set of points λ to obtain a subspace.

  * The set of ontic states compatible with the epistemic state (V,w) is V^⊥+w, where V is the isotropic subspace spanned by the observables Σ_j (the set of known variables).

We say that this approach is physically intuitive because we start with equation (<ref>), which is physically motivated and states, observables and the corresponding outcomes are defined in terms of it. Equation (<ref>) also allows us to see that the shift comes from the need to recover the subspace structure. 





§ UPDATING RULES - PRIME DIMENSIONAL CASE
 
The formulation of ST in <cit.>, made for prime (and infinite) dimensional systems and described in the previous section, does not provide a full treatment of the transformative aspect of measurements, i.e. how the epistemic state has to be updated after a measurement procedure. In the following we will provide a proper formalization of it, and in the next section we will generalise the formalism to all dimensions, non-prime too.

The set of integers modulo d shows different features depending on d being prime or not. In particular in the non-prime case it is not always possible to uniquely define the inverse of a number. The consequences of this will directly affect the updating rules. In particular the possible observables sometimes will not show full spectrum: some outcomes will not be possible because they would derive from arithmetics involving numbers with not well-defined inverses. This will divide the set of possible observables in two categories depending on whether they have full spectrum or not. We start from the prime case where problematic observables are not present because inverses always exist.

Like in quantum theory, duality in the description of states and measurements characterises ST. This means that we can represent the elements of a measurement Π in an epistemic-state way, (V_Π,r), where we can go from one element of the measurement to the other by simply shifting the representative ontic vector r (see figure <ref>). In ST the measurement process corresponds to the process of learning some information (aka asking questions) about the ontic state of the system. According to the classical complementarity principle only the observables that are compatible (i.e. Poisson-commute) with the state of the system can be learned (jointly knowable). This means that the state after measurement will be given by the generators of the state before the measurement and the generators of the measurement which are compatible with it.[As an abuse of language we here talk of generators of a state meaning the orthogonal basis set that generates the subspace of known variables associated with the state.]
It is then fundamental to understand how compatible sets of ontic states (the isotropic subspaces of known variables V and their perpendicular V^⊥) change when independent observables are added and removed from the set of known variables V.







 §.§ Adding and removing generators to/from V





  * Let us start with the case of adding a generator Σ' to the set of generators of V=span{Σ_1,…,Σ_n}.  We assume that Σ' is linear independent with respect to the set spanned by the Σ_j. Let us see what happens to V^⊥.
The subspace V after the addition becomes 
    V'=V⊕ span{Σ'}.

By definition the direct sum of two subspaces A⊕ B returns a subspace such that for each a∈ A and b∈ B, the sum a+b belongs to A⊕ B. The direct sum of two subspaces is a subspace.
We are interested in the orthogonal complement of a direct sum. It is well known that (A⊕ B)^⊥=A^⊥∩ B^⊥.
This means that by adding a generator to V, its perpendicular V^⊥ is given by 
    V'^⊥=V^⊥∩ (span{Σ'})^⊥.
 Note that V'^⊥ is smaller than V^⊥.



  * We now analyse what happens if we remove a generator, say Σ_n, from the set of generators of V. This means that now V'=span{Σ_1,…, Σ_n-1}.  The set V^⊥ is clearly contained in V'^⊥, since any vector orthogonal to all elements of V must also be orthogonal to all elements of V'.
By definition, the set V'^⊥ is composed by all the ontic states λ such that Σ_j^T λ=0 for all j<n, but Σ_n^T λ≠ 0.
This means that we need to remove the constraint Σ_n^T λ = 0 to enlarge V^⊥ to V'^⊥, i.e. 


 we simply need to add the ontic states λ'=cγ to V^⊥, where c∈ℤ_d≠0 and γ is a vector such that Σ_n^Tγ=1. 
Indeed this implies that 
    Σ_n^T(λ+λ')=Σ_n^T(λ+cγ)=0+c≠ 0.
 
In prime dimensions γ uniquely exists and it corresponds to k^-1Σ_n, where k=Σ_n^TΣ_n. Indeed the inverse of an integer k∈ℤ_d≠ 0 always uniquely exists if d is a prime number. 
The formula for V'^⊥ then reads

    V'^⊥=⋃_c (V^⊥+ ck^-1Σ_n)≡⋃_w_n∈ V_n(V^⊥+w_n) = V^⊥⊕ V_n,
 where the addition of + w_n means that the whole set V^⊥ is shifted by w_n, and V_n=span{Σ_n}. 
The previous trick in general works as follows. Given the ontic state λ, the observable Σ and the outcome σ associated with them, i.e. Σ^Tλ=σ, then it is possible to shift the value σ by a constant k such that Σ_n^TΣ_n=k, by only adding Σ itself to the ontic state: 
    Σ^T(λ+Σ)=σ +Σ^TΣ=σ + k.

Note that the above identity allows us to change the value of the outcome associated with an ontic state by a constant factor (that we can also choose) without affecting any commuting observable (in this case Σ).






 §.§ Measurement updating rules
 

We now want to find the updating rules for the state (V,w) of a prime dimensional system when we perform a measurement (V_Π,r) on it. We will consider V_Π being spanned by the generators denoted as Σ'_j. The representative ontic vector associated to the measurement, r, is such that, by definition, Σ'_j^Tr=σ'_j, where the σ'_j are the outcomes associated with the measurement.   
The subspace of known variables V can be written in terms of the sets generated by the generators Poisson-commuting with all the Σ'_j, V_commute, and non-commuting ones, V_other. According to this definition V_commute will always be a subspace. We cannot state the same for V_other, since the null vector does not belong to it. For this reason we augment V_other with the null vector in order to create a subspace.
This implies that we can decompose V as 
    V=V_commute⊕ V_other.

We can also prove the following lemma.
LemmaNonCommutingLemma

The subspace V_other has dimension m, where m is the number of non-commuting generators of the measurement with the state.



Let us initially assume the measurement to consist only of one non-commuting generator Σ', so m=1. Let us prove the lemma by contradiction. Let u,v be two orthogonal non-zero elements of V_other. Note that, by definition of a subspace, if u,v∈ V_other, also a linear combination of u,v has to belong to V_other. 
By definition u,v do not commute with Σ'. Therefore we can write 
    Σ'^T J u=a,
 
    Σ'^T J v=b,
 where a,b≠0. In particular there will exist a constant c∈ℤ_d such that a-bc=0. This implies that 
    Σ'^T J (u-cv)=0.
 Hence the linear combination (u-cv) belongs to V_commute. This is a contradiction, therefore V_other has dimension 1.
From the same reasoning, in the case of m non-commuting generators of the measurement, the subspace V_other has dimensions at maximum equal to m. Let us assume now that the dimension of V_other is m-1. This is not possible because it would mean that, for example, Σ'_m-1 can be written as a linear combination of Σ'_0,…,Σ'_m-2. However this is not the case because, by definition of basis set, all the generators are linearly independent. Therefore V_other has dimension m.









We will now provide the updating rules both for V and w in two steps: first considering the state and measurement to commute, and then the general (non-commuting) case. 



TheoremTheorem

Commuting case. The epistemic state (V,w) after a measurement (V_Π,r) that commutes with it, i.e. their generators all Poisson commute, is described by the epistemic state (V',w') such that 
    V'^⊥=(V^⊥+w-w')∩(V_Π^⊥+r-w'),
 where w' is given by equation 
    w' = w+∑_iΣ'_i^T(r-w)γ_i,
 where Σ'_i are the generators of the measurement Π and γ_i is such that Σ'_i^Tγ_i=1.




When the state and measurement commute we have to add the generators of the measurement to the set of generators of V, as we have seen in the previous subsection <ref> (learning stage). Therefore the updating rule for the subspace V is (equation (<ref>)) 
    V→ V'=V⊕ span{Σ'_0,Σ'_1,…Σ'_i,…}= V⊕ V_Π.
 In terms of perpendicular subspaces this implies that V'^⊥=V^⊥∩ V_Π^⊥.


Let us initially assume the measurement to consist only of one generator Σ'. 
Let us recall that the outcome associated with Σ' is σ'. We assume w is not compatible with this outcome, i.e. Σ'^Tw=σ'+x, for some shift x∈ℤ_d, and we want to find w' such that 
    Σ'^Tw'=σ'.

The identity (<ref>) we used in the previous section does the job. More precisely, 
    w'=w-xγ,
 where the vector γ is such that Σ'^Tγ=1. The above expression can be also written as 
    w'= w-k^-1xΣ',
 where k=Σ'^TΣ'. The inverse of k always exists because we are in the prime dimensional case. Without referring to x we can restate the updating rule for the representative ontic vector as 
    w→w+k^-1(σ'-Σ'^Tw)Σ'= w+k^-1Σ'^T(r-w)Σ'.
 Note that if we consider more than one generator of the measurement, we simply have to sum over all those generators in the second term. This immediately follows from considering the whole measurement Π as a sequence of measurements given by each generator Σ'_i and apply every time the rule (<ref>).
We state again that the above formula always holds for prime dimensional systems. We cannot claim the same in non-prime dimensions.
The correct updating rule for the subspace V'^⊥ is found by combining the updating rules for V and w as in (<ref>).
This correction simply sets the subspaces to the same origin in order to correctly compute their intersection, as schematically shown in figure <ref>. At the end we obtain for the epistemic state (V',w') that V'^⊥+w'=(V^⊥+w)∩(V_Π^⊥+r).
We recall that the probability associated to each ontic state consistent with the epistemic state is uniform, i.e. given by 
    P(V',w') =1/|V'^⊥+w'|=1/|V'^⊥| = 1/|(V^⊥+w)∩(V_Π^⊥+r)|,
 where |·| indicates the size of the subspace.



Figure <ref> shows a basic example of theorem <ref>.






NonCommutingTheorem[Theorem]Theorem

Non-commuting case. The epistemic state (V,w) after a measurement (V_Π,r) that does not commute with it, i.e. some of the generators do not Poisson commute with the state, is described by the epistemic state (V',w') such that 
    V'^⊥=(V_commute^⊥+w-w')∩(V_Π^⊥+r-w'),
 where V_commute^⊥ is given by 
    V_commute^⊥=V^⊥⊕ V_other.
 The representative ontic vector w' is given by 
    w' = w+∑_iΣ'_i^T(r-w)γ_i,
 where Σ'_i are the generators (even the non-commuting ones) of the measurement Π and γ_i is such that Σ'_i^Tγ_i=1.




Let us assume that Σ'_j, for j∈{0,…,m-1}, do not commute with the generators of V. In addition to the learning stage of the previous commuting case, we also have a removal stage of the disturbing part of the measurement. We have already seen that we can split the subspace V in V=V_commute⊕ V_other, where V_other is generated, from lemma <ref>, by all the Σ'_j, for j∈{0,…,m-1}.  Therefore we can reduce to the commuting case if we only consider V_commute instead of the whole V. The updating rule for the subspace V then becomes 
    V→ V' =V_commute⊕ span{Σ'_0,Σ'_1,…Σ'_i,…} =V_commute⊕ V_Π.

In terms of the perpendicular subspaces note that we can both write 
    V'^⊥=(V^⊥⊕ V_other)∩ V_Π^⊥,
 and 
    V'^⊥=V_commute^⊥∩ V_Π^⊥,
 from the usual property that the perpendicular of a direct sum is the intersection of the perpendicular subspaces. The updating rule for the representative ontic vector is the same as in the previous case (equation (<ref>)). The correct updating rule for the subspace V'^⊥ is found by combining the updating rules for V and w as in the previous case (<ref>), where V^⊥ is replaced by V^⊥_commute. At the end we obtain for the epistemic state (V',w') that V'^⊥+w'=(V_commute^⊥+w)∩(V_Π^⊥+r).



Figure <ref> shows a basic example of theorem <ref>.










§ UPDATING RULES - NON PRIME DIMENSIONAL CASE


It is quite common in studies of discrete theories, like Spekkens' model and SQM, to only consider the prime dimensional case because of the particular features of the set of integers modulo d, ℤ_d, when d is non-prime, like the impossibility of uniquely define inverses of numbers. For example in our present case, figure <ref> shows the peculiar properties of the observable 3X in d=6, which has not full spectrum of outcomes. The general formulation of Spekkens' model of section <ref> does not change; not even the rules for calculating the probabilities of outcome and the updating of the state after a reversible evolutions (which are present in <cit.>). The new formulation we provide affects the observables and the related measurements updating rules. More precisely our issue, as already noticed, regards the updating-rule formula (<ref>) and (<ref>) for the shift vector w' and the subspace V^⊥_commute, which do not always hold when the dimension d is non-prime. In fact the vector γ_i such that Σ'_i^Tγ_i=1 does not always exist in that case. On the other hand, in prime dimensions, it always uniquely exists because γ_i=k_i^-1Σ'_i and the inverse of the integer k_i=Σ'_i^TΣ'_i always uniquely exists. 
Unlike the original formulation due to Spekkens, we will now characterise Spekkens' model in non-prime dimensions. In particular we characterise which are the observables that are problematic in the above sense - the coarse-graining observables, like 3X in d=6 - and we then find the updating rules for a state subjected to the measurement of such observables by rewriting them in terms of non-problematic observables - the fine-graining observables.

In the next subsection we assume single-system observables (i.e. of the kind Σ'=aX+bP, a,b∈ℤ_d) in order to soften the notation and facilitate the comprehension. This will bring more easily to the updating rules even in the most general case of many systems (subsection <ref>).
In this case we recall, without making any reference to the quantity k^-1, but just in terms of the vector γ, the updating rule for the shift vector w', 

    w'=w-xγ,
 where, as usual, x=-Σ'^T(r-w), and the expression for V^⊥_commute,

    V^⊥_commute=⋃_c(V^⊥+cγ).








 §.§ Coarse-graining and fine-graining observables


We define a fine-graining observable as an observable that has full spectrum, i.e. it can assume all the values in ℤ_d. On the contrary a coarse-graining observable has not full spectrum.
FineTheorem[LemmaNonCommuting]Lemma

An observable O_fg has full spectrum, i.e. it is a fine-graining observable, if and only if it has the following form, 
    O_fg=a'X+b'P,
 where a',b'∈ℤ_d are such that they do not share any integer factor or power factor of d. 


On the contrary a coarse-graining observable is written as 
    O_cg=aX+bP=D(a'X+b'P),
 where a',b' ∈ℤ_d are again such that they do not share any integer factor or power factor of d and D is a factor shared by a,b∈ℤ_d. More precisely the factor D is called degeneracy  and it is defined as 
    D=D_1^n_1· D_2^n_2·… ,
 where D_1,D_2,… are different integer factors of d shared by a and b, and n_1,n_2,… are the maximum powers of these factor such that they can still be grouped out from a and b. We take the maximum powers because we want the remaining part, a'X+b'P, to not share any common integer factor or power factor of d between a' and b'. In this way we can associate a fine-graining observable to a coarse graining one by simply dropping the degeneracy D from the latter.



Let us first prove that an observable of the kind (<ref>), O_fg=a'X+b'P, is a full spectrum one. 
This can be proven by using Bezout's identity <cit.>: let a' and b' be nonzero integers and let D be their greatest common divisor. Then there exist integers X and P such that aX+bP=D. In our case the greatest common divisor D is equal to one, since a',b' are coprime. [ It could be that a',b' share a factor which is not a factor of d. In this case the argument follows identically as if they were coprime.] Therefore we have proven that there exist values of the canonical variables X,P∈ℤ_d such that O_fg=a'X+b'P=1. In order to reach all the other values of the spectrum we simply need to multiply both X and P in the previuos equation by j∈ℤ_d.

We now prove the converse, i.e. that a full spectrum observable implies it to be written as (<ref>). We prove this by seeing that an observable written as (<ref>) has not full spectrum, i.e. we negate both terms of the reverse original implication. Proving the latter is straightforward, since the multiplication modulo d between an arbitrary quantity and a factor D, which is given by powers of integer factors of d, gives as a result a multiple of D. Since the multiples of D do not cover the whole ℤ_d, then any observable of the form (<ref>) has not full spectrum. [Multiples of D do not cover the whole spectrum of ℤ_d because D has not an inverse D^-1  (it is not coprime with d) and so we cannot obtain the whole values σ of ℤ_d by simply finding X,P such that a'X+b'P=D^-1σ.] 
 Since an observable of the form (<ref>) is an observable that cannot be written as (<ref>) by definition, we obtain that a full spectrum observable implies the observable to be written as (<ref>).




Given lemma <ref> we have got the expressions (<ref>) and (<ref>) for coarse-graining and fine-graining observables. We want now to prove the following lemma to ensure that fine-graining observables are characterised by precisely defined updating rules.

GammaTheorem[LemmaNonCommuting]Lemma

The vector γ in the updating rule (<ref>) for the shift vector w' and in the equation (<ref>) for the subspace V^⊥_commute exists if and only if the observable is a fine-graining one.

  

Let us prove that if we have a fine graining observable the vector γ exists. In our case Σ'=(a',b') and, by definition of a',b' (as usual defined for fine-graining observables) and full spectrum, we can always find a vector γ=(γ_a,γ_b) such that  Σ'^Tγ=a'γ_a + b'γ_b equals 1.

Let us prove the converse. We now have the vector γ such that Σ'^Tγ=aγ_a + bγ_b=1, where the coefficients a,b∈ℤ_d define our observable aX+bP=σ. We want to prove that σ can achieve all the values of ℤ_d. Since  Σ'^Tγ=1 we can set the values of (X,P) as equal to (γ_a,γ_b) in order to reach the value σ=1. We can now achieve all the other values of the spectrum by simply redefining γ as γ̃=c γ, where c assumes all the values in ℤ_d. 

  

The above lemma <ref> should convince us that in order to find the updating rules in the presence of a coarse graining observable, it is appropriate to decompose it in terms of fine-graining observables. 
Let us assume that our coarse-graining observable is O_cg=aX+bP=D(a'X+b'P)=σ, and the associated isotropic subspace and representative ontic vector are (V_cg,r_cg). To this observable we can associate D̅ different fine-graining observables O_fg=a'X+b'P=σ_j, where j∈0,…,D̅-1. The quantity D̅ is the degeneracy D without the powers n_1,n_2,…, i.e. D̅=D_1· D_2 ·…. Indeed the powers n_1,n_2,… simply represent multiplicities associated to each corresponding fine-graining observable. The associated isotropic subspaces and representative ontic vectors are (V_fg,r^(j)_fg), where V_fg=span{(a',b')} (see figure <ref>).



By definition the perpendicular isotropic subspaces are 
    V^⊥_cg ={v=(v_a,v_b)∈Ω | v_a a + v_b b  =D(v_a a' + v_b b')=0  mod(d)}
 
    V^⊥_fg={v' =(v'_a,v'_b)∈Ω | v'_a a' + v'_b b'=0  mod(d)}.
 
It is clear that V^⊥_cg⊃ V^⊥_fg and we can therefore construct V^⊥_cg  as 
    V^⊥_cg = ⋃^D̅-1_j=0(V^⊥_fg+v_j) =V^⊥_fg⊕ V_D,
 where the subspace V_D provides all the vectors that we need to combine with the vectors of  V^⊥_fg to reach the whole V^⊥_cg. We call the subspace V_D the degeneracy subspace because it encodes the degeneracy of V_cg with respect to V_fg . It has dimension 1 and size D̅. 

 This is consistent with the fact that the dimensions of V^⊥_cg and V^⊥_fg are respectively 2 and 1. The sizes are respectively D̅· d and d. 
The size of V^⊥_fg is d because it is always a maximally isotropic subspace and its dimension is 1 because from one generator we get all the other vectors of the subspace by multiplication with j∈ℤ_d. The dimension V^⊥_cg is 2 because it cannot be 1 (it would be the same subspace as V^⊥_fg) and it cannot be greater than 2 since also the whole phase space Ω=ℤ^2_d has dimension 2. In order to know the size of V^⊥_cg we need to count all the jv, where j∈{0,1,…,D̅-1}, that means D̅· d.
Therefore it can be written as V_D=span{v}, and all its D̅ vectors are of the kind v_j=j v. The above reasoning easily extends to the case of n systems, where the dimensions are dim(V^⊥_cg)=2n,  dim(V^⊥_fg)=n,  dim(V_D)=n, and the sizes are |V^⊥_cg|=D̅^nd^n,   |V^⊥_fg|= d^n,   |V_D|=D̅^n. 
We can now prove that V_D is a vector space. 

The definition of V_D is 
    V_D ={v∈Ω | αw + βv=t, where 
     w∈ V^⊥_fg,  α,β∈ℤ_d, t∈ V^⊥_cg}.

To see that it is a vector space we just need to see that (0,0) belongs to V_D and that V_D is closed under addition and multiplication, i.e. under linear combinations. The null vector belongs to V_D because in the definition (<ref>) we would remain with αw=t, where w∈ V^⊥_fg and V^⊥_fg⊂  V^⊥_cg.  Let us imagine that we have two vectors  v,z∈ V_D. Is the vector γv+ δz, where γ,δ∈ℤ_d, still belonging to V_D? It is easy to see that if we apply the definition (<ref>) we would get 
    αw+β(γv+ δz),
 which can be rewritten as 

    ( αw+βγv)+ (0·w+ βδz),
 where each of the two terms in parenthesis belong to V^⊥_cg, and therefore the whole expression belongs to it too.


We now define the shift vectors r^(j)_fg in terms of r_cg and see that we can encode the degeneracy expressed by V_D in there. The idea is schematically depicted in figure <ref>.



Given the shift vector associated to the coarse-graining observable r_cg, the shift vectors r^(j)_fg associated to the corresponding fine-graining observables are of the kind 
    r^(j)_fg=r_cg+v_j,
 where v_j∈ V_d and are therefore of the kind jv, where j∈{0,…,D̅-1}. This implies that if we assume the outcome associated to the coarse-graining observable to be σ_cg, i.e. Σ^T_cgr_cg=σ_cg, where Σ_cg=(a,b), then the outcomes associated to the fine graining-observables are 
    Σ^T_fgr^(j)_fg=Σ^T_fg(r_cg+jv)=σ_cg/D+jC,
 where C is the anti-degeneracy and it is defined as a non-zero number belonging to ℤ_d such that D· C=0   mod(d). The idea is that the vector v∈ V_D is such that Σ^T_fgv=C≠ 0, so it does not belong to V^⊥_fg, but it does belong to V^⊥_cg, since D· C=0  mod(d). An easy way to find one of the possible v is to calculate it as CΣ_fg, where Σ_fg is the generator of V_fg.  In this way we know that Dv=0, but v does not belong to V^⊥_fg, i.e. v_a a' + v_b b'≠ 0 because Σ_fg is not in V_fg^⊥.
It is important to notice that equation (<ref>) implies that not all the outcomes are allowed for the fine-graining observables associated to the coarse-graining one; they are allowed only when the ratio σ_cg/D exists. Figure <ref> also explains this fact.





 §.§ Measurement updating rules
 








Let us assume to have n systems and to measure the coarse-graining observable O_cg=a_1X_1+b_1P_1+… +a_nX_n+b_nP_n=D(a'_1X_1+b'_1P_1+… +a'_nX_n+b'_nP_n)=σ_cg, with corresponding isotropic subspace of known variables V_cg and shift vector r_cg, on the state ρ=α_1X_1+β_1P_1+… +α_nX_n+β_nP_n=σ, with corresponding isotropic subspace of known variables V=span{Σ_1,…,Σ_n} and shift vector w.
The idea in order to find the updating rules for the state after measurement, the subspace of known variable V' and the representative ontic vector w' is to compute the updating rule of the initial state ρ with the fine-graining observables that are associated to the coarse graining observable O_cg, i.e. O^(j)_fg=a'_1X_1+b'_1P_1+… +a'_nX_n+b'_nP_n=σ^(j)_fg (indeed we know that the updating rules are valid for them from theorem <ref>), and then combine them together. More precisely, the following theorem holds.

FinalbisTheorem[Theorem]Theorem


The epistemic state (V,w) after a coarse-graining measurement (V_cg,r_cg) is described by the epistemic state (V',w') such that 
    V'^⊥=⋃^D̅-1_j=0 [(V_commute^⊥+w-w')∩(V^⊥_fg+r^(j)_fg-w')],
 where the shift vector w' is the shift vector deriving from the updating rule of the state after the measurement of the fine-graining observable O^(j)_fg, 
    w'=w'_j=w+∑_i=0^nΣ'^T_i(r^(j)_fg-w)γ_i,
 where the vectors γ_i are defined such that Σ'^T_iγ_i=1, and Σ'_i are the n generators of the subspace V_fg associated to the fine-graining  observable O^(j)_fg. The subspace V_commute^⊥ is given by the original V after having removed the non-commuting part, i.e. equation (<ref>), 
    V_commute^⊥=⋃^d_c=1(V^⊥+∑_l=N+1^ncγ_l)=V^⊥⊕_l=N+1^n V_l = V^⊥⊕ V_other,
 where γ_l is such that Σ_l^Tγ_l=1 and V_l are the subspaces spanned by the (n-N) non-commuting generators Σ_l. Obviously if the state and measurement commute, then V_commute^⊥=V^⊥. 


The above theorem tells us that the way we combine the updating subspaces of the state with each individual fine-graining observables is through their union. This result is clear in terms of schematic diagrams (figure <ref>). The updated shift vector is just one of the updated shift vectors of the state with the fine-graining observables, because the information needed to update the shift vector of the state is encoded in just one of the fine-graining shift vectors. The degeneracy includes a meaningless multiplicity in the coarse-graining shift vector, and therefore every fine-graining observable can do the job of correctly updating the shift vector of the state. Actually every combination of the shift vectors w'_j can do the job, apart from the ones that sum to 0  mod(d), like ∑_j=0^D̅-1w'_j. 
Note also that in the definition of V^⊥_commute the vector γ_l is, in general, degenerate. This is not a problem because any degenerate value of γ_l brings to the same subspace V^⊥_commute, since by definition its role is to add the vectors λ'=cγ_l to V^⊥ such that Σ_n^Tλ'≠0. 



 





We find the expression for the updated subspace V'^⊥ by simply reusing the already found formulas (<ref>) and (<ref>) of the prime-dimensional case and substituting V^⊥_Π with V^⊥_cg and r with r_cg, 
    V'^⊥=(V_commute^⊥+w-w')∩(V^⊥_cg+r_cg-w').
 If we now consider the decomposition of V^⊥_cg+r_cg as in  (<ref>) and (<ref>), we obtain 
    V'^⊥=(V_commute^⊥+w-w')∩[∪^D̅-1_j=0 (V^⊥_fg+r^(j)_fg)-w'].
 Since the intersection of a union is the union of the intersections, we have proven the first part of the theorem, 
    V'^⊥=⋃^D̅-1_j=0 [(V_commute^⊥+w-w')∩(V^⊥_fg+r^(j)_fg-w')].
 
The second part of the proof regards w' being equal to any of the w'_j.  Because of the degeneracy, any w'_j is equivalent to the others (with different value of j) in order to provide us with w', indeed it is possible to find one from another just by adding a vector v∈ V_D. The latter can be proven as follows. For simplicity let us assume to be in the case n=1 and that v is the generator of V_D. We know that, by the definition of state after measurement of a fine-graining observable, the updated shift vector w'_j is such that Σ^T_fgw'_j=σ_cg/D+jC=σ^(j)_fg, where C=Σ^T_fgv is the antidegeneracy (equation (<ref>)). It is straightforward to see that if we add v to w'_j, we get w'_j+v=w'_j+1, indeed Σ^T_fg(w'_j+v)=σ_cg/D+(j+1)C=σ^(j+1)_fg. 


Figure <ref> shows a basic example of theorem <ref>.



















§ EQUIVALENCE OF SPEKKENS' THEORY AND SQM IN ALL ODD DIMENSIONS


In <cit.> it has been shown that SQM and Spekkens' toy model are two operationally equivalent theories in odd prime dimensions via Gross' theory of discrete non-negative Wigner functions. We have generalised Spekkens' model to all discrete dimensions. The above equivalence does not hold in even dimensions, but we will now see that it holds in all odd dimensions. We will also state the equivalence in terms of the updating rules, where all its elegance arises.  
We recall that SQM and Gross' theory of non-negative Wigner functions are equivalent in all odd dimensions <cit.>. 



 §.§ SQM - updating rules

Stabilizer quantum mechanics is a subtheory of quantum mechanics where we only consider common eigenstates of tensors of Pauli operators, unitaries belonging to the Clifford group, and Pauli measurements <cit.>. We can always write a stabilizer state ρ as 
    ρ=1/𝒩ρ_1·ρ_2·…·ρ_N,
 where 𝒩=Tr[ρ_1·ρ_2·…·ρ_N], j ∈{1,…, N≤ n}, n is the number of qudits and 
    ρ_j=(𝕀_d+g_j+g_j^2+…+g_j^d-1),
 where g_j is a stabilizer generator, more precisely a Weyl operator: 
    Ŵ(λ)=χ(pq)Ŝ(q)B̂(p),

where χ(pq)=e^2π i/dpq, q,p are the coordinates of the phase space point λ=(q,p), and  Ŝ,B̂ are respectively the shift and boost operators (generalised Pauli operators) and the arithmetics is modulo d, 
    Ŝ(q)=∑_q'∈ℤ_d|q'-q⟩⟨q'|
 

    B̂(p)=∑_q∈ℤ_dχ(pq)|q⟩⟨q|.


When considering more than one qudit, the Weyl operator is given by the tensor product of the single Weyl operators. 
We can write the stabilizer state ρ in a more compact way as 
    ρ = 1/𝒩∏_j^n∑_i^d-1 g_j^i.

However we will mostly use the following notation in terms of stabilizer generators, 
    ρ→⟨ g_1,…, g_N⟩ .
  
We now analyse the updating rules for the state ρ under the stabilizer measurement Π, 
    Π→⟨ p_1,…, p_M⟩
 where p_k is a stabilizer generator of Π and k ∈{1,…, M≤ n}.
We analyse the updating rules first in the commuting case ([ρ,Π]=0) and then in the general case.



  * For non-disturbing (commuting) measurements, the state after measurement ρ' is given by adding the stabilizer generators of the measurement Π and the state ρ, unless some generators coincide. In the latter case we obviously count them only once. 
    ρ' →⟨ g_1,g_2,…, g_N, p_1,p_2,…, p_M⟩,
 where we have here considered the case in which no generators coincide. This formula means that the state ρ' is now 
    ρ'= 1/𝒩∏_j^N^*∑_i^d-1 r_j^i,
 where N^*=N+M and r_j is a stabilizer generator of ρ', i.e. it is either a valid (commuting) generator g_j or p_j.  In the case where e.g. F generators coincide, then N^*=N+M-F.



  * For disturbing (non-commuting) measurements (the most general case) the idea is that if we remove the non-commuting factors ρ_j from the state ρ, i.e. [ρ_j,Π]≠ 0, this case reduces to the previous commuting one. We assume the state ρ to have only one non-commuting factor, say ρ_N, which corresponds to the stabilizer generator g_N. 
The state after measurement ρ' is given by removing the non-commuting generator and adding the remaining ones of the state and measurement, unless some generators coincide. In the latter case we obviously count them only once.  

    ρ' →⟨ g_1,g_2,…, g_N-1, p_1,p_2,…, p_M⟩,
 where we have here considered the case in which no generators coincide. This formula means that the state ρ' is now 
    ρ'=1/𝒩∏_j^N^*∑_i^d-1 r_j^i,
 where N^*=N+M-1 and r_j is a stabilizer generator of ρ', i.e. it is either a valid (commuting) generator g_j or p_j.  In the case where e.g. F generators coincide, then N^*=N+M-1-F.

To sum up, in the commuting case we add generators of state and measurement to obtain the state after measurement. In the non-commuting case we remove the non-commuting generator of the state and add all the others as in the commuting case. This structure is perfectly analogue to Spekkens' updating rules, which are just motivated by the classical complementarity principle.






 §.§ Gross' Wigner functions - updating rules


Gross theory. In Gross' theory the Wigner function of a state ρ in a point of the phase space λ∈Ω is given by 
    W_ρ(λ)=Tr[Â(λ)ρ],
 where Â(λ) is the phase point operator associated to each point λ, 
    Â(λ)=1/d^n∑_λ'∈Ωχ(⟨λ,λ'⟩)Ŵ(λ'),
 where Ŵ(λ) are the Weyl operators defined in equation (<ref>). Note that the normalisation is such that Tr[Â(λ)]=1.
We recall that a stabilizer state is a joint eigenstate of a set of commuting Weyl operators.
Two Weyl operators commute if and only if the corresponding phase-space points a,a' have vanishing symplectic inner product:

    [Ŵ(a),Ŵ(a')]=0  if and only if ⟨a,a'⟩=a^TJa'=0.

This result derives from the product rule of Weyl operators: 
    Ŵ(a)Ŵ(a')=χ(⟨a,a'⟩)Ŵ(a+a').

From this result, the sets of commuting Weyl operators, and, as a consequence, the stabilizer states, are parametrized by the isotropic subspace M of Ω. More precisely, for each M and each w∈Ω we can define a stabilizer state (Gross construction) ρ_M,w as the projector onto the joint eigenspace spanned by {Ŵ(a):a∈ M}, where Ŵ(a) has eigenvalue χ(⟨w,a'⟩). The Wigner function associated to the state ρ_M,w is always positive (necessary and sufficient condition in odd dimensions) and it is of the kind 
    W_(m,w)(λ)=1/d^nδ_M^C+w(λ),
 where M^C is the symplectic complement of M. 
Moreover the transformations that preserve the positivity of the Wigner functions are the Clifford unitaries. Gross' theory of non-negative Wigner functions is a faithful way of representing SQM.  












Equivalence of ST and GT. The Wigner function (<ref>) has the same form of the probability distribution (<ref>) associated to the epistemic state (V,w) in Spekkens' theory. More precisely, they are equivalent if we assume M=JV,[Note that the action of J is simply to map a variable into its conjugated.] indeed this transformation implies that V^⊥=M^C.  
The equivalence between Gross' theory and Spekkens theory, using the symplectic matrix J as the bridge, also extends in terms of transformations and measurement statistics <cit.>. This equivalence also implies the equivalence between Spekkens' theory and SQM in odd dimensions. Therefore we can see the description based on known variables (Spekkens) and the description based on Wigner functions (Gross) as two equivalent descriptions of stabilizer quantum mechanics in odd dimensions. We will now translate the already found updating rules of ST into Gross' Wigner functions.






Updating rules. Let us consider a stabilizer state ρ=ρ_1·ρ_2·…·ρ_n, where n is the number of qudits (odd prime dimensions), and a measurement Π on the stabilizer state Π=Π_1·Π_2 …·Π_m, where, in general, m≤ n. Let us assume m=n in order to consider "total" measurements (not only to a part of the state). 


CommutingTheorem[Theorem]Theorem

Commuting case. Let us assume the state and measurement to commute, i.e. [ρ,Π]=0. The Wigner function of the state after measurement is 
    W_ρ'(λ)=  1/N W_ρ(λ)R_Π(λ),
 where λ∈Ω and R_Π denotes the Wigner function (also called response function) associated with the measurement Π. The normalisation factor N is 
    N=∑_λ∈ΩW_ρ(λ)R_Π(λ).




We rewrite the formula (<ref>) by replacing the Wigner functions with their definition in terms of Spekkens' subspaces, 
    δ_λ,V'^⊥+w'=δ_λ,V^⊥+w·δ_λ,V_Π^⊥+r.

The proof is straightforward. The RHS is one if and only if both the deltas are one; this means that λ has to belong simultaneously to V^⊥+w and V_Π^⊥+r, i.e. λ∈ (V^⊥+w)∩ (V_Π^⊥+r). If we recall equation (<ref>) (and figure <ref>), we see that 
    (V^⊥+w)∩(V_Π^⊥+r)=(V'^⊥)+w',
 and we can conclude that the RHS of equation (<ref>) is one if and only if the LHS is one.
At this point we can insert the normalisation factors on the RHS and the LHS. These guarantee that ∑_λ∈ΩW_ρ'(λ)=1 and the uniformity as expected.


In the commuting case the updating rule in SQM consists of the addition of the stabilizer generators of state and measurement (equation (<ref>)). In ST the updating rule consists of the intersection of the perpendicular isotropic subspaces (equation (<ref>)). In GT addition and intersection translate into the product of the Wigner functions (equation (<ref>)). In particular this stage consists of introducing zeros to the Wigner function in correspondence of the addition of generators to the subspace of known variables V (and so removing generators from the subspace V^⊥). We will call this process - where we learn information about the state - the localization stage.


MainTheorem[Theorem]Theorem

Non-commuting case. Let us assume the measurement, in general, not to commute with the state, i.e. [ρ,Π]≠ 0.
The Wigner function of the state after measurement is 
    W_ρ'(λ)= 1/N∑_t∈ V_otherW_ρ(λ - t)R_Π(λ),
 where λ∈Ω, V_other is the set spanned by the non-commuting generators of Spekkens' subspace V associated to the state ρ. 
The normalisation factor N is 
    N=∑_λ∈Ω∑_t∈ V_otherW_ρ(λ - t)R_Π(λ).



Note that we could have stated the theorem in terms of stabilizer generators instead of Spekkens' generators. The former being related to the latter as follows, 
    g_j=Ŵ(J^-1Σ_j),
 where J is the usual symplectic matrix, Σ_j are Spekkens' generators and g_j the corresponding stabilizer generators. The relation (<ref>) follows from the relation between ST and GT previously described, where the bridge between the two formulations is given by the matrix J.


In general the state after measurement in quantum mechanics (up to a normalization) is ρ'=ΠρΠ. If [ρ,Π]=0 then ρ'=ρΠ. 

In order to simplify the proof, let us assume the case of only one non-commuting generator, say ρ_n. In the present case we know, from the structure of SQM and Spekkens' updating rules (adding the commuting factors between state and measurement and removing the non-commuting ones), that the state after measurement is ρ'=ρ^*Π, where ρ^*=ρ_1·…ρ_n-1.
This means that we can write the state after measurement as a product of two commuting terms: ρ^* and Π. Therefore we can write the Wigner function of ρ' according to the product rule for the commuting case (equation (<ref>)): 
    W_ρ'(λ)=1/NW_ρ^*(λ)R_Π(λ),
 where N=∑_λW_ρ^*(λ)R_Π(λ). 
We want now to prove that equation (<ref>) is equal to the latter. This means we want to prove the following:

    W_ρ'(λ)=∑_t∈ V_otherW_ρ(λ - t)R_Π(λ)=W_ρ^*(λ)R_Π(λ).

We can simplify the terms R_Π(λ), thus getting 
    ∑_t∈ V_otherW_ρ(λ - t)=W_ρ^*(λ).


At this point, in order to prove the above theorem, we rewrite the formula (<ref>) by replacing the Wigner functions with their definition, i.e. Kronecker deltas,

    ∑_t∈ V_otherδ_λ-t,V^⊥+w=δ_λ,V_commute^⊥+w,
 where V_commute^⊥ = V^⊥⊕ V_other.
Note that we have removed the response function of the measurement. This also implies that we do not have to change w, because we have only modified V^⊥ into V^⊥_commute and w' is not affected. 
We now want to see that the LHS of equation (<ref>) is different from zero exactly when the RHS is. The LHS is different from zero when at least one t∈ V_other is such that λ-t∈ V^⊥+w. The latter corresponds to λ∈ V^⊥+w + t. This means that λ∈ V^⊥⊕ V_other+w, i.e. λ∈ V_commute^⊥+w, which is precisely what makes the RHS different from zero. 




In the most general non-commuting case, in addition to the localization stage, in SQM we also have to remove the non-commuting generators from the state (equation (<ref>)). In ST this consists of the union and shifts in the perpendicular subspace (equation (<ref>)). In GT removal and union translate into the averaging out of the Wigner function (equation (<ref>)). In particular this stage consists of introducing ones to the Wigner function in correspondence of the removal of generators from the subspace of known variables V (and so adding generators to the subspace V^⊥). We can think of this process as the one where, after having learned some information in the localization stage, we need to forget something, otherwise we would get too much information about the ontic state, which is forbidden by the classical complementarity principle. This also explains why non-commuting measurements are also called disturbing measurements. We will call this forgetting-part of the process the randomization stage. Finally note that the general-case formula (<ref>) reduce to the product rule (<ref>) in the commuting case.
Figure <ref> summarises the updating rules in the three theories in prime dimensions.



In the non-prime dimensional case, we can rephrase all the reasonings already done in ST in terms of Wigner functions. 

LemmaCoarse[LemmaNonCommuting]Lemma

The Wigner function W_cg(λ) of the coarse-graining observable O_cg=a_1X_1+b_1P_1+… +a_nX_n+b_nP_n=D(a'_1X_1+b'_1P_1+… +a'_nX_n+b'_nP_n)=σ_cg, can be written in terms of the Wigner functions W^(j)_fg(λ) of the associated fine graining observables O^(j)_fg=a'_1X_1+b'_1P_1+… +a'_nX_n+b'_nP_n=σ^(j)_fg as 
    W_cg(λ)=1/D̅∑_j=0^D̅-1W^(j)_fg(λ).




First of all the normalisation factor 1/D̅ is due to the fact that we are adding D̅ Wigner functions, each of them having a normalisation factor of 1/d, since they are Wigner functions of maximally isotropic subspaces (of dimension d).
The proof of the rest of the formula is straightforward. According to the definition of Wigner functions, we need to prove that 
    δ_V^⊥_cg+r_cg∝∑_jδ_V^⊥_fg+r^(j)_fg.
 From the decomposition of the isotropic subspaces and shift vectors in Spekkens' model, equations (<ref>) and (<ref>), we already know that V^⊥_cg+r_cg=V^⊥_fg⊕ V_D +r_cg = V^⊥_fg + ∑_j=0^D̅-1(r_cg+jv), which exactly proves that the RHS of (<ref>) is one if and only if the LHS is one.


From the above construction and theorem <ref> we can immediately write the Wigner function of a stabilizer state after a coarse-graining measurement, thus generalising theorem <ref>.

FinalWignerTheorem[Theorem]Theorem

The Wigner function of the state ρ of n-qudit systems, where the dimension d is a non-prime intger, after the (non-commuting) measurement Π is given by

    W_ρ'(λ)= 1/N1/D̅∑_t∈ V_other∑^D̅-1_j=0W_ρ(λ - t)R^(j)_fg(λ),
 where λ∈Ω, V_other is the set spanned by the non-commuting generators of Spekkens' subspace V associated to the state ρ. The response function of the j-th fine-graining measurement is denoted by R^(j)_fg. 
The normalisation factor N is 
    N=∑_λ∈Ω∑_t∈ V_otherW_ρ(λ - t)R_Π(λ),
 where R_Π(λ)=1/D̅∑^D̅-1_j=0R^(j)_fg(λ).



We just need to apply lemma <ref> to the response function of the coarse graining measurement of theorem <ref>.


Figure <ref> summarises the updating rules in ST and Gross' theory in prime and non-prime dimensions.






§ DISCUSSION


The importance of completing Spekkens' theory with updating rules to determine the state after a sharp measurement relies on the possible applications of this theory for future works. In particular we think it is interesting to characterise ST in terms of its computational power, i.e. exploring which are the quantum computational schemes that can be represented by ST. As an example ST can be used as a non-contextual hidden variable model to represent the classically simulable part of some state-injection schemes, thus witnessing non-contextuality and also contributing to the aim of proving that contextuality is necessary for quantum speed-up in such schemes. 

The result about the equivalence between ST and SQM and the associated updating rules in prime and non-prime odd dimensions can provide a powerful new way to use and analyse SQM in non-prime dimensions, about which almost nothing is known. For example we are now facilitated to state, given a set of commuting Pauli operators, whether the joint eigenstate that they represent is pure. In non-prime dimensions the latter issue is not trivial because for coarse-graining observables the number of independent generators is not equal to the number of observables. However, from our construction to decompose coarse-graining into fine-graining observables, we know that the number of independent generators is equal to the number of fine-graining observables. Therefore if the set of commuting Pauli operators has the number of independent generators that equals the number of fine-graining observables, then the state is pure. Indeed fine-graining observables are associated to pure states. 
In addition, in the field of quantum error correction it could be interesting to study if the coarse-graining observables have any usefulness. 

Finally, the enforced equivalence of SQM, ST and Gross' theory in odd dimensions can be exploited to address a given problem from different perspectives, where, depending on the cases, one theory can be more appropriate than another. An example is the already mentioned one of addressing protocols based on SQM with Spekkens theory instead of SQM or Wigner functions.




§ CONCLUSION


Spekkens' toy model is a very powerful model which has led to meaningful insights in the field of quantum foundations and that seems to have interesting applications in the field of quantum computation. We have extended it from prime to arbitrary dimensional systems and we have derived measurement updating rules for systems of prime dimensions when the state and measurement commute, equations (<ref>)(<ref>), when they do not, equations (<ref>)(<ref>), and for systems of non-prime dimensions (theorem <ref>). These results directly derive from the basic axiom of the theory: the classical complementarity principle. The latter characterises a structure for the updating rules which is the same as in stabilizer quantum mechanics: the state after measurement is composed by the generators of the measurement and the compatible (i.e. commuting) generators of the original state.

Spekkens showed the equivalence between SQM and ST in odd prime dimensions via Gross' Wigner functions. We have extended this result to all odd dimensions and we have translated the updating rules of ST in terms of Wigner functions (theorems <ref>, <ref>, <ref>).
We stress again that Spekkens' model and our measurement updating rules hold in all dimensions, in even dimensions too. However the equivalence between ST and SQM only holds in odd dimensions. The main reason is that SQM in even dimensions shows contextuality, while ST does not. One of the main future challenges is to find a hidden variable toy model which is also equivalent to qubit SQM.

We treat the problem with systems of non-prime dimensions, which arises from the problem of defining an inverse in ℤ_d, by decomposing the problematic (coarse-graining) observables in terms of the non-problematic (fine-graining) ones. This approach naturally suggests the form of the updating rules.
By comparing the updating rules in the three mentioned theories we highlight the beauty and the elegance of this equivalence, where addition and removal of generators in SQM correspond to intersection and union in ST and product and randomization in GT. This correspondence is schematically depicted, for the prime-dimensional case, in table <ref>. The non-prime case correspondence is represented in table <ref>. We believe that the fresh perspective gained by moving from one theory to another can give powerful new tools for new insights in the field of quantum computation.




§ ACKNOWLEDGMENTS

We would like to thank Misja Steinmetz for suggesting Bezout's identity. This work was supported by EPSRC Centre for Doctoral Training in Delivering Quantum Technologies [EP/L015242/1].




§ REFERENCES

10
EPR  A. Einstein, B. Podolsky and N. Rosen Can Quantum-Mechanical Description of Physical Reality be Considered Complete?, Phys. Rev. 47 (10): 777-780 (1935).
Bell J. S. Bell On the problem of hidden variables in quantum mechanics, Rev. Mod. Phys. 38, 447-452 (1966).
Kochen S. Kochen and E.P. Specker The problem of hidden variables in quantum mechanics, J. Math. Mech. 17, 59-87 (1967).
Spek1 R. W. Spekkens Evidence for the epistemic view of quantum states: A toy theory, Phys. Rev. A 75, 032110 (2007).
Spek2 R. W. Spekkens Quasi-quantization: classical statistical theories with an epistemic restriction, arXiv:1409.5041 (2014).
GottesPhD D. Gottesman Stabilizer Codes and Quantum Error Correction,  PhD thesis,1862 (1997). 

GottesKnill D. Gottesman The Heisenberg representation of quantum computers, arXiv:quant-ph/9807006 (1998).
GHZ D. Greenberger, M. Horne, A. Shimony, A. Zeilinger Bell's theorem without inequalities, Am. J. Phys. 58 (12): 1131(1990).
Mermin N. D. Mermin Simple unified form for the major no-hidden-variables theorems, Phys. Rev. Lett. 65, 3373-3376 (1990).
Peres A.Peres Incompatible results of quantum measurements, Phys. Lett. A 151, 107-108 (1990).
Rauss R. Raussendorf, D.E. Browne, H.J. Briegel Measurement-based quantum computation on cluster states Phys. Rev. A 68, 022312 (2003). 
Bravij-Kitaev S. Bravyi, A. Kitaev Universal quantum computation with ideal Clifford gates and noisy ancillas, Phys. Rev. A 71, 022316 (2005). 
Gottes2 D. Gottesman Stabilizer codes with prime power qudits, invited talk at Caltech IQIM seminar (Pasadena, California).
Howard M. Howard, J. Wallman,	V. Veitch, J. Emerson Contextuality supplies the magic for quantum computation, Nat. 510, 351- 355 (2014).
Gross D. Gross Hudson's theorem for finite-dimensional quantum systems, J. Math. Phys. 47, 122107 (2006).
Wootters W. K. Wootters A Wigner-Function Formulation of Finite-State Quantum Mechanics, Annals of Physics 176,1 (1987).
FerrieEmerson V. Veitch, C. Ferrie, D. Gross, J. Emerson Negative quasi-probability as a resource for quantum computation, New J. Phys. 14, 113011 (2012).
WallmanBartlet J. J. Wallman, S. D. Bartlett Non-negative subtheories and quasiprobability representations of qubits, Phys. Rev. A 85, 062121 (2012). 
Pusey M. F. Pusey Stabilizer notation for Spekkens' toy theory, Found. Phys. 42, 688 (2012). 
Coecke B. Coecke, B. Edwards, R.W. Spekkens  Phase Groups and the Origin of Non-locality for Qubits, Electron. Notes Theor. Comput., 270, 29 (2011).
Damian L. Disilvestro, D. Markham Quantum Protocols within Spekkens' Toy Model, QPL, Glasgow 2016.
Pawel P. Blasiak Quantum cube: A toy model of a qubit, Phys. Lett. A, 377, 847-850 (2013).
Larsson J. Larsson A contextual extension of Spekkens' toy model, AIP Conf. Proc. 1424, 211 (2012).
Bezout E. Bezout Theorie generale des equations algebriques Paris, France: Ph.D. Pierres (1779).





