aa r X i v : . [ qu a n t - ph ] J u l Elementary gates for cartoon computation
Marek Czachor
Katedra Fizyki Teoretycznej i Informatyki KwantowejPolitechnika Gda´nska, 80-952 Gda´nsk, Poland
Abstract
The basic one-bit gates ( X , Y , Z , Hadamard, phase, π/
8) as well as the controlled cnot andToffoli gates are reformulated in the language of geometric-algebra quantum-like computation.Thus, all the quantum algorithms can be reformulated in purely geometric terms without any needof tensor products.
PACS numbers: 03.67.Lx, 03.65.Ud . INTRODUCTION Cartoon computation [1] is a formalism for quantum-like computation based on geometricoperations. One does not need tensor products to speak of entanglement, parallelism, super-positions, and interferences. The paper [1] showed the basic principle on the Deutsch-Jozsaproblem [2]. An analogous construction was recently applied in [3] to the Simon problem[4]. Other oracle problems were mentioned in the context of geometric-algebra computationin [5]. In the present paper I will not work with oracles but concentrate on elementary one-,two-, and three-bit gates. This step is essential for both concrete applications and analysisof complexity of algorithms.I first begin with explaining the link between geometric algebra and binary coding. Theidea is essentially the same as in [1], but there are certain technical differences associatedwith two subsidiary dimensions (here a ( n +2)-dimensional Euclidean space is used for coding n -bit numbers). Once we know how to code and perform simple operations on bits, we canintroduce gates. I start with the basic one-bit gates and then introduce multiply controlled not s [6]. Finally I show on a concrete example that the geometric product leads to thesame type of “compression” and parallelism as the tensor product framework of quantumcomputation. I end the paper with remarks on earlier approaches. II. BINARY PARAMETRIZATION
Take a ( n +2)-dimensional Euclidean space with the basis { b , b , . . . , b n , b n +1 } . Geometricproducts of different basis vectors are called blades . One-blades (i.e. basis vectors) satisfythe Clifford algebra b k b l + b l b k = 2 δ kl . There are 2 n +2 different blades. The basis vectors b and b n +1 play in our formalism aprivileged role. Real blades are those that do not involve b ; the ones including b aretermed imaginary . We shall see below that this terminology is consistent with a complexstructure needed for implementation of the one-bit elementary quantum-like gates.We shall often need in the formulas the blade b n +1 so let us shorten the notation by b n +1 = b . The blades that do not involve b n +1 will be termed the combs , and are parametrizedby n -bit strings according to the following convention [1]: b = c ... ,..., b n = c ... ,2 b = c ... ,..., b b n = c ... , b b = c ... , ..., b b . . . b n = c ... , b b b . . . b n = c ... .The combs beginning with “0;” or “1;”, are real and imaginary, respectively. We supplementthe combs by the (real) 0-blade 1 = c ... . The zeroth bit “ A ;”, separated by the semicolonfrom all the other bits A . . . A n , is not needed for coding binary numbers but only forthe complex structure. Therefore, one can skip it if one explicitly works with the complexstructure map i introduced below.The operation of reverse is denoted by ∗ and is defined on blades by ( b j . . . b j k ) ∗ = b j k . . . b j . Now let a = b b , a k = b k b , 1 ≤ k ≤ n . Then a ∗ k c A ; A ...A k ...A n a k = ( − A k c A ; A ...A k ...A n b k c A ; A ...A k ...A n = ( − P k − j =0 A j c A ; A ...A ′ k ...A n , where the prime denotes negation of a bit, i.e. 0 ′ = 1, 1 ′ = 0. Negation of a k -th bit can beexpressed in algebraic termsn k c A ; A ...A k ...A n = b k a ∗ k − . . . a ∗ a ∗ c A ; A ...A k ...A n aa . . . a k − = c A ; A ...A ′ k ...A n . The complex structure is defined by ic A ; A ...A n = ( − A ′ c A ′ ; A ...A n . This definition implies the usual formulas i c A ; A ...A n = − c A ; A ...A n ,e iφ c A ; A ...A n = (cos φ + i sin φ ) c A ; A ...A n .i and n k commute if 0 < k .One has now two options: Either work with explictly real coefficients but having thenumber of combs doubled (by the presence of the zeroth bit), or allow for “complex” coeffi-cients explicitly involving the linear map i , and then the zeroth bit can be skipped. I preferthe second option, where the combs are parametrized by n indices c A ...A n , since it makes theformulas compact and quantum-looking, and all the shown bits are used for coding binarynumbers. Still, for geometric purposes it is important to bear in mind that the Cliffordalgebra is real. 3 II. ELEMENTARY GATES
A one-bit gate, 1 ≤ k ≤ n , is G k = 12 ( α + β n k )(1 + ( − A k ) + 12 ( δ + γ n k )(1 − ( − A k )where α = α + α i , β = β + β i , γ = γ + γ i , δ = δ + δ i ; the numbers α , . . . , δ arereal. The link to quantum computation is that the matrix of coefficients α βγ δ shouldbe taken in a form corresponding to an appropriate quantum gate.Let us check the concrete gates. The three Pauli gates are X k c A ...A k ...A n = n k c A ...A k ...A n ,Y k c A ...A k ...A n = − i n k a ∗ k c A ...A k ...A n a k ,Z k c A ...A k ...A n = a ∗ k c A ...A k ...A n a k . One verifies on components the usual properties X k c A ... k ...A n = c A ... k ...A n ,X k c A ... k ...A n = c A ... k ...A n ,Y k c A ... k ...A n = − ic A ... k ...A n ,Y k c A ... k ...A n = ic A ... k ...A n ,Z k c A ... k ...A n = c A ... k ...A n ,Z k c A ... k ...A n = − c A ... k ...A n . The Hadamard gate: H k c A ...A k ...A n = 1 √ k c A ...A k ...A n + 1 √ a ∗ k c A ...A k ...A n a k = 1 √ (cid:0) X k + Z k (cid:1) c A ...A k ...A n . The phase and π/ S k c A ...A k ...A n = 12 (1 + i ) c A ...A k ...A n + 12 (1 − i ) a ∗ k c A ...A k ...A n a k T k c A ...A k ...A n = 12 (1 + e iπ/ ) c A ...A k ...A n + 12 (1 − e iπ/ ) a ∗ k c A ...A k ...A n a k S k c A ... k ...A n = c A ... k ...A n S k c A ... k ...A n = ic A ... k ...A n T k c A ... k ...A n = c A ... k ...A n T k c A ... k ...A n = e iπ/ c A ... k ...A n . A general controlled two-bit gate is G kl = G ′ k
12 (1 + ( − A l ) + G ′′ k
12 (1 − ( − A l ) , where G ′ k and G ′′ k are one-bit gates. Control- not ( cnot ) readscn kl = 12 (1 + ( − A l ) + X k
12 (1 − ( − A l ) . This can be generalized to arbitrary numbers of controlling bits. An example is given bythe three-bit control- cnot (Toffoli) gatecn klm = 12 (1 + ( − A m ) + cn kl
12 (1 − ( − A m ) . IV. GEOMETRIC MEANING OF THE GATES
The gates such as H k or cn kl and cn klm consist of pairs of operations, a fact suggesting thatcomposition of N gates will require 2 N operations. The problem is, however, more subtle.In order to see the subtlety we have to get used to thinking of all the geometric-algebraoperations in geometric terms. A. Two bits, gates X and X For two bits the geometric background is provided by a plane spanned by some orthonor-mal basis { e , e } . The blades are: 1 = ◦ (a “charged” point), e = → , e = ↑ (oriented linesegments), e = (cid:3) (an oriented plane segment). The action of the gates is: X c A A = c A ′ A , X c A A = c A A ′ . We can forget about the zeroth bit (leading to a third dimension) and5isualize as follows X ◦→↑ (cid:3) = ◦→↑ (cid:3) . One recognizes in the matrix the tensor product ⊗ σ . X ◦→↑ (cid:3) = ◦→↑ (cid:3) . Now the matrix is σ ⊗ . Similar representation is found if one takes a multivector V = V + V e + V e + V e = ( V , V , V , V ). Then X V = ( V , V , V , V ) ,X V = ( V , V , V , V ) . Let us recall that multivectors are, from a geometrical standpoint, sets containing differentshapes, so they have a clear geometric interpretation [1]. Simultaneously, in the context ofcomputation, they play a role of entangled states.
B. Two bits, gates Z and Z Z c A A = ( − A c A A , Z c A A = ( − A c A A , Z ◦→↑ (cid:3) = − − ◦→↑ (cid:3) ,Z ◦→↑ (cid:3) = − − ◦→↑ (cid:3) . . Two bits, gates H and H Since H k = ( X k + Z k ) / √ H ◦→↑ (cid:3) = 1 √ − − ◦→↑ (cid:3) ,H ◦↑→ (cid:3) = 1 √ − − ◦↑→ (cid:3) . Note that H is represented with permuted → and ↑ .Let us stress again that although formaly one can identify certain tensor products in theabove matrices, the space of states does not involve abstract tensoring of qubits, but onlygeometric operations in Euclidean spaces. D. Two bits, gates cn and cn Here cn c A = c A , cn c A = c A ′ , cn c A = c A , cn c A = c A ′ .cn ◦→↑ (cid:3) = ◦→↑ (cid:3) cn ◦↑→ (cid:3) = ◦↑→ (cid:3) . . Three bits, gates cn , cn , and cn Here the only nontrivial actions are cn c A = c A ′ , cn c A = c A ′ , cn c A = c A ′ . The Euclidean space is 3-dimensional. The blades involve a point 1, three edges b , b , b , three walls b , b , b , and the cube b .cn c = cn b = c = b , cn c = cn b = c = b , cn c = cn b = c = b , cn c = cn e = c = b , cn c = cn b = c = b , cn c = cn b = c = b . Geometrically in 3D the Toffoli gate means squashing a cube into a square (one of its walls),or the other way around — reconstructing a cube from a wall. Composition of two differentToffoli gates exchanges walls of the cube, eg. cn cn b = cn b = b . V. EXAMPLE
As an example we take the simple but impressive application of “quantum parallelism”,where applying n Hadamard gates (i.e. performing n algorithmic steps) one generates asuperposition of 2 n n -bit numbers. In quantum computation the operation looks as follows H ⊗ n | . . . n i = 1 √ n (cid:16) | i + | i (cid:17) . . . (cid:16) | n i + | n i (cid:17) = 1 √ n X A ...A n | A . . . A n i . Quantum speedup comes from the fact that most of the operations have not to be performedby the computer itself but are taken care of by properties of the tensor product.So let us take a look at an analogous calculation performed in the geometric-algebra8ramework: H n c ... n = 1 √ (cid:16) n n c ... n + a ∗ n c ... n a n (cid:17) = 1 √ (cid:16) c ... n + c ... n (cid:17) = 1 + b n √ ,H n − H n c ... n = n n − (1 + b n ) + a ∗ n − (1 + b n ) a n − √ = b n − (1 + b n ) + 1 + b n √ = (1 + b n − )(1 + b n ) √ . Let us note that the multivector 1 + b n is treated by n n − as a whole. From a Clifford-algebra point of view this is simply a single multivector. It makes no sense to treat 1 + b n as a combination of just two blades, since a change of basis will map it into a combinationof another number of blades. There exists a single geometric object represented by 1 + b n .This general observation applies to all the universal gates introduced above, and shows howto geometrically interpret the number of steps of an algorithm.Repeating the above procedure n times we obtain H . . . H n c ... n = (1 + b ) . . . (1 + b n ) √ n (1)= 1 √ n X A ...A n c A ...A n . (2)Eq. (1) shows that the n -fold Hadamard gate involves n − n − n binary numbers.It is therefore clear that the geometric-product performs the same type of “compression”as the tensor product. Multivectors of the form (2) can be acted upon with further gates,and in each single step one processes the entire set of 2 n numbers. VI. REMARKS ON EARLIER APPROACHES
Links between qubits, spinors, entangled states, and geometric algebra were, of course,noticed a long time ago, much earlier than in [1]. One should mention, first of all, thepioneering works of Hestenes [7] on relations between geometric algebra and relativity, andspinors in particular. In the context of quantum information theory the most importantearlier papers are those by Havel, Doran, and their collaborators, cf. [8, 9, 10, 11, 12, 13].9owever, it seems that the very way of coding, that is, linking bits with multivectors,was in those works much less straightforward than the convention I work with in the presentpaper, and which was introduced in [1]. In my opinion the “old” approach can be reducedto replacing two-component complex vectors by 2 × X k , say, but this is irrelevant for the construction) andeven the “ i ” I use is different. So the approach I advocate is clearly an alterantive to theearlier works that, at least in my opinion, have a status of a standard theory reformulatedin a different language. Acknowledgments
I am indebted to Krzysztof Giaro, Marcin Paw lowski, Tomasz Magulski and LukaszOr lowski for discussions. [1] Aerts D and Czachor M 2007
J. Phys. A: Math. Theor. F259; 2006
Preprint quant-ph/0610187; 2006
Preprint quant-ph/0611279[2] Deutsch D and Jozsa R 1992
Proc. Roy. Soc. A
Preprint arXiv:0705.4289 [quant-ph][4] Simon D R 1997
SIAM J. Comput. Preprint quant-ph/0611051
6] Nielsen M A and Chuang I L 2000
Quantum Computation and Quantum Information (Cam-bridge: Cambridge University Press)[7] Hestenes D 1966
Space-Time Algebra (New York: Gordon & Breach)[8] Havel T F and Doran C J L 2001
Preprint quant-ph/0106063[9] Somaroo S S , Cory D G and Havel T F 1998
Phys Lett A
Preprint quant-ph/0106055[11] Doran C J L, Lasenby A N, Gull S F, Somaroo S and Challinor A D (1996)
Adv. Imaging.Electron Phys. Proc Roy. Soc. (London) — to appear.[13] Sharf Y, Cory D G, Somaroo S S, Havel T F, Knill E, Laflamme R 2000
Mol. Phys.1347