text:
# Quantum computers in phase space

## I Introduction

Quantum mechanics can be formulated in phase space, the natural arena of classical physics. For this we can use the Wigner function , which is a distribution enabling us to represent quantum states and temporal evolution in the classical phase space scenario. In this paper we use the generalization of the familiar Wigner representation of quantum mechanics to the case of a system with a finite, $`N`$–dimensional, Hilbert space. Our main purpose is to develop and study the phase space representation of both the states and the evolution of a quantum computer (some steps in this direction were described in ).

One can ask if there are potential advantages in using a phase space representation for a quantum computer. The use of this approach is quite widespread in various areas of physics (such as quantum optics, see  for a review) and has been fruitful, for example, in analyzing issues concerning the classical limit of quantum mechanics . In answering the above question one should have in mind that a quantum algorithm can be simply thought of as a quantum map acting in a Hilbert space of finite dimensionality (a quantum map should be simply thought of as a unitary operator that is applied successively to a system). Therefore, any algorithm is clearly amenable to a phase space representation. Whether this representation will be useful or not will depend on properties of the algorithm. Specifically, algorithms become interesting in the large $`N`$ limit (i.e. when operating on many qubits). For a quantum map this is the semiclassical limit where regularities may arise in connection with its classical behavior. Unraveling these regularities, when they exist, becomes an important issue which can be naturally accomplished in a phase space representation. Therefore, having in mind these ideas, we conjecture that this representation may be useful to analyze some classes of algorithms. Moreover, the phase space approach may allow one to establish contact between the vast literature on quantum maps (dealing with their construction, the study of their semiclassical properties, etc) and that of quantum algorithms. This, in turn, may provide hints to develop new algorithms and ideas for novel physics simulations. As a first application of these ideas in this paper we examine several properties of quantum algorithms in phase space: We analyze under what circumstance it is possible to establish a direct classical analogue for a quantum algorithm (exhibiting interesting examples of this kind, such as the Fourier transform and other examples which naturally arise in studies of quantum maps). We also shown that, quite surprisingly, Grover’s search algorithm  can be represented in phase space and interpreted as a simple quantum map.

To define Wigner functions for discrete systems various attempts can be found in the literature. Most notably, Wooters  proposes a definition that has all the desired properties (see below) only when $`N`$ is a prime number. His phase space is an $`N\times N`$ grid (if $`N`$ is prime) and a Cartesian product of spaces corresponding to prime factors of $`N`$ in the general case. Our approach here follows Wooters ideas and is closely related to that of Leonhardt  who analyzed Wigner functions for spin systems (both in the integer and half–integer case) and discussed interesting tomographic schemes to reconstruct the quantum state from measurements of marginal distributions. Other works connected to ours are those of Hannay and Berry , who used discrete Wigner function in the context of studies of quantum chaos; Rivas and Ozorio  who define translation and reflection operators relating to the geometry of chords and centers on the phase space torus. Bouzouina and De Bievre  give a more abstract derivation of the same Wigner function related to geometric quantization.

The paper is organized as follows: In Section II we briefly discuss the main properties of the Wigner representation in the continuous case. In Section III we review the main features of the discrete Wigner function. This section is supposed to be self contained and to summarize known results (it also contains some original results and new explanations of old ideas). In Section IV we examine the Wigner function of quantum states, some of which are of interest for quantum computation. In Section V we review the main properties of the temporal evolution in the Wigner representation. Here we describe some general results on the nature of temporal evolution in phase space and draw important analogies between quantum algorithms and maps. We explicitly analyze Grover’s algorithm in phase space and also discuss the conditions for quantum evolution to have a direct correspondence with a classical map. In Section VI we consider the measurement of the Wigner function. We show that this can be done by means of a simple quantum computation that bears a remarkable similarity with a simulated scattering experiment. In Section VII we present our conclusions.

## II Continuous Wigner functions

For a particle in one dimension, the Wigner function  is in one to one correspondence with the density matrix $`\widehat{\rho }`$ and is defined as

$$W(q,p)=\frac{d\lambda }{2\pi \mathrm{}}\text{e}^{i\lambda p/\mathrm{}}q\lambda /2|\widehat{\rho }|q+\lambda /2.$$
(1)
This function is the closest one can get to a phase space distribution for a quantum mechanical system. It’s three defining properties are: (P1) $`W(q,p)`$ is real valued, (P2) the inner product between states $`\widehat{\rho }_1`$ and $`\widehat{\rho }_2`$ can be computed from the Wigner function as $`\text{Tr}[\widehat{\rho }_1\widehat{\rho }_2]=2\pi \mathrm{}𝑑q𝑑pW_1(q,p)W_2(q,p)`$ and (P3) the integral along any line in phase space, defined by the equation $`a_1q+a_2p=a_3`$, is the probability density that a measurement of the observable $`a_1\widehat{Q}+q_2\widehat{P}`$ has $`a_3`$ as its result. This last property (the fact that $`W(q,p)`$ yields the correct marginal distribution for any quadrature) is the most restrictive one and, as Bertrand and Bertrand showed , together with P1–P2, uniquely determines the Wigner function.

It is convenient to write $`W(q,p)`$ as the expectation value of an operator, known as “phase space point operator”  (or Fano operators ). In fact, the Wigner function is

$$W(q,p)=\text{Tr}[\widehat{\rho }\widehat{A}(q,p)].$$
(2)
The operators $`\widehat{A}(q,p)`$ depend parametrically on $`q`$, $`p`$ and can be written in terms of simetrized products of delta functions as:

$`\widehat{A}(q,p)`$ $`=`$ $`:\delta (\widehat{P}p)\delta (\widehat{Q}q):`$ (3)
$`=`$ $`{\displaystyle \frac{d\lambda d\lambda ^{}}{(2\pi \mathrm{})^2}\text{e}^{i\frac{\lambda }{\mathrm{}}(\widehat{P}p)+i\frac{\lambda ^{}}{\mathrm{}}(\widehat{Q}q)}}`$ (4)
$`=`$ $`{\displaystyle \frac{d\lambda d\lambda ^{}}{(2\pi \mathrm{})^2}\widehat{D}(\lambda ,\lambda ^{})\text{e}^{\frac{i}{\mathrm{}}(\lambda ^{}q\lambda p)}},`$ (5)
where we have identified the continuous translation operator $`\widehat{D}(\lambda ,\lambda ^{})=\mathrm{exp}[\frac{i}{\mathrm{}}(\lambda \widehat{P}\lambda ^{}\widehat{Q})]`$. Thus, the above expression shows that the phase space point operator is simply the double Fourier transform of the phase space displacement operator (and, therefore, $`W(q,p)`$ is the double Fourier transform of the expectation value of $`D(\lambda ,\lambda ^{})`$). It is even more convenient to rewrite these expressions as:

$$\widehat{A}(q,p)=\frac{1}{\pi \mathrm{}}\widehat{D}(q,p)\widehat{R}\widehat{D}^{}(q,p),$$
(6)
where $`\widehat{R}`$ is the reflection (parity) operator that acts on position eigenstates as $`\widehat{R}|x=|x`$. This means that the Wigner function is the expectation value of a displaced reflection operator.

The proof of the three defining properties of the Wigner function (P1–P3) can be seen to follow from simple properties of the phase space point operators. The fact that $`W(q,p)`$ is real valued (P1) is a consequence of the hermiticity of $`\widehat{A}(q,p)`$. Property (P2) follows from the completeness relation of $`\widehat{A}(q,p)`$. In fact, one can show that these operators satisfy the relation

$$\text{Tr}[\widehat{A}(q,p)\widehat{A}(q^{},p^{})]=\frac{1}{2\pi \mathrm{}}\delta (qq^{})\delta (pp^{}).$$
(7)
As a consequence of this, one can invert (2) and express the density matrix as a linear combination of the phase space point operators. The Wigner functions determines the coefficients of such expansion: $`\widehat{\rho }=2\pi \mathrm{}𝑑q𝑑pW(q,p)\widehat{A}(q,p)`$. From this, the validity of the inner product rule can be easily demonstrated. The last property (P3) can be seen to be valid by observing that integrating $`\widehat{A}(q,p)`$ along a line in phase space one always gets a projection operator. Thus,

$$𝑑q𝑑p\delta (a_1q+a_2pa_3)\widehat{A}(q,p)=|a_3a_3|,$$
(8)
where $`|a_3`$ is an eigenstate of the operator $`a_1\widehat{Q}+a_2\widehat{P}`$ with eigenvalue $`a_3`$. This identity can be shown by first writing the delta function as the integral of an exponential and then performing the phase space integration. We omit the proof here because we will present the corresponding one for the discrete case, which is done following very similar lines.

## III Discrete Wigner Functions

### A Preliminarities: discrete phase space

We will consider here a quantum system with an $`N`$ dimensional Hilbert space (the case of a quantum computer is a specific example we will always have in mind but the formalism can be applied in other cases). In the Hilbert space we can introduce a basis $`B_x=\{|n,n=0,\mathrm{},N1\}`$ which we arbitrarily interpret as our discretized position basis (with periodic boundary conditions: $`|n+N=|n`$). Clearly, the notion of a position observable may not have a direct physical interpretation in a discrete system but is a necessary ingredient if one wants to build a phase space representation. In the case of a quantum computer this basis can be, for example, the computational basis. Given the position basis $`B_x`$, there is a natural way to introduce the conjugate momentum basis $`B_p=\{|k,k=0,\mathrm{},N1\}`$ by means of the discrete Fourier transform. Thus, the states of $`B_p`$ can be obtained from those of $`B_x`$ as

$$|k=\frac{1}{\sqrt{N}}\underset{n}{}\mathrm{exp}(i2\pi nk/N)|n.$$
(9)
Therefore, as in the continuous case, position and momentum are related by the Fourier transform. It is also important to recognize that the dimensionality of the Hilbert space of the system is related to an effective Planck constant. In fact, phase space should have a finite area (which we consider equal to one, in the appropriate units). In this area we should be able to accommodate $`N`$ orthogonal states. If each of this states occupies a phase space area which is equal to $`2\pi \mathrm{}`$, we see that:

$$N=1/2\pi \mathrm{}.$$
(10)
In other words, $`N`$ plays the role of the inverse of the Planck constant (and the large $`N`$ limit is, in some way, the semiclassical limit).

Once we have position and momentum basis we can construct the displacement operators in position and momentum. Obviously, in this case it does not make sense to talk about infinitesimal translations. However, for discrete systems we can define finite translation operators $`\widehat{U}`$ and $`\widehat{V}`$, which respectively generate finite translations in position and momentum . The translation operator $`\widehat{U}`$ generates cyclic shifts in the position basis and is diagonal in momentum basis:

$$\widehat{U}^m|n=|n+m,\widehat{U}^m|k=\mathrm{exp}(2\pi imk/N)|k,$$
(11)
(note that all additions inside kets are to be interpreted mod $`N`$). Similarly, the operator $`\widehat{V}`$ is a shift in the momentum basis and is diagonal in position:

$$\widehat{V}^m|k=|k+m,\widehat{V}^m|n=\mathrm{exp}(i2\pi mn/N)|n$$
(12)
It is important to notice that the translation operators $`\widehat{U}`$ and $`\widehat{V}`$ have commutation relations that directly generalize the ones corresponding to finite position and momentum translations in the continuous case. In fact, one can directly show the following identity:

$$\widehat{V}^p\widehat{U}^q=\widehat{U}^q\widehat{V}^p\mathrm{exp}(i2\pi pq/N).$$
(13)
With these tools at hand we can introduce the discrete analog to the continuous phase space translation operator $`\widehat{D}(q,p)=\mathrm{exp}[\frac{i}{\mathrm{}}(q\widehat{P}p\widehat{Q})]`$. To do this we can first rewrite the phase space displacement as $`\widehat{D}(q,p)=\mathrm{exp}(iq\widehat{P}/\mathrm{})\mathrm{exp}(ip\widehat{Q}/\mathrm{})\mathrm{exp}(ipq/2\mathrm{})`$ (an expression obtained by using the well known formula $`\text{e}^{\widehat{A}+\widehat{B}}=\text{e}^{[\widehat{A},\widehat{B}]/2}\text{e}^{\widehat{A}}\text{e}^{\widehat{B}}`$ and the canonical commutation relation between $`\widehat{Q}`$ and $`\widehat{P}`$). Therefore, by identifying the corresponding displacement operators, the discrete analogue of the phase space translation operator is:

$$\widehat{T}(q,p)\widehat{U}^q\widehat{V}^p\mathrm{exp}(i\pi qp/N).$$
(14)
These operators obey the simple composition rule

$$\widehat{T}(q_1,p_1)\widehat{T}(q_2,p_2)=\widehat{T}(q_1+q_2,p_1+p_2)\mathrm{e}^{i\pi (p_1q_2q_1p_2)/N},$$
(15)
where the phase appearing in the left hand side has a simple geometrical interpretation as the area of a triangle (see below). From the above definitions it is also simple to show that the phase space translation operators are such that

$`\widehat{T}^{}(q,p)`$ $`=`$ $`\widehat{T}(2Nq,2Np)`$ (16)
$`=`$ $`\widehat{T}(Nq,Np)(1)^{N+p+q}.`$ (17)
Finally, it is worth mentioning the fact that the composition rule can be used to show that

$$\widehat{T}(\lambda q,\lambda p)=\widehat{T}^\lambda (q,p)$$
(18)
for any integer $`\lambda `$, which is a very natural result. It may be tempting to define position and momentum operators also in the discrete case. In fact, we could attempt doing that by writing $`\widehat{U}`$ and $`\widehat{V}`$ as the exponentials of two operators $`\widehat{Q}`$ and $`\widehat{P}`$ defined to be diagonal in $`B_x`$ and $`B_p`$ respectively: $`\widehat{U}=\mathrm{exp}(i2\pi \widehat{P}/N)`$ and $`\widehat{V}=\mathrm{exp}(i2\pi \widehat{Q}/N)`$, with $`\widehat{Q}_nn|nn|`$ and $`\widehat{P}_kk|kk|`$. However, it turns out that these operators are not canonically conjugate since their commutator is not proportional to the identity as is the continuous case (actually, it is well known that for finite dimensional spaces it is impossible to find two operators whose commutator is proportional to the identity). So, even though finite shifts in the discrete case have the same properties than their continuous counterparts, this is not true for the position and momentum operators.

It will also be useful to define a reflection (or parity) operator $`\widehat{R}`$ as the one acting on states in the position (and momentum) basis as $`\widehat{R}|n|n`$ (again, the operation is to be understood mod $`N`$). It is simple to show that the parity operator obeys simple relations with the shifts $`\widehat{U}`$ and $`\widehat{V}`$:

$$\widehat{U}\widehat{R}=\widehat{R}\widehat{U}^1,\widehat{V}\widehat{R}=\widehat{R}\widehat{V}^1.$$
(19)
It is important to recognize that the reflection operator is directly related to the Fourier transform. In fact, if we denote the operator implementing the discrete Fourier transform as $`U_{FT}`$ (i.e., the operator whose matrix elements in the $`B_x`$ basis are $`n^{}|U_{FT}|n=\mathrm{exp}(i2\pi nn^{}/N)`$), then the reflection operator is simply the square of the Fourier transform:

$$\widehat{R}=U_{FT}^2.$$
(20)
Before ending this section it is worth mentioning other possibilities for the phase space description of finite quantum mechanics. The use of the discrete Fourier transform to relate position and momentum implies the imposition of periodic boundary conditions on both these variables, thus imposing the geometry of a torus on the phase space. This is by no means mandatory, as the well known example of the angular momentum sphere –spanned by states $`|j,m,m=j,\mathrm{}j`$– illustrates. However, the ubiquitous appearance of the DFT in quantum algorithms somehow favors the choice of the torus as the preferred geometry. It is also possible to slightly extend the scope of the present approach by imposing quasi-periodic boundary conditions, as is done in solid state chain models or in the treatment of the quantum Hall effect. This generalization can be easily incorporated into the description of quantum algorithms

### B Discrete Wigner functions and phase space point operators

To define a discrete Wigner function the most convenient strategy is to find the correct generalization of the phase space point operators $`\widehat{A}(q,p)`$. Thus, we need to find a basis set of the space of hermitian operators (note that, as the Hilbert space is $`N`$ dimensional such a basis has $`N^2`$ independent operators). We should do this in such a way that the resulting Wigner function gives the correct marginal distributions. However, generalization from the continuous to the discrete case has to be done with some caution. In fact, it is instructive to see how naive attempts to generalize expressions like (5) or (6) fail. In fact, generalizing equation (5) to the discrete case would lead us to define

$$\widehat{𝒜}(q,p)=\frac{1}{N^2}\underset{m,k=0}{\overset{N1}{}}\widehat{T}(m,k)\mathrm{exp}\{i2\pi \frac{(kqmp)}{N}\}.$$
(21)
Unfortunately, this expression for $`\widehat{𝒜}(q,p)`$ turns out to be non–hermitian. This can be seen by taking the hermitian conjugate of the above equation and using the fact that the Hermitian conjugate of the phase space translation operator, as shown in (17), is such that $`\widehat{T}^{}(q,p)\widehat{T}(Nq,Np)`$. Therefore, the above is not a good definition for the discrete phase space point operators.

Another naive attempt to define discrete phase space operators is to generalize equation (6) which tells us that in the continuous case the operator $`\widehat{A}(q,p)`$ is a displaced reflection. Thus, by writing

$$\widehat{A}(q,p)=\frac{1}{\pi \mathrm{}}\widehat{D}(q,p)\widehat{R}\widehat{D}^{}(q,p)\frac{1}{N/2}\widehat{T}(q,p)\widehat{R}\widehat{T}^{}(q,p),$$
(22)
one defines an operator that is hermitian by construction. However, in this case the problem is that the number of operators one defines in this way is not enough to build a complete set. In fact, if one uses the definition of $`\widehat{T}(q,p)`$ given in (14) and then the commutation relations between $`\widehat{U}`$, $`\widehat{V}`$ and $`\widehat{R}`$ one finds:

$$\widehat{A}(q,p)=\frac{1}{N}\widehat{U}^{2q}\widehat{R}\widehat{V}^{2p}\mathrm{exp}(4\pi ipq/N).$$
(23)
As $`\widehat{U}`$ and $`\widehat{V}`$ are cyclic operators with period $`N`$, it is easy to see that if both $`q`$ and $`p`$ take values between $`0`$ and $`N`$ the above expression only gives $`N^2/4`$ independent operators. In fact, it is clear that the above equation implies that $`\widehat{A}(q+N/2,p)=\widehat{A}(q,p)`$ and likewise with $`p`$ so we only have $`N/2\times N/2`$ independent operators.

Remarkably, the solution to the problems arising with the two above naive definitions is obviously the same: We should define, as it is done in the literature  the phase space point operators on a phase space grid of $`2N\times 2N`$ points. This can be done simply replacing $`N2N`$ in equation (21) or by taking half integer values for $`q`$ and $`p`$ in (23). The two definitions turn out to be equivalent. Therefore, the correct discrete phase space point operators are

$`\widehat{A}(\alpha )`$ $`=`$ $`{\displaystyle \frac{1}{(2N)^2}}{\displaystyle \underset{\lambda ,\lambda ^{}=0}{\overset{2N1}{}}}\widehat{T}(\lambda ,\lambda ^{})\mathrm{exp}\{i2\pi {\displaystyle \frac{(\lambda ^{}q\lambda p)}{2N}}\}`$ (24)
$`=`$ $`{\displaystyle \frac{1}{2N}}\widehat{U}^q\widehat{R}\widehat{V}^p\mathrm{exp}(i\pi pq/N)`$ (25)
where $`\alpha =(q,p)`$ denotes a point in the phase space grid with $`q`$ and $`p`$ taking values between $`0`$ and $`2N1`$.

It is worth noticing that, as we have just defined phase space point operators on a lattice with $`2N\times 2N`$ points, we have a total of $`4N^2`$ such operators. However, it should be clear that these operators are not all independent. It is easy to verify that there are only $`N^2`$ independent phase space point operators since it can be proved that:

$$\widehat{A}(q+\sigma _qN,p+\sigma _pN)=\widehat{A}(q,p)(1)^{\sigma _pq+\sigma _qp+\sigma _q\sigma _pN},$$
(26)
for $`\sigma _q,\sigma _p=0,1`$. Therefore, it is clear that the $`N^2`$ phase space point operators corresponding to the first $`N\times N`$ subgrid of the phase space determine the rest. For the rest of the paper we will denote the first $`N\times N`$ subgrid as the set $`G_N`$ (i.e., $`G_N=\{\alpha =(q,p);0q,pN1\}`$). The set $`G_{2N}`$ will denote the full $`2N\times 2N`$ grid.

Before showing explicitly that the above operators enable us to define a Wigner function with all the desired properties, it is worth pointing out some useful facts about $`\widehat{A}(\alpha )`$. In particular, it is convenient to realize that these operators are closely related to the phase space translation operators. In fact, one can show that by successive application of two phase space operators one always gets a translation (this is also true in the continuous case) since

$$\widehat{A}(\alpha )\widehat{A}(\alpha ^{})=\widehat{T}(\alpha \alpha ^{})\frac{\text{e}^{i\frac{\pi }{N}(q_\alpha p_\alpha ^{}q_\alpha ^{}p_\alpha )}}{4N^2}$$
(27)
Moreover, it is also useful to express the translation operator in terms of the $`\widehat{A}(\alpha )`$ operators by simply inverting the defition (24) and writing

$$\stackrel{~}{T}(n,k)=\underset{q,p=0}{\overset{2N1}{}}\widehat{A}(q,p)\mathrm{exp}(i\frac{2\pi }{2N}(npkq)),$$
(28)
a property that is also valid in the continuous case.

From the above properties it is possible to show that $`\widehat{A}(\alpha )`$ are a complete set when $`\alpha `$ takes values in the first $`N\times N`$ subgrid $`G_N`$. Thus, taking the trace of (27) one gets:

$$\text{Tr}[\widehat{A}(\alpha )\widehat{A}(\alpha ^{})]=\frac{1}{4N}\delta _N(q^{}q)\delta _N(p^{}p)$$
(29)
where both $`\alpha `$ and $`\alpha ^{}`$ are in the grid $`G_N`$ and $`\delta _N(q)\frac{1}{N}_{n=0}^{N1}\text{e}^{2\pi iq/N}`$ is the periodic delta function (which is zero unless $`q=0\text{mod}N`$).

Therefore, according to all the previous arguments, the discrete Wigner function is defined as

$$W(\alpha )=\text{Tr}(\widehat{A}(\alpha )\widehat{\rho })$$
(30)
where $`\alpha G_{2N}`$. Clearly, these $`4N^2`$ values are not all independent since the Wigner function obeys the same relation than the phase space point operators:

$$\widehat{W}(q+\sigma _qN,p+\sigma _pN)=\widehat{W}(q,p)(1)^{\sigma _pq+\sigma _qp+\sigma _q\sigma _pN}$$
(31)
As the operators $`\widehat{A}(\alpha )`$ are a complete set one can expand the density matrix as a linear combination of such operators. It is clear that the Wigner function $`W(\alpha )`$ are nothing but the coefficients of such expansion. Thus, one can show that

$`\widehat{\rho }`$ $`=`$ $`4N{\displaystyle \underset{\alpha G_N}{}}W(\alpha )\widehat{A}(\alpha )`$ (32)
$`=`$ $`N{\displaystyle \underset{\stackrel{~}{\alpha }G_{2N}}{}}W(\stackrel{~}{\alpha })\widehat{A}(\stackrel{~}{\alpha }).`$ (33)
The last expression can be obtained from (32) by noticing that the contribution arising from the four $`N\times N`$ subgrids are identical.

Now it is simple to show that the Wigner function defined above obeys the three defining properties (P1–P3). The first one is a consequence of the fact that the operators $`\widehat{A}(\alpha )`$ are hermitian by construction. The second property (P2) is a consequence of the completeness of the set $`\widehat{A}(\alpha )`$ which enables one to show that

$$\text{Tr}[\rho _1\rho _2]=N\underset{\alpha G_{2N}}{}W_1(\alpha )W_2(\alpha )$$
(34)
Finally, the third property (P3) is more subtle and deserves to be studied with some detail. The crucial point is to show that if we add the operators $`\widehat{A}(q,p)`$ over all phase space points lying on a line $`L`$ we always obtain a projection operator (this guarantees that adding the value of the Wigner function over all points in a line gives always a positive number, which can be interpreted as a probability). Before showing this, we should clearly define what do we mean by a line $`L(n_1,n_2,n_3)`$ on our phase space grid. We will use the following definitions: A line $`L`$ is a set of points of the grid defined as $`L=L(n_1,n_2,n_3)=\{(q,p)G_{2N},\text{such that}n_1pn_2q=n_3`$, with $`0n_i2N1\}`$. Below, we will discuss some more details about the structure of lines on a grid $`G_{2N}`$. Here, we only need to point out that one can also define a notion of parallelism between lines: two lines parametrized by the same set of integers $`n_1`$ and $`n_2`$ are parallel to each other (in Figure (1) we show some examples of lines on a grid).

So, let us show that by adding phase space point operators on a line one always gets projection operators. We are interested in looking at the operator $`\widehat{A}_L`$ defined as

$$\widehat{A}_L=\underset{(q,p)L}{}\widehat{A}(q,p).$$
(35)
It is clear that this operator can be rewritten as

$`A_L`$ $`=`$ $`{\displaystyle \underset{q,p=0}{\overset{2N1}{}}}\widehat{A}(q,p)\delta _{2N}(n_1pn_2qn_3)`$ (36)
$`=`$ $`{\displaystyle \frac{1}{2N}}{\displaystyle \underset{\lambda =0}{\overset{2N1}{}}}{\displaystyle \underset{q,p=0}{\overset{2N1}{}}}\widehat{A}(q,p)\text{e}^{i\frac{2\pi }{2N}\lambda (n_1pn_2qn_3)}`$ (37)
$`=`$ $`{\displaystyle \frac{1}{2N}}{\displaystyle \underset{\lambda =0}{\overset{2N1}{}}}\widehat{T}^\lambda (n_1,n_2)\text{e}^{i\frac{2\pi }{2N}n_3\lambda }`$ (38)
where to perform the sum over the phase space grid we used the fact that the Fourier transform of $`\widehat{A}(\alpha )`$ is given in (28). Now, as $`\widehat{T}(n_1,n_2)`$ is unitary, it has $`N`$ eigenvectors $`|\varphi _j`$ with eigenvalues $`\mathrm{exp}(i2\pi \varphi _j/N)`$. Moreover, this operator is cyclic and satisfies $`\widehat{T}^N=𝕀`$. Therefore, as its eigenvalues are $`N`$th roots of unity, $`\varphi _j`$ must be integers. Then, we can rewrite equation (38) as:

$`\widehat{A}_L`$ $`=`$ $`{\displaystyle \frac{1}{2N}}{\displaystyle \underset{\lambda =0}{\overset{2N1}{}}}{\displaystyle \underset{j=0}{\overset{N}{}}}\text{e}^{i\frac{2\pi }{2N}(2\varphi _jn_3)\lambda }|\varphi _j\varphi _j|`$ (39)
$`=`$ $`{\displaystyle \underset{j=0}{\overset{N}{}}}\delta _{2N}(2\varphi _jn_3)|\varphi _j\varphi _j|.`$ (40)
Therefore, it is clear that $`\widehat{A}_L`$ is a projection operator onto a subspace generated by a subset of the eigenvectors of the translation operator $`\widehat{T}(n_1,n_2)`$. The dimensionality $`d`$ of this subspace is equal to the trace of $`\widehat{A}_L`$. To calculate it, we just have to notice that in general

$$\text{Tr}[\widehat{A}(q,p)]=\frac{1}{2N}\underset{q^{}=0}{\overset{N1}{}}\delta _N(q2q^{})\text{e}^{i\pi (q2q^{})p/N}$$
(41)
This last equation is easy to evaluate but the result depends on the parity of $`N`$. Thus, if $`N`$ is even then $`\text{Tr}(\widehat{A}(q,p))=1/N`$ if both $`q`$ and $`p`$ are even and it is zero otherwise. On the other hand for odd values of $`N`$, one has that $`\text{Tr}(\widehat{A}(q,p))=1/2N`$ for all values of $`q`$ and $`p`$ except when they are both odd where it has the opposite sign (i.e., it is equal to $`1/2N`$). In the rest of the paper we will concentrate on analyzing the case of even $`N`$ which is somewhat more relevant for a quantum computer (that has at least one qubit and therefore a Hilbert space which is even dimensional). Using the above result for the trace of $`\widehat{A}(\alpha )`$ one can see that the dimensionality of the projector $`\widehat{A}_L`$ is simply given by $`1/N`$ times the number of points that belong to the line $`L`$ which have even $`q`$ and even $`p`$ coordinates. An immediate consequence of this is that if $`n_3`$ is odd then $`d=0`$ (since the sum of two even numbers can never be odd). Finally we can write an explicit formula for $`d`$ in the case of even $`N`$:

$$d=\frac{1}{2}\underset{\lambda =0}{\overset{N1}{}}\delta _N(\lambda n_1)\delta _N(\lambda n_2)\text{e}^{i\frac{2\pi m\lambda }{2N}}(1+(1)^{n_3})$$
(42)
Let us illustrate the above result applying it to the simplest example: For a line $`L_q`$ defined as $`q=n_3`$ (i.e., $`n_1=1`$, $`n_2=0`$), the Wigner function summed over all points in $`L_q`$ is $`_{(q,p)L_q}W(q,p)=_pW(n_3,p)=n_3/2|\widehat{\rho }|n_3/2`$ if $`n_3`$ is even (and zero otherwise). Analogously, considering horizontal lines ($`L_p`$ defined as $`p=n_3^{}`$) we get $`_{(q,p)L_p}W(q,p)=_qW(q,n_3^{})=n_3^{}/2|\widehat{\rho }|n_3^{}/2`$ if $`n_3^{}`$ is even (and zero otherwise). These are just two examples a general result: this Wigner function always generates the correct marginal distributions (this, as in the continuous case, is the defining feature of $`W(q,p)`$).

As a final point in this section where we reviewed some known (and other not so well known) results on discrete Wigner functions we think it is convenient to mention some simple properties of the phase space grid $`G_{2N}`$. Most of the ideas we are using were introduced by Wootters . As mentioned above we can simply define lines $`L(n_1,n_2,n_3)`$ and introduce a notion of parallelism in the grid $`G_{2N}`$. A foliation of the grid with a family of parallel lines is obtained by fixing $`n_1`$ and $`n_2`$ and varying $`n_3`$ (in general, it is evident that two lines are parallel if the ratio $`n_1/n_2`$ is the same). If $`N`$ is a prime number then in the grid $`G_N`$ (which has $`N\times N`$ points) there are exactly $`N(N+1)`$ distinct lines which can be grouped into $`N+1`$ sets of parallel lines (these are $`N+1`$ different foliations of the grid). If $`N`$ is not prime or, as it is the case we are interested in, in the grid $`G_{2N}`$ this result is no longer true. For example, it is very clear that the equation $`n_1qn_2p=n_3`$ (mod $`2N`$) has no solutions for odd values of $`n_3`$ and even values of $`n_1`$ and $`n_2`$. So, it is not generally true that our lines have always $`2N`$ points: As shown above sometimes they can have no points at all and in some cases one can construct lines with a number of points that is a multiple of $`2N`$. This is the case if $`n_1`$ and $`n_2`$ have common prime factors with $`N`$. For example in the case $`2N=8`$, each line with $`n_1=n_2=1`$ have $`8`$ points, but lines with $`n_1=n_2=2`$ have no points if $`n_3`$ is odd or $`16`$ points each when $`n_3`$ is even. In any case, the simplest way to represent the lines in the phase space is by noticing that, as the topology of the lattice is that of a torus (due to the cyclic boundary conditions) lines wrap around the torus. The number of points in the line is related to the number of times it wraps around before it closes onto itself. Figure 1 shows an example of two sets of lines on the grid $`G_{2N}`$ for the case of $`N=4`$.

Let us summarize the results presented in this Section: We defined a Wigner function for systems with a finite dimensional Hilbert space (of arbitrary dimension $`N`$). The Wigner function is defined as the expectation value of the phase space operator $`\widehat{A}(\alpha )`$ given in (25). This definition is such that $`W(\alpha )`$ is real, it can be used to compute inner products between states and it gives all the correct marginal distributions when added over any line in the phase space, which is a grid $`G_{2N}`$ with $`2N\times 2N`$ points. The size of the phase space grid is important to obtain a Wigner function with all the desired properties. The values of $`W(\alpha )`$ on the subgrid $`G_N`$ are enough to reconstruct the rest of the phase space (since the set $`\widehat{A}(\alpha )`$ is complete when $`\alpha `$ belong to the grid $`G_N`$). However, the redundancy introduced by the doubling of the number of sites in $`q`$ and $`p`$ is essential when one imposes the condition that all the marginal distributions should be obtained from the Wigner function. In the rest of the paper we will concentrate on applying this Wigner function to study the states and the evolution of a typical quantum computer.

## IV Wigner Functions of quantum states

To compute the Wigner function of any quantum state it is convenient to use equation (25) for $`\widehat{A}(q,p)`$ and write:

$$W(q,p)\frac{1}{2N}\underset{n=0}{\overset{N1}{}}qn|\widehat{\rho }|n\text{e}^{i\frac{2\pi }{N}n(pq/2)}.$$
(43)
Moreover, it is worth remembering that one only needs to compute $`N^2`$ independent values (restricting to $`\alpha =(q,p)G_N`$) and from them one can reconstruct the remaining $`3N^2`$ ones by using (31). Before showing the specific form of the Wigner function of some states it is worth mentioning some general features of the Wigner function of pure states. In fact, if the quantum state is pure then $`\widehat{\rho }`$ is a projection operator. Then, expanding $`\widehat{\rho }`$ in terms of the phase space operators as in (33) and imposing the condition $`\widehat{\rho }^2=\widehat{\rho }`$ one gets

$$W(\alpha )=4N^2\underset{\beta \gamma G_N}{}\mathrm{\Gamma }(\alpha ,\beta ,\gamma )W(\beta )W(\gamma ).$$
(44)
where the function $`\mathrm{\Gamma }(\alpha ,\beta ,\gamma )`$, that depends on three phase space points (i.e, on a triangle) is

$`\mathrm{\Gamma }(\alpha ,\beta ,\gamma )`$ $`=`$ $`\text{Tr}(\widehat{A}(\alpha )\widehat{A}(\beta )\widehat{A}(\gamma ))`$ (45)
$`=`$ $`{\displaystyle \frac{1}{4N^3}}\text{e}^{i\frac{2\pi }{N}S(\alpha ,\beta \gamma )}`$ (46)
if either two or three of the points $`(\alpha ,\beta ,\gamma )`$ have even $`q`$ and even $`p`$ coordinates. Otherwise $`\mathrm{\Gamma }(\alpha ,\beta ,\gamma )=0`$. In the above expression, which is valid for even values of $`N`$, $`S(\alpha ,\beta ,\gamma )`$ is the area of the triangle formed by the three phase space points (measured in units of the elementary triangle formed when the three points are one site apart). A similar expression is obtained by Wooters . The three point function $`\mathrm{\Gamma }(\alpha ,\beta ,\gamma )`$ has then a simple geometric meaning and will play an interesting role in determining the properties of the temporal evolution (as Unitary evolution preserves pure states, it will be represented by a linear map in phase space that leaves $`\mathrm{\Gamma }`$ invariant, as shown see below).

### A Position and momentum eigenstates, and their superpositions

Here, we first evaluate the Wigner function of a position eigenstate (a computational state of the quantum computer) $`\widehat{\rho }_{q_0}=|q_0q_0|`$. It is straightforward to obtain a closed expression for $`W(q,p)`$:

$`W_{q_0}(q,p)`$ $`=`$ $`{\displaystyle \frac{1}{2N}}q_0|\widehat{U}^q\widehat{R}\widehat{V}^p|q_0\text{e}^{i\pi pq/N}`$ (47)
$`=`$ $`{\displaystyle \frac{1}{2N}}\delta _N(q2q_0)(1)^{p(q2q_0)_N}`$ (48)
where $`z_N`$ denotes $`z`$ modulo $`N`$. This function is zero only on two vertical strips located at $`q=2q_0`$ modulo $`N`$. When $`q=2q_0`$, $`W(q,p)`$ takes the constant value $`1/2N`$ while for $`q=2q_0\pm N`$ it is $`1/2N`$ for even values of $`p`$ and $`1/2N`$ for odd values. These oscillations are typical of interference fringes and can be interpreted as arising from interference between the $`q=2q_0`$ strip and a mirror image formed at a distance $`2N`$ from $`2q_0`$, which is induced by the periodic boundary conditions. The fact the the Wigner function becomes negative in this interference strip is essential to recover the correct marginal distributions. Adding the values of $`W(q,p)`$ along a vertical line gives the probability of measuring $`q/2`$ which should be $`1`$ for $`q=2q_0`$ and zero otherwise. A very similar calculation can be done for a momentum eigenstate $`\widehat{\rho }=|k_0k_0|`$. The result is very similar except that now the strips are horizontal.

It is interesting to analyze also the Wigner function of a state which is a linear superposition $`|\psi =\left(|q_0+\text{e}^{i\varphi }|q_1\right)/\sqrt{2}`$. Again one can simply get a closed expression for $`W(q,p)`$ which is

$$W(q,p)=\frac{1}{2}\left[W_{q_0}(q,p)+W_{q_1}(q,p)+\mathrm{\Delta }W_{q_0,q_1}(q,p)\right]$$

where the interference term is

$$\mathrm{\Delta }W_{q_0,q_1}(q,p)\frac{1}{N}\delta _N(\stackrel{~}{q})(1)^{\stackrel{~}{q}p}\mathrm{cos}\left(\frac{2\pi }{\lambda }p+\varphi \right),$$

with $`\stackrel{~}{q}=q_0+q_1q`$ and $`\lambda 2N/(q_0q_1)`$. Thus, this Wigner function has two direct terms which simply correspond to the two computational states and an interference term which is peaked on the vertical strips located at the midpoint $`q=q_0+q_1\text{mod}N`$. On this strip the Wigner function oscillates with a wavelength that is inversely proportional to the separation between the main fringes. This oscillatory pattern has its corresponding mirror image and the interference between them produce some more oscillations. In figure 2 we show the Wigner function for a state and a superposition of two such computational states. The plot is much more eloquent than any equation and shows both the presence of the main peaks, its mirror images and (in the case of a superposition state) the interference fringes.

### B Other quantum states

The Wigner function can be computed in closed form for some other interesting states. In figure 3 we display such function for the completely mixed state (that, as we mentioned above, is nonzero only when both $`q`$ and $`p`$ are even). We also show the Wigner function for a pure state constructed as a Gaussian superposition of computational states (with periodic boundary conditions, i.e. a sum of a Gaussian state centered about a phase space point and all its infinite mirror images). The Gaussian wavepacket has a Wigner function with a positive Gaussian peak and shows three other Gaussian peaks that are modulated by interference fringes. They correspond to the interference between the main peak and its mirror images (notice the different orientation of these fringes).

## V Temporal evolution in phase space

Temporal evolution of a quantum system can also be represented in phase space. If $`U`$ is the unitary evolution operator that takes the state of the system from time $`t`$ to time $`t+1`$, the density matrix evolves as

$$\rho (t+1)=U\rho (t)U^{}.$$
(49)
Using this, it is simple to show that the Wigner function evolves as

$$W(\alpha ,t+1)=\underset{\beta G_{2N}}{}Z_{\alpha \beta }W(\beta ,t).$$
(50)
where the matrix $`Z_{\alpha \beta }`$ is defined as

$$Z_{\alpha \beta }=NTr(\widehat{A}(\alpha )U\widehat{A}(\beta )U^{}).$$
(51)
Therefore, temporal evolution in phase space is represented by a simple linear transformation (which is, of course, an immediate consequence of linearity of Schrödinger equation). Unitarity imposes some constraints on the matrix $`Z_{\alpha \beta }`$: As purity of states is preserved, temporal evolution must preserve the structure of the constraint equation (44). Therefore, the matrix must leave invariant the three point function $`\mathrm{\Gamma }(\alpha ,\beta ,\gamma )`$, i.e.

$$\mathrm{\Gamma }(\alpha ^{},\beta ^{},\gamma ^{})=\underset{\alpha \beta \gamma }{}Z_{\alpha ^{}\alpha }Z_{\beta ^{}\beta }Z_{\gamma ^{}\gamma }\mathrm{\Gamma }(\alpha ,\beta ,\gamma ).$$
(52)
The real matrix $`Z_{\alpha \beta }`$ contains all the information about the nature of temporal evolution. In general, this matrix connects a point $`\alpha `$ with many other points $`\beta `$. Therefore, temporal evolution will be generally nonlocal in phase space. This is a unique quantum mechanical feature: In fact, classical systems evolve in phase space following a flow of classical trajectories. In such case, the value of the classical distribution function $`W(\alpha ,t+1)`$ is equal to the value $`W(\beta ,t)`$ for some point $`\beta `$ which is a well defined function of $`\alpha `$ and $`t`$. One may ask what kind of Unitary operators generate a local dynamical evolution in phase space. Below, we will give examples of this type.

### A Phase space translations

It is simple to show that if we consider the unitary evolution to be the phase space translation operator $`\widehat{T}(\sigma )=\widehat{T}(q,p)`$ then temporal evolution is local in phase space. Moreover, quantum and classical evolution are identical in this case since the value of the Wigner function is rigidly translated in phase space:

$$U=\widehat{T}(\sigma )W(\alpha ,t+1)=W(\alpha 2\sigma ,t).$$
(53)
Notice that the factor of $`2`$ in the above equation is simply a consequence of the fact that we are working in a phase space grid of $`2N\times 2N`$. Another example of a local evolution is the one associated with the phase space operators $`\widehat{A}(\alpha )`$ themselves. In such case the resulting evolution is not just a translation but a translation combined with a reflection:

$$U=\widehat{A}(\sigma )W(\alpha ,t+1)=W(2\sigma \alpha ,t).$$
(54)
The above are two simple examples of families of unitary operators with corresponding local phase space representations. As we will see below, the family of operators with a direct correspondence between quantum and classical evolution has other interesting members.

### B Fourier transform

The discrete Fourier transform is a unitary operator that is widely used in quantum algorithms . As position and momentum basis are related by this operator one expects that it should have a rather simple phase space representation. In fact, this is indeed the case: One can easily show that the Fourier transform is represented as a rotation in $`90`$ degrees:

$$U=U_{FT}W(q,p,t+1)=W(p,q,t).$$
(55)
where $`p`$ is the additive inverse mod$`(N)`$. Thus, the Fourier transform is also represented by a local operation in phase space (and, in this sense it is a completely “classical” operation, acting independently on each of the $`N\times N`$ subgrid). For example, by applying the Fourier transform to the quantum states whose Wigner functions are shown in Figure 2 (a computational state and a superposition of two such states) one obtains the resulting Wigner function by rotating the above figure by $`90`$ degrees (i.e., one gets a momentum eigenstate or a superposition of two such states where the vertical pattern in Figure 2 is mapped into the same horizontal pattern). It is clear that by applying the Fourier transform twice one gets a rotation by $`180`$ degrees. This is nothing but a reflection, which is what equation (20) tells us.

### C Quadratic (cat) maps propagate classically

The above operators (rigid translations, reflections and the Fourier transform) are just some examples of unitary operators which generate a classical evolution in phase space. A more general family with such property will be discussed here. This family is formed by the quantization of classical dynamical systems with a quadratic Hamiltonian and a finite phase space with periodic boundary conditions (as the phase space is a torus, the classical transformations are the linear automorphisms of the torus ). We will briefly present these unitary operators here and show that classical and quantum evolution coincides (a fact that has been shown before, using different techniques, by Hannay and Berry ). Consider the following two-parameter family of operators (it is possible to consider a slightly more general case, with one more parameter, but to simplify the presentation we restrict to this simpler case ).

$$U_{cat}=𝒱_b𝒯𝒱_a.$$
(56)
The operators $`𝒱_a`$ and $`𝒯`$ are respectively diagonal in the position and momentum basis and satisfy

$`𝒱_j|n`$ $`=`$ $`\mathrm{exp}(i2\pi n^2(1j)/2N)|n`$ (57)
$`𝒯|k`$ $`=`$ $`\mathrm{exp}(i2\pi k^2/2N)|k`$ (58)
where $`j`$ is an integer. The operator $`U_{cat}`$ can be simply thought of as the evolution operator of a kicked system with a Hamiltonian in which kinetic and momentum terms are turned on and off alternatively. The parameters $`a`$ and $`b`$ are integers that measure the strength of the potential kicks. It is straightforward to find out what is the classical system to which the above operator corresponds: One way to do this is to take the matrix elements of (56) in the computational basis and show that

$$n^{}|U_{cat}|n=K\mathrm{exp}(i2\pi (an^2+bn^22nn^{})/2N)$$
(59)
where $`K`$ is a normalization constant. The exponent in this equation can be interpreted as the classical action of the system, where $`n`$ and $`n^{}`$ the final and initial values of the coordinates. Therefore, the classical equations of motion corresponding to this system are

$$n=bn^{}+p^{}p=(ab1)n^{}+ap^{}.$$
(60)
This classical system has been extensively studied : For integer values of $`a`$ and $`b`$, it is a member of the famous family of “cat” maps , i.e. all linear automorphisms of the torus. The system is chaotic when the eigenvalues of the linear transformation $``$ mapping $`\alpha ^{}=(n^{},p^{})`$ onto $`\alpha =(n,p)`$ as in (60) are both real (otherwise the map is integrable). This is the case when when $`Tr=a+b>2`$ (notice that $``$ has unit determinant). In particular, when $`a=2`$ and $`b=1`$ this is the so–called Arnold–cat map ($`n=n^{}+p^{}`$, $`p=n^{}+2p`$. This special cat, according to (56), simply has a kinetic kick followed by a potential kick where the potential is an upside-down harmonic oscillator.

The reason why quantum and classical evolution are identical in this case can be shown by using our previous results. In fact, we need to compute the matrix $`Z_{\alpha \beta }`$ that evolves the Wigner function. To do this calculation it is useful to first notice that, if the evolution operator $`U`$ is the one given in (56), then the following identity holds:

$$U_{cat}\widehat{A}(\alpha )=\widehat{A}(\alpha )U_{cat},$$
(61)
where, as above, the linear transformation is the one given in (60). This means that the unitary evolution operator maps the phase space point operator in the same way as the classical dynamics does with the phase space point. Using this, it is simple to show that the Wigner function evolves classically:

$$U=U_{cat}W(\alpha ,t+1)=W(^1\alpha ,t).$$
(62)
Our result above is not so surprising when seen from the perspective of ordinary quantum mechanics of continuous systems. In fact, it is well known that quantum and classical evolutions are identical in phase space if and only if the classical system has a Hamiltonian that is quadratic in $`p`$ and $`q`$ (i.e. a harmonic oscillator). Here, we showed that the same result is valid for systems with a finite dimensional Hilbert space. It is worth pointing out that it is possible to design a simple quantum circuit to implement the evolution operator $`U_{cat}`$ . This can be done by noticing that the potential kick is diagonal in the computational basis and to implement it one simply needs a circuit with the same complexity than the Fourier transform (in this way one can construct a circuit implementing a controlled phase gate where state $`|n`$ acquires a phase that depends quadratically in $`n`$ ). The operator corresponding to the kinetic kick con be implemented by a similar circuit in between a Fourier transform and its inverse.

### D Boolean gates in phase space

The family of quantum cat maps is rather large but does not contain some operators that are more natural from the point of view of quantum computation. We study here such operators by analyzing when does quantum and classical evolution are identical in phase space if the dynamics is generated by an arbitrary boolean gate. This kind of operation, which is a permutation of the computational basis, is an essential ingredient in Shor’s factoring algorithms and others . So, let us consider a one to one function $`f:Z_NZ_N`$ ($`f`$ is a permutation of the first $`N`$ integers). Given $`f`$ we can define a unitary operator $`U_f`$ whose action in the computational basis is to permute vectors in the same way $`f`$ permutes numbers:

$$U_f|n=|f(n)$$
(63)
The Boolean function $`f`$ corresponds to some general (reversible) classical circuit. Moreover, one can also associate with $`f`$ a classical map in the phase space. Such map is the one permuting the vertical strips corresponding to the different positions according to the function $`f`$, i.e. it maps the vertical strip labeled by $`n`$ into the one labeled by $`f(n)`$). Here, we want to determine under what condition the phase space evolution associated with $`U_f`$ is identical to the classical one (i.e., to the mapping of the vertical strips). The answer to this question is remarkably simple: the quantum map is identical to the classical one if and only if $`f(n)=n+a`$ (mod$`(N)`$, for any integer $`a`$). That is to say, quantum and classical permutations are identical only in the case of $`f`$ corresponding to a cyclic shift.

The proof of the above statement is simple: We will consider the action of $`U_f`$ on two classes of states. First we will look at how $`U_f`$ transforms the Wigner function of a computational state (i.e., a density matrix like $`\rho =|n_0n_0|`$, shown in Figure 2 (a)). Then, we will analyze how $`U_f`$ modifies the Wigner function of the interference term between two computational states (i.e., a density matrix of the form $`\rho =|n_0n_1|\pm |n_1n_0|`$ shown in the interference pattern seen in Figure 2b). These operators form a complete basis of the space of hermitian matrices. Therefore, by looking at the evolution of each of these states we are also able to understand the evolution of the most general state. As $`U_f`$ simply permutes computational states, it is straightforward to show that the Wigner function of any such state (shown in Figure 2a) will be transformed according to the classical map, i.e. the resulting Wigner function is obtained from the original one just by permuting vertical strips according to the classical map $`2nf(2n)`$). However, the fate of a state corresponding to the superposition between two computational states is drastically different: As shown above, the interference fringes are originally located at the midpoint between the two interfering states (i.e. at point $`n=n_0+n_1`$). Therefore, for the state to evolve classically one needs to impose that this midpoint is mapped into the midpoint of the transformed states (i.e. that $`2f(n_1+n_2)=f(2n_1)+f(2n_2)`$). Moreover, the original state has oscillations with a wavelength that depends on the distance between the two computational states ($`\lambda =2N/(n_0n_1)`$. Therefore, for the state to evolve classically these fringes must remain unchanged and the only possibility for this to happen is that the distance between the states remains constant (i.e. that $`2(n_0n_1)=f(2n_0)f(2n_1)`$). The only solution for these two constraints is that $`f(n)=n+a`$, i.e. a linear function corresponding to a rigid shift in the computational basis.

This result can be generalized as follows: Instead of defining $`U_f`$ as in (63) we can consider a more general operator $`U_{f,g}`$ which is now associated with two integer one to one functions in such a way that $`U_{f,g}|n=\mathrm{exp}(i2\pi g(n)/N)|f(n)`$. Following the same steps described above one can show that the operator acts in the same way as the corresponding classical map if and only if both functions are such that $`f(n)=n+a`$, $`g(n)=n+b`$. In such case this operator is nothing but the phase space translation $`\widehat{T}(a,b)`$. Thus, our result shows that if one defines the quantum analog of a classical gate as we did, the only such unitary operator which generates the same phase space dynamical evolution as its classical analog is the one corresponding to a linear rigid shift.

It is interesting to notice that the structure of the above proof (that focuses on how quantum interference terms are affected by quantum or classical evolution) could also be applied to ordinary quantum mechanics (of continuous systems) and sheds new insight on the reason why only linear systems evolves classically for all times. We remark that this result has remained unnoticed for quantum computers and may offer some help in our efforts to understand the differences between these systems and their classical counterparts.

### E Nonlocal (quantum) evolution in phase space

Apart from the above simple examples with direct classical counterpart, most of unitary operators generate a rather complicated nonlocal evolution for the Wigner function. As an example we can explicitly compute matrix elements of $`Z_{\alpha \beta }`$ for some simple case: If we consider a bit flip of the least significant qubit (which is associated with $`\sigma _x^{(0)}`$) we can show that:

$$U=\sigma _x^{(0)}Z_{\alpha 0}=Z_{0\alpha }=2/N\mathrm{if}\alpha \mathrm{is}\mathrm{even}$$
(64)
and is equal to zero otherwise ($`\alpha =(q,p)`$ is even when both $`q`$ and $`p`$ are even). Other matrix elements of $`Z_{\alpha \beta }`$ are simple to compute but this is enough for the purpose of exhibiting the nonlocal nature of the evolution. The above equation implies that when $`U=\sigma _x^{(0)}`$ the next value of $`W(0)`$ is proportional to the sum of $`W(\alpha )`$ over all even values of $`\alpha `$ which is indeed a rather nonlocal mapping.

Another simple example of nonlocal evolution is constructed by considering a unitary operator $`U_{FT}^{(N/2)}`$ which consists of doing nothing to the most significant qubit and applying the Fourier transform to the rest (this is a Fourier transform on a space of dimension $`N/2`$). In such case, the resulting evolution bears some relation to a $`90`$ degrees rotation (as the complete Fourier transform does) but is a rather nonlocal beast. It can be seen that this operation can be understood as the quantization of a Bernouilli shift. In fact it is an essential ingredient in the construction of the quantum bakers map (see  for more details). Here we are only concerned with the phase space description of this operation. Classically, when operating on a vertical strip, i.e. a computational state - this circuit shifts it by $`n^{}2n(modN)`$, contracts it to half height (and double thickness) and rotates by $`90^0`$. Remnants of this behavior can be seen on the left plot of Figure 4 where the operation has acted on the computational state illustrated in Figure 2. Notice that the phase space representation shows strong diffraction  effects which lead to a non local $`Z_{\alpha \beta }`$. It is not difficult to understand where these effects come from: the unchanged qubit divides the phase space in two regions and the map acts discontinuously on them, thus creating the same effect as a screen in an optical system. This is contrasted in the right part of Figure 4 with the action of Arnold’s cat map on the same state. In such case, the vertical strip is simply transported by the classical linear flow.

### F Quantum algorithms in phase space

Quantum algorithms are nothing but unitary operators that have been designed so that after applying them several times, they produce a state that encodes the answer to some computational problem. A measurement on such state gives us information about this answer. Quantum algorithms are designed in such a way that they have a regular behavior as function of $`N`$. Thus, at least in some cases, one should be able to observe this regularities in a phase space representation. In fact, such representation becomes more useful also in the large $`N`$ limit, which is the semiclassical limit (since $`1/N`$ is an effective Planck constant). The study of the phase space representation of quantum algorithms is only beginning but there are already some interesting results showing that some algorithms may find phase space as a natural arena to be represented in. The example we would like to point out here is Grover’s search algorithm whose phase space representation is shown in Figure 5

In this Figure we display the Wigner function of the quantum state of a computer after every iteration of Grover’s search algorithm. Our system has an $`N=32`$–dimensional Hilbert space (i.e., the computer has just $`5`$ qubits) and the algorithm is designed to search for the marked item which we chose here to be $`q=16`$ (indicated with an arrow in the plot). The initial state is chosen to be an equally weighted superposition of all computational states which, for the purpose of making the plots more visible, we chose to be a non-zero momentum state (the usual choice for the initial state in Grover’s algorithm is a zero momentum state but the algorithm works as well with an initial state $`|k`$ with nonzero momentum). The quantum search algorithm consists of the iteration of a unitary operator $`U_G`$ which can be decomposed as $`U_G=U_kU_o`$. The operator $`U_o`$ represents a call to an oracle that only distinguishes the marked item $`\omega `$ from the rest: $`U_o=I2|\omega \omega |`$. The operator $`U_k`$ (the inversion about the mean) has no information about the marked item and is chosen as $`U_k=I2|kk|`$. The quantum computer should be initially prepared in the state $`|k`$. After a number of iterations $`T\pi \sqrt{N}/4`$ the probability of detecting the position $`q=\omega `$ becomes of order unity (with small correction decaying as $`1/N`$). Thus, by measuring the position at this time one would discover the marked item. From the figure one clearly observes that this algorithm is very simple when seen from a phase space representation. The initial state has a Wigner function which is a horizontal strip (with its oscillatory companion). After each iteration $`W(q,p)`$ shows a very simple Fourier-like pattern and becomes a pure coordinate state at the end of the search (in our case, the optimal number of iterations is $`T\pi \sqrt{N}/45`$). This representation shows that, as a map, Grover’s algorithm has a fixed phase space point with coordinate equal to the marked item ($`q=16`$ in our case) and momentum equal to the one of the initial state.

It is interesting to speculate if this phase space representation may be of guidance to create new quantum algorithms or improve on existing ones. We cannot present clear evidence to support this but we believe this will be the case. However, some careful thought is required. At this moment we can only offer the reader some of our experience on the way one should not proceed: Viewing Figure 5 one may be tempted to try to find a quantum map that has the same fixed point as the above but transform horizontal strips into vertical ones faster than Grover’s. It is interesting to notice that such maps do exist. In fact, one just needs a hyperbolic (instead of an integrable) map with the same fixed point structure. In fact, a hyperbolic map with the same fixed point structure would perform the same operation exponentially faster, because it would transform a state initially along the stable direction into one along the unstable one in a time of order $`\mathrm{log}(N)`$ . Such hyperbolic maps can be easily constructed as variations of the quantum bakers map. However, their construction requires from the oracle much more information than a simple yes/no query and thus do not qualify as fast search algorithms.

## VI Measuring the Wigner Function

In this section we review a general procedure to directly measure the value of the Wigner function of a system in any phase space point (the procedure applies for discrete and also for continuous systems). This measurement strategy was originally proposed in  as an application of a very general tomographic scheme. It generalizes previous proposals that were put forward to measure the Wigner function in quantum optics or cavity QED setups (see  for a review).

The basic idea of the measurement is best described in terms of the quantum algorithm represented by the simple quantum circuit shown in Figure 6. It works as follows: Suppose you want to measure the Wigner function of a system that is prepared in some quantum state $`\widehat{\rho }`$. What you need to do is to bring this system in contact with an ancillary qbit prepared in the state $`|0`$ and then “run” the quantum computation described by the circuit shown in Figure 6. The ancillary qbit plays the role of a “probe particle” in a scattering–like experiment. The algorithm represented in the circuit is: i) Apply an Hadamard transform to the ancillary qbit (where $`H|0=(|0+|1)/\sqrt{2}`$, $`H|1=(|0|1)/\sqrt{2}`$), ii) Apply a “controlled–$`\widehat{U}`$” operator (if the ancilla is in state $`|0`$ this operator acts as the identity for the system but if the state of the ancilla is $`|1`$ it acts as the unitary operator $`\widehat{U}`$ on the system), iii) Apply another Hadamard gate to the ancilla and finally perform a weak measurement on this qbit detecting its polarization (i.e., measuring the expectation values of Pauli operators $`\sigma _z`$ and $`\sigma _x`$). It is easy to show that the above circuit has the following remarkable property:

$$\sigma _z=Re(Tr(\widehat{U}\widehat{\rho })),\sigma _y=Im(Tr(\widehat{U}\widehat{\rho })).$$
(65)
Thus, the final polarization measurement reveals a property determined both by the initial state $`\widehat{\rho }`$ and the unitary operator $`\widehat{U}`$.

It is clear that this circuit can be used for dual purposes: On the one hand, we can use it to extract information on the operator $`\widehat{U}`$ if we know the state $`\widehat{\rho }`$. On the other hand, the same circuit can be used to learn about the state $`\widehat{\rho }`$ by using some specific operators for $`\widehat{U}`$. In this sense, this circuit can be adapted to act either as a tomographer or as an spectrometer which, therefore, are two dual faces of the simple quantum computation shown above . The analogy with a typical scattering experiment is quite clear: the probe particle is prepared in a well determined state, then it interacts with the system. From the measurement of some statistical distribution of the probe (in this case the polarization) we are able to infer properties of either the interaction or the state of the scatterer.

In  we showed that this circuits can be used to measure the Wigner function. This is done by simply choosing $`\widehat{U}=\widehat{A}(\alpha )`$. By doing this, every time one runs the algorithm a direct measurement of $`W(\alpha )`$ is obtained (for any given phase space point $`\alpha `$). This measurement strategy can be, in principle, used both for the continuous and the discrete case. For example, in the continuous case, to measure $`W(\alpha )`$ of a quantum particle one has to run the algorithm with the system in the initial state $`D(\alpha )\widehat{\rho }D^{}(\alpha )`$ (obtained by displacing $`\widehat{\rho }`$) and using $`\widehat{U}=\widehat{R}`$ (it is clear that this is equivalent, but simpler, than applying the circuit directly with $`\widehat{U}=\widehat{A}(\alpha )`$). The measurement of the Wigner function for the discrete case can be done in a similar way but in that case it is more convenient to directly use $`\widehat{U}=\widehat{A}(\alpha )`$. In both cases, as the operator $`\widehat{A}(\alpha )`$ is both unitary and hermitian, the measurement of the Wigner function only requires determining the $`z`$–component of the polarization.

Measuring directly the Wigner function of a quantum system has been the goal of a series of experiments proposed and performed in various areas of physics (all dealing with continuous systems, ). It is interesting to notice that the above measurement strategy precisely describes the experiment recently performed to determine the Wigner function of the electromagnetic field in a cavity QED setup . In fact, in such case the system is the mode of the field stored in a high–$`Q`$ cavity and the ancillary qbit is a two level atom. Remarkably, this experiment can be easily described in terms of the application of the algorithm shown in Figure 6: i) The atom goes through a Ramsey zone that has the effect of implementing an Hadammard transform. A radio-frequency source is connected to the cavity displacing the field in phase space (by an amount parametrized by $`\alpha `$), ii) The atom goes through the cavity interacting dispersively with the field. The interaction is tuned in such a way that, if the atom is in state $`|g`$ nothing happens but if the state of the atom is $`|e`$ the state acquires a phase shift of $`\pi `$ per photon in the cavity. So, this interaction is simply a controlled–$`\mathrm{exp}(i\pi \widehat{N})`$ gate (where $`\widehat{N}`$ is the photon number operator) which is nothing but a controlled reflection. iii) The atom leaves the cavity entering a new Ramsey zone that enforces a new H–gate. Finally the atom is detected in a counter either in the ground $`|g`$ or in the excited $`|e`$ state. The experiment is repeated many times and the Wigner function is obtained as the difference between the probability of the atom being in the excited and ground states: $`W(q,p)=2(P(e)P(g))/\mathrm{}`$. As we see, this cavity–QED experiment is an example of a tomographic experiment represented by the circuit of Figure 6. The important point is that the method is generalizable to arbitrary systems (continuous or discrete) when viewed in terms of the above circuit.

For the discrete case, one can show that the circuit in Figure 6 can be efficiently decomposed as a sequence of elementary gates. For this, one only needs to implement controlled-$`\stackrel{~}{U}`$, $`\stackrel{~}{V}`$ and $`\widehat{R}`$ operations. All these can be implemented via efficient networks like the ones shown in  which require a number of elementary gates that depends polinomially on $`log(N)`$. For example, to decompose $`\widehat{V}`$ as a sequence of one qbit gates we can notice that its action on a computational state $`|n`$ is:

$$\widehat{V}^p|n=\underset{i=0}{\overset{L1}{}}\left[\mathrm{exp}(i2\pi p2^i/N)\right]^{n_i}|n$$
(66)
where $`n_i`$ is the binary expansion of the number $`n`$. From this expression it is clear that to implement $`\widehat{V}`$ we just have to act independently on each qbit. The operator $`\varphi _i`$ acting on the i–th qbit should be such that $`\varphi _i|0=|0`$ and $`\varphi _i|1=\mathrm{exp}(i2\pi p2^i/N)|1`$. On the other hand, to implement $`\widehat{U}`$, which is a shift in the position basis, we can either use a circuit which performs addition mod $`N`$ as described in  or notice that a circuit for $`\widehat{U}`$ is obtained from the one corresponding to $`\widehat{V}`$ by using $`\widehat{U}=U_{FT}^1\widehat{V}U_{FT}`$. Finally, to implement the reflection operator we use the identity (20) which states that two Fourier transforms are equivalent to a reflection. Therefore, the complete network can be obtained straightforwardly.

For small values of $`N`$ the resulting networks are indeed very simple. In  we have presented the results of the measurement of the Wigner function for the particular case of $`N=4`$ (two qbits) for a variety of initial states. In this case the reflection operator is simply a controlled not (CNOT) gate (where the control is in the least significant qbit). The circuit for $`\widehat{U}`$ is the same CNOT followed by bit flip in the control. Analogously, the circuit for $`\widehat{V}`$ is a sequence of controlled phase gates. Thus, the complete measurement circuit has at most one Tofolli gate and several two qbit gates. We experimentally measured the Wigner function of the four computational states of a two qbit quantum computer. The ideal result is shown in Figure 2 and the measured Wigner functions are seen in 7.

To perform these experiments we used a liquid sample of trichloroethylene (TCE) dissolved in chloroform. This molecule has been used in several three qubit experiments where the proton ($`H`$) and two strongly coupled $`{}_{}{}^{13}C`$ nuclei ($`C_1`$ and $`C_2`$) store the three qbits . In our case, we used $`C_1`$ as our control qbit (the probe particle in Figure 6) and the pair $`H`$-$`C_2`$ to store the state whose Wigner function we tomographically measure. The measured coupling constants are $`J_{HC_1}=200.76\text{Hz}`$, $`J_{HC_2}=9.12\text{Hz}`$ and $`J_{C_1C_2}=103.06\text{Hz}`$ while the $`C_1`$-$`C_2`$ chemical shift is $`\delta _{C_1C_2}=908.88\text{Hz}`$. To evaluate the Wigner function in each of the independent $`16`$ phase space points we expressed the algorithm of Figure 6 as a sequence of r.f. pulses and delays (the number of pulses in each sequence depends on the phase space points and varies between $`5`$$`20`$ and take at most $`100`$ms to execute ($`T_1,T_2`$ of our sample)). Experiments were done at room temperature and we used temporal averaging to distill the initial pseudo-pure states . The experiments were done on a standard $`500`$Mhz NMR spectrometer (Bruker AM-500 at LANAIS in Buenos Aires and DRX-500 at Los Alamos). We used a $`5`$mm probe tuned to $`{}_{}{}^{13}C`$ and $`{}_{}{}^{1}H`$ frequencies of $`125.77`$ MHz and $`500.13`$ Mhz, respectively. The measured Wigner functions shown in figure 7 agree with the ideal one within (in the worst case) approximately $`15\%`$ error. The most important sources of errors are understood and come from the effects of strong coupling (that alter the behavior of our gates) and numerical uncertainty in integrating the spectra. It is clear that the result of this simple experiment, that illustrate the tomographic measurement of a discrete Wigner function, agrees very well with the theoretical expectation.

## VII Conclusion

In this paper we first reviewed the formalism to represent in phase space the states and the evolution of a quantum system with a finite dimensional Hilbert space. Then, we applied this formalism to study the phase space representation of quantum computers and quantum algorithms. Finally, we discussed how to perform direct measurements to determine the Wigner function. Our approach, based on the use of phase space point operators to define the Wigner function enables us to find simple proofs for a variety of old and new results concerning both states and algorithms.

The differences between quantum and classical evolution in phase space are clearly seen using this phase space representation: For the Wigner function to evolve classically it is necessary (and sufficient) that the phase space point operators are transformed by the unitary evolution operator in the same way that classical evolution maps phase space points. In our paper we described a rather interesting family of operators with this property. It contains all linear homeomorphisms in the torus (i.e., the family of all “cat” maps) which can be efficiently represented by simple quantum circuits (since they correspond to kicked systems where kinetic and potential terms act alternatively). Moreover, this family also includes all cyclic shifts in the computational (or the momentum) basis, reflections and the Fourier transform. At a deeper level all these properties are a consequence of the well known invariance of the Wigner function under the action of the unitary representation of linear canonical transformations (that form the metaplectic group). Other unitary maps, that have a definite classical non–linear counterpart, will display for some time an almost classical behavior, signalled by a sharply peaked $`Z_{\alpha \beta }`$ matrix. This is the semiclassical limit, that will be reached in the limit $`N\mathrm{}`$, which is an important regime for interesting quantum algorithms since it corresponds to the limit of large number of qubits. A much wider category of maps can display a more drastic wave phenomenon: strong diffraction due to discontinuities. Consider, as the simplest example the phase space operation of a control-$`U`$ gate. The controlling qubit divides phase space in two disjoint regions and the $`U`$-gate acting on the remaining qubits affects these two regions differently. In this sense it acts as a prism or a screen in an optical system. Another simple example of this sort is the action of the operator $`U_{FT}^{N/2}`$, that does not act on the most significant qbit but applies the Fourier transform to the rest (the diffraction effects are clearly seen in Figure 4). The implications and usefulness of these semiclassical features in quantum algorithms remain largely unexplored and will be the subject of further investigation .

###### Acknowledgements.

We thank useful discussions with R Laflamme, E. Knill, C. Negrevergne. We also benefited from our interaction with P. Bianucci. JPP thanks L. Davidovich for his hospitality in Rio and his insight. This work was partially supported with funds from Ubacyt, Conicet, Anpcyt and Fundación Antorchas.