Adv Appl Clifford Algebras 5 (05), 53 63 The Author(s) 04 This article is published with open access at Springerlinkcom 088-7009/00053- published online June 0, 04 DOI 0007/s00006-04-0466-0 Advances in Applied Clifford Algebras An Algorithm for Fast Multiplication of Pauli Numbers A Cariow and G Cariowa Abstract In this paper we introduce an efficient algorithm for the multiplication of Pauli numbers The direct multiplication of two Pauli numbers requires 64 real multiplications and 56 real additions More effective solutions still do not exist We show how to compute a product of the Pauli numbers with 4 conventional multiplications, 8 multiplications by / and 56 real additions Keywords Pauli numbers, multiplication of Pauli numbers, fast algorithm, matrix notation Introduction In resent years the Clifford algebras and hypernumbers [] play an important role in several fields of data processing including digital signal and image processing [, 3, 4], computer graphics and machine vision [5, 6, 7], telecommunications [8, 9] and in public key cryptography [0] Previous studies indicate that the most popular hypernumbers are quaternions, biquaternions, octonions, and sedenions Perhaps the less popular are the Pauli numbers [] This numbers are mostly used in solving various physical problems in field theory, electrodynamics, etc Among other arithmetical operations in Clifford algebras, multiplication is the most time consuming one The reason for this is, because the addition of N-dimensional Clifford numbers requires only N real additions, as the multiplication of these numbers already requires N(N ) real additions and N real multiplication It is easy to see that the increasing of dimensions of Clifford number increases the computational complexity of the multiplication Therefore, reducing the computational complexity of the multiplication of Clifford numbers is an important scientific and engineering problem Efficient algorithms for the multiplication of quaternions, octonions and sedenions already exist [, 3, 4, 5] No such *Corresponding author
54 A Cariow and G Cariowa Adv Appl Clifford Algebras algorithms for the multiplication of the Pauli numbers have been proposed In this paper, an efficient algorithm for this purpose is suggested Formulation of the Problem A Pauli number is defined as follows: ϕ = a 0 + a i + a i + a 3 i 3 + a 4 i + a 5 i 3 + a 6 i 3 + a 7 i 3 {a i }, i =0,,,7 are real numbers, i, i, i 3 are the main imaginary units and i = i i, i 3 = i i 3, i 3 = i i 3, i 3 = i i i 3 are the remaining imaginary units whose products are defined by the following equations: i = i = i 3 =,i i = i i,i 3 i = i i 3,i 3 i = i i 3 The results of all possible products of the Pauli numbers imaginary units can be summarized in the table () Table The results of all possible products of the Pauli numbers imaginary units i i i 3 i i 3 i 3 i 3 i i i 3 i i 3 i 3 i 3 i i i 3 i i 3 i 3 i 3 i 3 i 3 i 3 i 3 i i i i i i i 3 i 3 i 3 i 3 i 3 i 3 i 3 i i 3 i i i 3 i 3 i 3 i i 3 i i i 3 i 3 i 3 i i 3 i i Suppose we want to compute the product of two Pauli numbers ϕ 3 = ϕ ϕ, ϕ = x 0 + x i + x i + x 3 i 3 + x 4 i + x 5 i 3 + x 6 i 3 + x 7 i 3, ϕ = p 0 + p i + p i + p 3 i 3 + p 4 i + p 5 i 3 + p 6 i 3 + p 7 i 3, ϕ 3 = y 0 + y i + y i + y 3 i 3 + y 4 i + y 5 i 3 + y 6 i 3 + y 7 i 3 Then we have: ϕ 3 =(x 0 p 0 + x p + x p + x 3 p 3 x 4 p 4 x 5 p 5 x 6 p 6 x 7 p 7 ) +(x 0 p + x p 0 x p 4 x 3 p 5 + x 4 p + x 5 p 3 x 6 p 7 x 7 p 6 ) i +(x 0 p + x p 4 + x p 0 x 3 p 6 x 4 p + x 5 p 7 + x 6 p 3 + x 7 p 5 ) j +(x 0 p 3 + x p 5 + x p 6 + x 3 p 0 x 4 p 7 x 5 p x 6 p x 7 p 4 ) k +(x 0 p 4 + x p x p + x 3 p 7 + x 4 p 0 x 5 p 6 + x 6 p 5 + x 7 p 3 ) ij +(x 0 p 5 + x p 3 x p 7 x 3 p + x 4 p 6 + x 5 p 0 x 6 p 4 x 7 p ) ik +(x 0 p 6 + x p 7 + x p 3 x 3 p x 4 p 5 + x 5 p 4 + x 6 p 0 + x 7 p ) jk +(x 0 p 7 + x p 6 x p 5 + x 3 p 4 + x 4 p 3 x 5 p + x 6 p + x 7 p 0 ) ijk
Vol 5 (05) An Algorithm for Fast Multiplication of Pauli Numbers 55 We can write x 0 p 0 + x p + x p + x 3 p 3 x 4 p 4 x 5 p 5 x 6 p 6 x 7 p 7 = y 0, x 0 p + x p 0 x p 4 x 3 p 5 + x 4 p + x 5 p 3 x 6 p 7 x 7 p 6 = y, x 0 p + x p 4 + x p 0 x 3 p 6 x 4 p + x 5 p 7 + x 6 p 3 + x 7 p 5 = y, x 0 p 3 + x p 5 + x p 6 + x 3 p 0 x 4 p 7 x 5 p x 6 p x 7 p 4 = y 3, x 0 p 4 + x p x p + x 3 p 7 + x 4 p 0 x 5 p 6 + x 6 p 5 + x 7 p 3 = y 4, x 0 p 5 + x p 3 x p 7 x 3 p + x 4 p 6 + x 5 p 0 x 6 p 4 x 7 p = y 5, x 0 p 6 + x p 7 + x p 3 x 3 p x 4 p 5 + x 5 p 4 + x 6 p 0 + x 7 p = y 6, x 0 p 7 + x p 6 x p 5 + x 3 p 4 + x 4 p 3 x 5 p + x 6 p + x 7 p 0 = y 7 Using the matrix notation, we can rewrite the above relations as follows: Y 8 = P 8 X 8, () X 8 =[x 0,x,x,x 3,x 4,x 5,x 6,x 7 ] T, Y 8 =[y 0,y,y,y 3,y 4,y 5,y 6,y 7 ] T, P 8 = p 0 p p p 3 p 4 p 5 p 6 p 7 p p 0 p 4 p 5 p p 3 p 7 p 6 p p 4 p 0 p 6 p p 7 p 3 p 5 p 3 p 5 p 6 p 0 p 7 p p p 4 p 4 p p p 7 p 0 p 6 p 5 p 3 p 5 p 3 p 7 p p 6 p 0 p 4 p p 6 p 7 p 3 p p 5 p 4 p 0 p p 7 p 6 p 5 p 4 p 3 p p p 0 The direct multiplication of two Pauli requires 64 real multiplications and 56 real additions We shall present the algorithm, which reduce arithmetical complexity to 4 conventional multiplications, 8 multiplications by / and 56 real additions 3 The Algorithm At first, we rearrange the rows of the matrix P 8 in the following order {8, 5, 6,, 7, 3, 4, } Next, we rearrange the columns of obtained matrix in the same manner As a result, we obtain the following matrix: P 8 = Then we can write p 0 p 3 p p 6 p p 5 p 4 p 7 p 3 p 0 p 6 p p 5 p p 7 p 4 p p 6 p 0 p 3 p 4 p 7 p p 5 p 6 p p 3 p 0 p 7 p 4 p 5 p p p 5 p 4 p 7 p 0 p 3 p p 6 p 5 p p 7 p 4 p 3 p 0 p 6 p p 4 p 7 p p 5 p p 6 p 0 p 3 p 7 p 4 p 5 p p 6 p p 3 p 0 [ P A4 B 8 = Γ 8 P 8 Γ 8 = 4 B 4 A 4 ],
56 A Cariow and G Cariowa Adv Appl Clifford Algebras A 4 = Γ 8 = p 0 p 3 p p 6 p 3 p 0 p 6 p p p 6 p 0 p 3 p 6 p p 3 p 0, B 4 =, p p 5 p 4 p 7 p 5 p p 7 p 4 p 4 p 7 p p 5 p 7 p 4 p 5 p It is easily seen [5] that the matrix with this structure can be factorized, than the computational procedure for multiplication of the Pauli numbers can be represented as follows: W (0) 8 =(H I 4 )= Y 8 = Γ 8 W (0) 8 D(0) 8 W(0) 8 Γ 8X 8 (3) D (0) 8 = (A 4 + B 4 ) (A 4 B 4 ), H = is the order Hadamard matrix, I N is the order N identity matrix, and, denote the Kronecker product and direct sum of two matrices respectively [6] Indeed, it is easy to see that matrix (A 4 + B 4 ) has the following structure: p 0 + p p 3 p 5 p + p 4 p 6 + p 7 A 4 + B 4 = p 3 + p 5 p 0 p p 6 + p 7 p + p 4 p p 4 p 6 p 7 p 0 p p 3 p 5 p 6 p 7 p p 4 p 3 p 5 p 0 + p Let us permute third and fourth column, first and third column, second and fours column of this matrix As a result, the columns of the matrix are arranged in the following order: {4, 3,, } Then permute third and fourth,
Vol 5 (05) An Algorithm for Fast Multiplication of Pauli Numbers 57 row As a result, we obtain the following matrix: Γ () 4 (A 4 + B 4 ) Γ (0) 4 = p 6 + p 7 p + p 4 p 0 + p p 3 p 5 p + p 4 p 6 + p 7 p 3 + p 5 p 0 p p 0 + p p 3 p 5 p 6 p 7 p p 4 p 3 p 5 p 0 p p p 4 p 6 p 7 The resulting matrix has the following structure: [ Γ () 4 (A 4 + B 4 ) Γ (0) A B 4 = B A ], Γ () 4 = [ p6 + p A = 7 p + p 4 p + p 4 p 6 + p 7, Γ(0) 4 =, ] [ p0 + p, B = p 3 p 5 p 3 + p 5 p 0 p As shown in [5], the matrix having such a structure can be factorized as follows: Γ () 4 (A 4 + B 4 ) Γ (0) 4 = Γ () 4 T 4 6D (0) 6 T 6 4Γ (0) 4 (3) D (0) 6 = A B diag (A + B ), B T 4 6 = [ 0 0 T 6 4 = 0 0 Now consider the matrix A 4 B 4 A 4 B 4 = ] I = I = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, p 0 p p 3 + p 5 p p 4 p 6 p 7 p 3 p 5 p 0 + p p 6 p 7 p p 4 p + p 4 p 6 + p 7 p 0 + p p 3 p 5 p 6 + p 7 p + p 4 p 3 + p 5 p 0 p ]
58 A Cariow and G Cariowa Adv Appl Clifford Algebras Perform a permutation of rows and columns of this matrix in the same manner as in the matrix (A 4 + B 4 ) Then the resulting matrix assumes the form p 6 p 7 p p 4 p 0 p p 3 + p 5 Γ () 4 (A 4 B 4 ) Γ (0) 4 = p p 4 p 6 p 7 p 3 p 5 p 0 + p p 0 p p 3 + p 5 p 6 + p 7 p + p 4 p 3 p 5 p 0 + p p + p 4 p 6 + p 7 à B =, B à p6 p à = 7 p p 4 p0 p, B = p 3 + p 5 p p 4 p 6 p 7 p 3 p 5 p 0 + p This matrix can be factorized in the same way as the previous matrix: Γ () 4 (A 4 B 4 ) Γ (0) 4 = Γ () 4 T 4 6D () 6 T 6 4Γ (0) 4 (33) D () 6 = à B diag (à + B ) B Substituting (3) and (33) in (3) we can write: Y 8 = Γ 8 W (0) 8 Γ() 8 A 8 D A 8 Γ (0) 8 W(0) 8 Γ 8X 8 (34) A 8 = I T 4 6, A 8 = I T 6 4, Γ (0) 8 = I Γ (0) 4, Γ () 8 = I Γ () 4, D = D (0) 6 D () 6 Let us now consider the structure of the remaining submatrices and their factorization p6 + p A B = 7 p 0 p p + p 4 p 3 + p 5 p + p 4 p 3 p 5 p 6 + p 7 p 0 + p =( I ) D (0) 4 (I ), D (0) 4 = diag (s 0,s,s,s 3 ), p6 + p (A + B )= 7 + p 0 + p p + p 4 + p 3 p 5 p + p 4 + p 3 + p 5 p 6 + p 7 + p 0 p =( I ) D () 4 (I ), D () 4 = diag (s 4,s 5,s 6,s 7 ), p0 + p B = p 3 p 5 =( p 3 + p 5 p 0 p I ) D () 4 (I ), D () 4 = diag (s 8,s 9,s 0,s ), à B p6 p = 7 p 0 + p p p 4 p 3 p 5 p p 4 p 3 + p 5 p 6 p 7 p 0 p =( I ) D (3) 4 (I ),
Vol 5 (05) An Algorithm for Fast Multiplication of Pauli Numbers 59 D (3) 4 = diag (s,s 3,s 4,s 5 ), (Ã + B ) p6 p = 7 + p 0 p p p 4 + p 3 + p 5 p p 4 + p 3 p 5 p 6 p 7 + p 0 + p =( I ) D (4) 4 (I ), D (4) 4 = diag (s 6,s 7,s 8,s 9 ), p0 p B = p 3 + p 5 =( p 3 p 5 p 0 + p I ) D (5) 4 (I ), D (5) 4 = diag (s 0,s,s,s 3 ), s 0 = (p 6 + p 7 p 0 p ),s = (p + p 4 p 3 p 5 ), s = ( p + p 4 p 3 + p 5 ),s 3 = ( p 6 + p 7 p 0 + p ), s 4 = (p 6 + p 7 + p 0 + p ),s 5 = (p + p 4 + p 3 + p 5 ), s 6 = (p p 4 p 3 + p 5 ),s 7 = (p 6 p 7 p 0 + p ), s 8 = (p 0 + p ),s 9 = (p 3 + p 5 ),s 0 = (p 3 p 5 ),s = (p 0 p ), s = (p 6 p 7 p 0 + p ),s 3 = (p p 4 p 3 + p 5 ), s 4 = ( p p 4 p 3 p 5 ),s 5 = ( p 6 p 7 p 0 p ), s 6 = ( p 6 + p 7 p 0 + p ),s 7 = ( p + p 4 p 3 + p 5 ), s 8 = (p + p 4 p 3 p 5 ),s 9 = (p 6 + p 7 p 0 p ), s 0 = (p 0 p ),s = (p 3 p 5 ),s = (p 3 + p 5 ),s 3 = (p 0 + p ), and N M is an integer matrix consisting of all s Combining partial decompositions in a single computational procedure we finally can write following: Y 8 = Γ 8 W (0) 8 Γ() 8 A 8 A 4 D 4 A 4 A 8 Γ (0) 8 W(0) 8 Γ 8X 8 (35) A 4 = I 6 ( I ), A 4 = I 6 (I ), D 4 = 5 D (l) 4 = diag (s 0,s,,s 3 ) l=0 It can be seen, that s 0 = s 9,s = s 8,s = s 7,s 3 = s 6,s 4 = s 5,s 5 = s 4,s 6 = s 3, s 7 = s,s 8 = s 3,s 9 = s,s 0 = s,s = s 0 Then it is easy to see that elements {s k }, k =0,,, can be calculated using the following vector-matrix procedure: S = Ã 8D 8 [H (H I ) H ] P 8 (36)
60 A Cariow and G Cariowa Adv Appl Clifford Algebras P 8 =[p 0,p,p,p 3,p 4,p 5,p 6,p 7 ] T, S =[s 0,s,s,s 3,s 4,s 5,s 6,s 7,s 8,s 9,s 0,s ] T, D 8 = I 8, Ã 8 = s 0 s s s 3 s 4 s 5 s 6 s 7 x 0 s 8 y 0 x s 9 y x s 0 y x 3 s y 3 x 4 s y 4 x 5 H s 3 H y 5 x 6 s 4 y 6 x 7 s 5 y 7 s 6 s 7 s 8 s 9 s 0 s s s 3 Figure Data flow diagram for rationalized Pauli numbers multiplication algorithm
Vol 5 (05) An Algorithm for Fast Multiplication of Pauli Numbers 6 Fig shows a data flow diagram, which describes the fast algorithm for computation of the Pauli number product and Fig shows a data flow diagram of the process for calculating the vector S elements In this paper, data flow diagrams are oriented from left to right Straight lines in the figures denote the operations of data transfer Points lines converge denote summation (The dash-dotted lines indicate the subtraction operation) We deliberately use the usual lines without arrows on purpose, so as not to clutter the picture The circles in these figures show the operation of multiplication by a variable (or constant) inscribed inside a circle In turn, the rectangles indicate the matrixvector multiplications with the ( )- Hadamard matrices As follows from Fig, calculation of elements of diagonal matrix D 8 requires performing only trivial multiplications by the power of two Such operations may be implemented using common arithmetic shift operations, which have simple realization and hence may be neglected during computational complexity estimation [5] s 0 s p 0 p p H s s 3 s 4 p 3 s 5 p 4 H s 6 p 5 p 6 p 7 H s 7 s 8 s 9 s 0 s Figure The data flow diagram describing the process of calculating elements of the vector S and in accordance with the procedure (36) 4 Conclusions In this paper, we have presented an original algorithm allowing to multiply two Pauli numbers with reduced multiplicative complexity As a result of streamlining the number of multiplications required to calculate the Pauli numbers product is reduced from 64 real multiplication to 4 conventional real multiplications and 8 multiplications by / Furthermore, the total number of arithmetic operations decreased by 3 compared with the naive method of calculations
6 A Cariow and G Cariowa Adv Appl Clifford Algebras References [] R Ab lamowicz (ed), Clifford Algebras Applications to Mathematics, Physics, and Engineering PIM 34, Birkhauser, Basel 004 [] V Labunets, Clifford algebras as unified language for image processing and pattern recognition Computational Noncommutative Algebra and Applications, NATO Science Series II: Mathematics, Physics and Chemistry, volume 36 (004), 97-5 [3] J Mennesson, Ch Saint-Jean, L Mascarilla, A phase correlation for color images using Clifford algebra Applied Geometric Algebras in Computer Science and Engineering 9 (00), -4 [4] T Batard, M Berthier, and C Saint-Jean Clifford Fourier transform for color image processing In E Bayro-Corrochano and G Scheuermann Eds, editors, Geometric Algebra Computing in Engineering and Computer Science chapter 8, Springer Verlag 00, pages 35-6 [5] D Hildenbrand, D Fontijne, C Perwass and L Dorst, Geometric Algebra and its Application to Computer Graphics Tutorial 3, in Proc of 5th Annual Conference of the European Association for Computer Graphics, Interacting with Virtual Worlds, Grenoble, France, INRIA and Eurographics Association, ISSN 07-4656 [6] J Ebling and G Scheuermann Clifford Fourier transform on vector fields IEEE Transactions on Visualization and Computer Graphics (005), 469-479 [7] R Wareham, J Cameron, and J Lasenby, Applications of Conformal Geometric Algebra in Computer Vision and Graphics HLi,PJOlverandG Sommer (Eds), IWMM 004, LNCS 359, (005) 39-349 [8] S Karmakar, B S Rajan, Multigroup Decodable STBCs From Clifford Algebras IEEE Transactions on Information Theory, vol 55 No (009), 3-3 [9] MYe Ilchenko, TN Narytnik, & RM Didkovsky, Clifford algebra in multipleaccess noise-signal communication systems Telecommunications and Radio Engineering, 7 (8) (03), 65-663 [0] E Malekian, A Zakerolhosseini and A Mashatan, QTRU: QuaternionicVersion of the NTRUPublic-Key Cryptosystems The ISC Int l Journal of Information Security, vol 3, No (0), 9-4 [] V V Silvestrov, Number Systems Soros Educational Journal No 8 (998), -7 [] O M Makarov, An algorithm for the multiplication of two quaternions Zh Vychisl Mat Mat Fiz 7 6 (977), 574-575 [3] A Cariow, G Cariowa, Algorithm for multiplying two octonions Radioelectronics and Communications Systems (Allerton Press, Inc USA), vol 55, Issue 0 (0), 464-473 [4] A Cariow, G Cariowa, An algorithm for fast multiplication of sedenions Information Processing Letters 3 (03), 34-33 [5] A Ţariov Algorithmic aspects of computing rationalization in digital signal processing (in Polish), West Pomeranian University Press, 3, (0)
Vol 5 (05) An Algorithm for Fast Multiplication of Pauli Numbers 63 [6] W H Steeb, Y Hardy, Matrix Calculus and Kronecker Product: A Practical Approach to Linear and Multilinear Algebra World Scientific Publishing Company; edition, 34 pages (March 4, 0) A Cariow and G Cariowa West Pomeranian University of Technology, Szczecin Faculty of Computer Science and Information Technology Żo lnierska 49, 7-0 Szczecin Poland e-mail: atariov@wizutedupl gtariova@wizutedupl Received: January 8, 04 Accepted: April 7, 04 Open Access This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and source are credited