Geometric-Algebra Quantum-Like Algorithms: Simon's Algorithm
aa r X i v : . [ qu a n t - ph ] M a y Geometric-Algebra Quantum-Like Algorithms: Simon’s Algorithm
Tomasz Magulski ∗ , Lukasz Or lowski † Department of Theoretical Physics and Quantum InformaticsGda´nsk University of Technology, 80-952 Gda´nsk, Poland
Abstract
This is continuation of the approach to performing quantum algorithms using geometric structureswhich was presented by D. Aerts and M. Czachor in [1]. We solve the Simon’s problem which, next tothe Shor’s alghorithm, is a representative of quantum hidden subgroup class. We also highlight someadvantages resulting from the fact that no quantum mechanics is involved.
Consider a function f : { , } n → { , } m , where m ≥ n − f is 1-to-1, or there exists s such that ∃ s ∈{ , } n \{ ( n ) } ∀ x = y f ( x ) = f ( y ) ⇐⇒ x = y ⊕ s, (2)where ⊕ denotes componentwise addition mod 2, i.e. n-dimensional XOR.The problem is to determine which of these conditions is satisfied by f , and, in second case, to find s . Let us use two quantum registers, which consist of n and m qbits respectively. We start with n + m | φ i = | . . . | {z } n i| . . . | {z } m i (3)Quantum algorithm solves the problem using 3 quantum gates. At first the Hadamard gate acts on the firstregister. Note that using n-dimensional qubit space we have tensor power of n Hadamard gates. | φ i = ( H n | ( n ) i ) | ( m ) i = 1 √ n n − X k =0 | k i ! | ( m ) i (4)Second gate’s action depends on function f . The gate fills the second register with function f values, usingfirst register as a set of arguments. | φ i = U f | φ i = 1 √ n n − X k =0 | k, f ( k ) i (5) ∗ email: [email protected] † email: [email protected] | φ i = 1 √ n n − X k =0 ( H n | k i ) | f ( k ) i ! = 12 n n − X i,k =0 ( − σ ( i,k ) | i, f ( k ) i (6)where σ is a dot product of binary representations of i and k over { , } n space, i.e. σ ( i, j ) = n X k =1 i (2) k j (2) k (7)Now we measure the first register.Remember that if f has the mask s then f ( x ) = f ( x ⊕ s ), which means that our amplitude is a superpositionof two amplitudes generated from | k, f ( k ) i and | k ⊕ s, f ( k ) i in | φ i . α i,f ( k ) = 12 n (cid:16) ( − σ ( i,k ) + ( − σ ( i,k ⊕ s ) (cid:17) (8)Employing σ ( i, k ⊕ s ) = σ ( i, k ) + σ ( i, s ) (mod 2) (9)then α i,f ( k ) = 12 n ( − σ ( i,k ) (cid:16) − σ ( i,s ) (cid:17) (10)Now if σ ( i, s ) = 1 (mod 2) then both the amplitude and probability of getting such a state is 0. This impliesthat every result of measurement satisfies i s + i s + · · · + i n − s n − = 0 (mod 2) (11)So in order to determine whether the mask s exists the procedure has to be repeated until n − i are found.Then the following system of equations has to be solved i (1)0 s ∗ + i (1)1 s ∗ + · · · + i (1) n − s ∗ n − = 0 (mod 2) i (2)0 s ∗ + i (2)1 s ∗ + · · · + i (2) n − s ∗ n − = 0 (mod 2)... ... ... i ( n − s ∗ + i ( n − s ∗ + · · · + i ( n − n − s ∗ n − = 0 (mod 2) (12)There are two possible solutions of this system - 0 ( n ) and s ∗ .Now recalling the definition we know that f is 1-to-1 or, there exists s which satisfies (2). In the secondcase the non-trivial solution of (12) is the mask we are looking for. In the first one it is easy to show that s ∗ is just a random sequence. The easiest way to determine which of these conditions are satisfied by f is tocheck if f ( x ) = f ( x ⊕ s ∗ ) where x ∈ { , } n .Originally Simon’s problem was defined and solved in [2].2 GA formulation
GA formulation of the problem is based on the binary parametrization [3]. Consider( n + m )-dimensional space with orthonormal basis { e . . . e n + m } and its associated GA. Initial state is ana-logical to | φ i : e . . . | {z } n + m (13)Let us use a multivector E n = X A ,A ,...,A n =0 e A A ...A n . . . | {z } m (14)then E n e . . . | {z } n + m = X A ,A ,...,A n =0 e A A ...A n . . . | {z } m (15)This step is equivalent to the first Hadamard gate in quantum algorithm. U f is an operation which performsas follows U f E n e . . . | {z } n + m = X A ,A ,...,A n =0 e A A ...A n f ( A A ...A n ) ...f m ( A A ...A n ) (16)Note that f i ( A A . . . A n ) is the i -th function f value.Let us consider the reverse of E n F n = X B ,B ,...,B n =0 e † B B ...B n . . . | {z } m (17)Employing [3] e X X ...X n e Y Y ...Y n = ( − P i
Let us use the matrix algebra known as Cartan’s representation of 1-blade in GA [6]: e k − = σ ⊗ · · · ⊗ σ | {z } n − k ⊗ σ ⊗ ⊗ · · · ⊗ | {z } k − (52) e k = σ ⊗ · · · ⊗ σ | {z } n − k ⊗ σ ⊗ ⊗ · · · ⊗ | {z } k − (53)and obviously the scalar representation is e = ⊗ · · · ⊗ | {z } n (54)where σ , σ , σ are the Pauli matrices and denotes 2 × σ = Tr σ = Tr σ = 0 (55)and Tr n O i =1 A i ! = n Y i =1 Tr A i (56)Tr n X i =1 A i ! = n X i =1 Tr A i (57)Therefore for the scalar Tr e = (Tr ) n = 2 n (58)and for 1-blades Tr e k − = (Tr σ ) n − k Tr σ (Tr ) k − = 0 (59)Tr e k = (Tr σ ) n − k Tr σ (Tr ) k − = 0 (60)It is easy to show that ( Tr ( e A ...A n e B ...B n ) = 0 if ∃ i A i = B i Tr ( e A ...A n ) = ( − P ni =1 Ai ( P ni =1 Ai − n (61)So having a multivector X = X A ,...,A n =0 X A ...A n e A ...A n (62)we can compute the coefficients by X A ...A n = ( − P ni =1 Ai ( P ni =1 Ai − n Tr ( e A ...A n X ) (63)8et us consider the problem for the 1-to-1 function from the previous section (Table 1).The initial state e has the following representation: e = (64)Note that E n = E n e = − i − i − i i −
10 0 1 − i − i − i i − − i − i − i i − − i − i − i i − − i − i i − − i − i − i i − − i − i − i i − − i − i − ii − − i (65)In general the second gate is not a multivector so it does not have Cartan’s representation and thereforeonly the result of U f E n e can be represented: − i − − i i − i
00 0 0 0 0 0 0 0 0 0 0 0 0 1 − i − − i
00 0 0 0 0 0 0 0 0 0 0 0 1 + i − i − i − − i i − i − i − − i i − i − i − − i i − i − i − − i i − i − i − − i i − i − i − − i i − i (66)Then F n = i − ii i −
10 0 1 i − i i i − i − i i i − i − i i i − − i i i − i − i i i − i − i i i − i − i ii − i (67)9nd its action on U f E n e − i − i − − i i − i − i − − i − − i − − i i − i − i i i − i − i − i − i i − − i − i − i − − i − − i i − − i − i − i i i − i − i − i − i − − i i − i − i − − i − − i − − i i − i − i i i − i − i − i − i i − − i − i − i − − i − − i i − − i − i − i i i − i − i − i − i − − i − − i − i − i − − i i i i − i − i − − i i − i − i − i − i − − i − − i − i − i i − − i i i − i − i i − − i − i − i − i − i − − i − − i − i − i − − i i i i − i − i − − i i − i − i − i − i − − i − − i − i − i i − − i i i − i − i i − − i − i − i (68)Now using (63) we can find the amplitudes (Table 4) A A A A e A A A A F n U f E n e ) 16 16 16 -16 16 -16 -16 -16 -16 16 -16 -16 -16 -16 16 -16amplitiude of e A A A A Table 4: Traces of matriceswhich give us the following multivector: F n U f E n e = e + e + e + e + e + e + e + e − e − e + e + e + e + e − e − e (69)Note that it is the same as (46).Let us consider the function with non-trivial mask s = (10): X f ( X ) 1 0 1 00 1 0 1Table 5: Function with mask s = (10)For some technical reason it is less dimensional function than (Table 2) from the previous section.Note that e , E n = E n e and F n are exactly the same as (64), (65) and (67) respectively. We have U f E n e = − − − − − − − −
10 0 0 0 0 1 − − − − − − − − − − − − − − − − − − − − − −
11 0 0 − − (70)10nd F n U f E n e = − i − i i − i − − i − i i − − i − i i − i − − i i − − i i − i −
20 0 0 0 − i − i i − i − − i − i i − − i − i i − i − − i i − − i i − i − i − i − − i − i i − − i − i − i i − − i − i i − i − i − i − − i i − i − − i − i i − − i − i − i i − − i − i i −
22 2 i − i − i − − i (71)Again using (63) we can find the amplitudes (Table 6) A A A A e A A A A F n U f E n e ) 0 32 32 0 0 -32 -32 0 0 32 -32 0 0 -32 32 0amplitiude of e A A A A Table 6: Traces of matriceswhich give us the following multivector: F n U f E n e = 2( e + e + e + e − e + e + e − e ) (72)Performing (39-42) as we did in Sec. 4 using the function (Table 2) we find the mask s = (10). We are deeply indebted to Marek Czachor for stimulating sugestions, help and encouragement.