A Theory for Valiants Matchcircuits (Extended Abstract)
The computational function of a matchgate is represented by its character matrix. In this article, we show that all nonsingular character matrices are closed under matrix inverse operation, so that for every $k$, the nonsingular character matrices of…
Authors: Angsheng Li, Mingji Xia
Symposium on Theoretical Aspects of Computer Science 2008 (Bordeaux), pp. 491-502 www .stacs-conf .org A THEOR Y F OR V ALIANT’S MA TCHCIRCUITS (EXTENDED ABSTRA CT) ANGSHENG LI 1 AND MINGJI XIA 1 1 State Key Laboratory of Co mpu ter Science, Institute of Soft war e, Chinese Academy o f Sciences, P .O. Box 8 717, Beijing 100080, China E-mail addr ess : angsheng@i os.ac.cn E-mail addr ess : xmjljx@gma il.com Abstra ct. The computational function of a matc h gate is represen ted b y its chara cter matrix. In this article, w e show that all nonsingular character matrices are closed u nder matrix inv erse op eration, so th at for every k , the nonsingular character matrices of k -bit matc h gates form a group, extending the recent w ork of Cai and Choudh ary [1] of th e same result for the case of k = 2, and th at the single and the tw o-bit matchgates are u niversa l for matchcircuits, answering a question of V alian t [4]. 1. In tro duction V alian t [4] in tro duced the noti on of matc hgate and mat chcircuit as a new mo del of computation to simulate qu an tum circuits, and su ccessfully realized a significant part of quan tum circuits by u sing this new mo del. V alian t’s new metho d organizes certain com- putations based on the graph theoretic notion of p erfect matc hin g an d the corresp ondin g algebraic ob ject of the Pfaffian. This lea v es an in teresting op en question of c haracterizing the exact p ow er of the matc hcircuits. T o solv e these p roblems, a significan t fi r st step w ould b e a b etter understandin g the structures of the matc hgates and the m atc hcircuits, to whic h the presen t pap er is dev oted. In [6], V aliant introd uced the notion of holo gr aphic algorithm , based on matc hgates and their prop erties, but with some additional ingredients of the c hoice of a set of linear b asis v ectors, through w h ic h the compu tation is exp ressed and in terpreted. Matc hgates and their c haracter matrices ha v e some n ice p rop erties, which ha ve already b een extensiv ely studied. In [1], Cai and Ch oudhary sho wed that a m atrix is the c haracter matrix of a matc hgate if and on ly if it satisfies all the us eful Grassmann-Pl ¨ uc ke r iden tities, and all nonsingular characte r matrices of tw o bits matc hgates form a group. 1998 ACM Subje ct Classific ation: F.1.1. Key wor ds and phr ases: Pfaffian,Ma tchgate, Matchcircuit. Both authors are supp orted by th e NSFC Gran t no. 6032520 6 and n o. 60310213. The second author is also sup p orted by MA THLOGAPS (MEST-CT-2004-504 029). c Angsheng Li and Mingji Xia CC Creative Commons Attribution- NoDerivs License 492 ANGSHENG LI AND M INGJI XIA In the presen t pap er, w e sh ow that for ev ery k , all the nonsingular characte r matrices of k -bit matc hgates form a grou p , extending the result of Cai and Choudhary of the same result for the case of k = 2. F urthermore, w e sho w that ev ery matc hcircuit based on k -bit matc hgates for k > 2 can b e realized b y a series of comp ositions of either single bit or t wo b its m atc hgates. This result answers a question raised b y V alian t in [4 ]. The r esult is an analog y of the quan tum circuits in the matc hcircuits [3]. W e organize the pap er as follo ws. In section 2, we outline necessary definitions and bac kground of th e topic. In section 3, w e state ou r results, and giv e some o verview of the pro ofs. In section 4, w e establish our first result that for eve ry k , all nonsingular k -bit c haracter matrices f orm a group. In section 5, we pro ve the second result that lev el 2 matc hgates are u niv ersal f or matc hcircuits. 2. Definitions 2.1. Graphs and Pfaffian Let G = ( V , E , W ) b e a weig hted und irected graph, where V = { 1 , 2 , . . . , n } is th e set of v ertices eac h represented by a distinct p ositiv e in teger, E is the set of edges and W is the set of w eigh ts of the edges. W e represen t the graph b y a skew-symmetric matrix M , called the skew-symmetric adjac ency matrix of G , where M ( i , j ) = w ( i, j ) if i < j , M ( i, j ) = − w ( i, j ) if i > j , and M ( i, i ) = 0. The Pfaffian of an n × n skew-symmetric matrix M is defin ed to b e 0 if n is o dd, 1 if n is 0, and if n = 2 k wh ere k > 0 then it is defi ned by P f ( M ) = X π ǫ π w ( i 1 , i 2 ) w ( i 3 , i 4 ) . . . w ( i 2 k − 1 , i 2 k ) , where • π = [ i 1 , i 2 , . . . , i 2 k ] is a p ermutatio n on [1 , 2 , . . . , n ], • the summation is ov er all p ermutations π , where i 1 < i 2 , i 3 < i 4 , . . . , i 2 k − 1 < i 2 k and i 1 < i 3 < . . . < i 2 k − 1 , • ǫ π is the sign of the p erm utation π , or equiv alen tly , ǫ π is the sign or parity of the num b er of o ve rlapp ing pairs, where a pair of edges ( i 2 r − 1 , i 2 r ) , ( i 2 s − 1 , i 2 s ) is overlapping iff i 2 r − 1 < i 2 s − 1 < i 2 r < i 2 s or i 2 s − 1 < i 2 r − 1 < i 2 s < i 2 r . A matching is a sub s et of edges suc h that no t wo edges share a common v ertex. A v ertex is said to b e satur ate d if there is a m atc hing edge incident to it. A p erfe ct matching is a matc h in g which saturates all v ertices. There is a one-to-one corresp on d ence b et w een the monomials in th e Pfaffian and the p erfect matc hings in G . If M is an n × n matrix and A = { i i , . . . , i r } ⊆ { 1 , . . . , n } , then M [ A ] d enotes the matrix obtained fr om M by d eleting the ro ws and columns of ind ices in A . The Pfaffian Sum of M is a p olynomial ov er indeterminates λ 1 , λ 2 , . . . , λ n defined by PfS( M ) = X A ( Y i ∈ A λ i )Pf( M [ A ]) where the summation is o ver the 2 n subsets of { 1 , . . . , n } . There is a one-one corresp ondence b et ween the terms of the P f affian sum and the matc h in gs in G . W e consider only instances suc h that eac h λ i is fixed to b e 0 or 1. In this case, Pfaffian S um is a sum mation o v er all A THEOR Y FOR V A LIANT’S MA TCHCIR CUITS 493 matc hings that matc h all n o des with λ i = 0. It is well kno wn th at b oth the Pfaffian and the Pfaffian Sum are computable in p olynomial time. 2.2. Matc hgate A matchgate Γ, is a quadrup le ( G, X , Y , T ), w h ere G = ( V , E , W ) is a grap h , X ⊆ V is a set of inp ut n o des, Y ⊆ V is a set of output no d es, and T ⊆ V is a set of omittable no d es suc h that X , Y and T are p airwise disjoin t. Usually the num b ers of n o des in V are consecutiv e from 1 to n = | V | and X , Y h a v e minimal and maximal n u mb ers r esp ectiv ely . Whenev er we refer to the Pfaffian Sum of a matc hgate fragment , we assume that λ i = 1, if i ∈ T , and 0 otherwise. Eac h no de in X ∪ Y is assumed to h av e exactly one in ciden t external e dge . F or a no de in X , the other end of the external edge is assum ed to ha ve ind ex less than the index for any no de in V , and for a no de in Y , the other end no de has index greater than that f or ev ery n o de in V . If k = | X | = | Y | , then Γ is called k -bi t matchgate . A matc hgate is called a level k matchgate , if it is an n -bit matc hgate for some n ≤ k . If a matc hgate only con tains inpu t no des, outpu t no des an d one ommitable no d e, th en it is called a standar d matchgate . W e define, for ev ery Z ⊆ X ∪ Y , the char a cter χ (Γ , Z ) of Γ with r esp e ct to Z to b e the v alue µ (Γ , Z )PfS( G − Z ), where G − Z is the graph obtained from G b y deleting the vertice s in Z together with their inciden t edges, and the mo difier µ (Γ , Z ) ∈ {− 1 , 1 } counts the p arit y of the num b er of o ve r laps b et wee n matc h ed edges in G − Z and matched external edges. W e assume that all the n o des in Z are matc hed externally . By d efi nition of the mo difier, it is easy to v erify that µ (Γ , Z ) = µ (Γ , Z ∩ X ) µ (Γ , Z ∩ Y ), and that if X = { 1 , 2 , . . . , k } and Z ∩ X = { i 1 , i 2 , . . . , i l } , then µ (Γ , Z ∩ X ) = ( − 1) P l j =1 ( i j − j ) . The char acter matrix χ (Γ) is defined to b e the 2 | X | × 2 | Y | matrix suc h that entry ( i 1 i 2 . . . i k , i n i n − 1 . . . i n − k +1 ) is χ (Γ , X ′ ∪ Y ′ ), where X ′ = { j ∈ X | i j = 1 } , Y ′ = { j ∈ Y | i j = 1 } and i 1 i 2 . . . i k , i n i n − 1 . . . i n − k +1 are b inary expression of num b ers b et w een 0 and 2 k − 1. W e also use ( X ′ , Y ′ ) to denote this entry . W e call an en try ( X ′ , Y ′ ) e dge e ntry , if 0 < | ( X − X ′ ) ∪ ( Y − Y ′ ) | ≤ 2. Throughout the p ap er, we identify a matc hgate and its c haracter matrix. An easy but useful fact is that for ev ery k , the 2 k × 2 k unit matrix is a c haracter matrix. 2.3. Prop erties of c haracter matrix W e in tro du ce sev eral prop erties of charact er matrices, which will b e u sed in the pro of of ou r results. Theorem 2.1 ([4]) . If A and B ar e char a cter matric es of size 2 k × 2 k , then AB is a char acter matrix. Theorem 2.2 ([4]) . Given any matchgate Γ ther e exists anoth er matchgate Γ ′ that has the same char acter as Γ and has an even numb er of no des, exactly one of which is omittable. Theorem 2.3 ([1 ]) . L et A b e a 2 k × 2 l matrix. Then A is the char a cter matr ix of a k -input, l - output matchgate, if and only if A satisfies al l the useful Gr assma nn-P l¨ ucker identities. This is a very u seful c haracterization of the charac ter m atrices generalizing the char- acterizat ion for a m a j or part of all 2-inp u t 2-output matc hgates in [4 ]. The pro of of this theorem im p lies the follo wing: 494 ANGSHENG LI AND M INGJI XIA Corollary 2.4 ([1]) . L et A b e a 2 k × 2 l matrix whose right-b ottom most entry is 1 satisfying al l the useful Gr assmann-Pl¨ ucker identities. Then A is uniquely determine d by its e dge entries and A is the char acter matrix of a standar d matchgate Γ c ontaining k + l + 1 no d es ( k input no des, l output no des and 1 omittable no de). Recen tly , Cai and Choudhary also sho wed that: Theorem 2.5 ([1]) . L et A b e a 4 × 4 char acter matrix. If A is invertible, then A − 1 is a char acter matrix. Conse que ntly, the nonsingular 4 × 4 c har acter matric es form a gr oup. 2.4. Matc hcircuit Giv en a matc hgate Γ = ( G, X , Y , T ), we sa y that it is e ven , if PfS( G − Z ) is zero whenev er Z = X ∪ Y has odd size, and o dd if PfS( G − Z ) is zero whenever | Z | is ev en. Theorem 2.6 ([4],[1]) . Consider a matchcir cuit Γ c omp ose d of gates as in [4 ] . Sup p ose that every gate is: (1) a gate with diagonal char acter matrix, (2) an even gate applie d to c onse cutive bits x i , x i +1 , . . . , x i + j for some j , (3) an o dd gate applie d to c onse cutive bits x i , x i +1 , . . . , x i + j for some j , or (4) an arbitr ar y g ate on bits x 1 , . . . , x j for some j . Supp o se also that every p ar a l lel e dge ab ove any o dd matchgate, if any, has weight − 1 and al l other p ar al lel e dges have weight 1. Then the char acter matrix of Γ is the pr o duct of the char acter matric es of the c onstituent ma tchgates, e ach extende d to as many inputs as tho se of Γ . F rom no w on, whenever we say a matc hcircuit, w e mean that it satisfying the requ ire- men ts in the ab ov e theorem. An example circuit is sho wn in Fig. 1, where the edges in a matc hgate are not dro wn , and eac h no d e has index sm aller th an that of all no des lo cated to the righ t of the n o de. W e call a matc hcircuit is of level k , if it is comp osed of m atc hgates no more than k b its. Figure 1: An exa mp le of matc hcircuit. The c har acter matrix of a matchcir cu i t is defined by the same wa y as that of a matc hgate except that there is no m o difier µ . A THEOR Y FOR V A LIANT’S MA TCHCIR CUITS 495 3. The results and o v erview of the pro ofs Theorem 3.1. F or every k , the nonsingular 2 k × 2 k char acter matric es form a gr oup under the matrix multiplic ation. W e will pro v e theorem 3.1 by in duction on the size of m atc h gates. T he pro of pr o ceeds as follo ws. Base d on corollary 2.4, w e observ e that all 2 k × 2 k c haracter matrices can b e transformed to a sp ecial form 2 k × 2 k c haracter matrices. Th is suggests th e follo win g: Definition 3.2. W e sa y that a k -bit matc h gate is a r e ducible matchgate , if the b ottom pair of no des k and n − k + 1 are connected by a w eight 1 edge, and ther e is no other edge inciden t to any of the no des k and n − k + 1. The charact er matrix of a reducible matc hgate is ca lled a r e ducible c har acter matrix . By corollary 2. 4 , a c haracter matrix B is a redu cible c haracter matrix if it satisfies the follo wing: (1) B 2 k − 1 , 2 k − 1 = B 2 k − 2 , 2 k − 2 = 1. (2) All the edge en tries in the last tw o columns and the last tw o ro ws are 0 exce p t for B 2 k − 2 , 2 k − 2 . Firstly w e pro v e that if the k -b it nonsin gular charact er matrices are closed under m atrix in verse op eration, then so are the ( k + 1)-bit nonsingular reducible c haracter m atrices . Secondly , w e in tro d uce some elemen tary n onsingular m atc hgates so that eve ry non- singular 2 k × 2 k c haracter matrix can b e transformed to a reducible c haracter m atrix by m ultiplying with the c haracter matrices of the elemen tary matc hgates. This transf ormation is realized b y four p h ases as follo ws. S tarting from A = A (0) , we need the follo wing: Phase T1 ( A (0) ⇒ A (1) ). T u r n the righ t-b ottom most en try to 1. Phase T 2 ( A (1) ⇒ A (2) ). T urn the edge en tries in the last row and column to 0’s, wh ile k eeping the right-bottom most entry 1. Phase T3 ( A (2) ⇒ A (3) ). T urn the en try A (2) 2 k − 2 , 2 k − 2 to 1, while k eeping the righ t-b ottom most entry 1 and the edge ent r ies in th e last ro w and column 0’s. Phase T4 ( A (3) ⇒ A (4) ). T ur n the edge entries in th e r o w 2 k − 2 and column 2 k − 2 to 0’s, wh ile k eeping the last tw o diago n al en tries 1’s and the edge en tries in the last r ow and column 0’s. Eac h ph ase consists of sev eral actions (or for simp licit y , steps). In eac h step, either the p ositions of en tries are changed, or th e v alues of some en tries are changed. An action is defined to b e th e multiplic ation of a c haracter m atrix with an elemen tary c haracter matrix. Th e r ole of an action is to c hange some sp ecific entries to b e some fixed v alue 0 or 1. Ho w ev er, such an action will certainly injur e other en tries w h ic h are un desired. The cru cial observ ation is that an appreciate sequence of actions will gradually satisfy all the entrie s requirements. D u ring the course of th e transform ation, once an entry r e- quirement is satisfied by some action, it will neve r b e injur ed again by the f u ture actions. That is to s ay , an action ma y injure only the entries whic h h av e n ot b een satisfied. This ensures that all th e en tries requirements will b e even tually satisfied. This d escrib es the idea of the pro of of theorem 3.1. The pro of will also b uild an essen tial ingredien t for our second result, the theorem b elo w. Theorem 3.3. F or every k > 2 , if Γ i s a matchcir cuit c omp ose d of level k matchgates, then: 496 ANGSHENG LI AND M INGJI XIA (1) Γ c an b e simulate d by a level 2 matchcir cuit ∆ . (2) A k -b it matchgate c an b e simulate d by O ( k 4 ) many single and two-bit matchgates. And every matchcir cuit Γ c an b e simulate d by a level 2 matchcir cuit in p olyno mial time. Our pro of of theorem 3.3 is a composition of the pro of of theorem 3.1 and some more elemen tary matc hgates. On the other h and, one could firstly pro ve theorem 3.3, then pro ve 3.1 b y combining theorem 3.3 and theorem 2.5. How ev er there are su b tle difference b et ween c haracter matrices of m atc hgate and matchcircuit. Therefore, this app roac h needs additional tec h n ique. 4. Group prop erty of the k -bit c haracter matrices In this section, we p ro v e theorem 3.1. T o pr o ceed an in ductiv e argument, we exploit the structure of the reducible c haracter matrices w hic h pa v e the wa y to the redu ctions. 4.1. Reducible matc hgates Lemma 4.1. L et ∆ 1 b e a ( k +1) -bit r e ducible matchgate, that is, the b ottom e d ge ( k + 1 , k + 3) having weight 1 and ther e is no any other e dge incident to any of the no des k + 1 and k + 3 . L et Γ 1 b e the k - bit matchgate obtaine d fr om ∆ 1 by deleting the e dge ( k + 1 , k + 3) . Then: (i) If ∆ 1 is invertible, so is Γ 1 . (ii) If χ (Γ 1 ) − 1 is a char acter matrix, so is χ (∆ 1 ) − 1 . Pr o of. (Sk etc h) F or (i). Th is holds b ecause χ (∆ 1 ) is a blo c k diagonal matrix after r ear- ranging the ord er of ro ws and columns, and χ (Γ 1 ) is equal to one blo ck. F or (ii). W e p ro v e this by constru cting the inv erted matc hgate ∆ 2 ( F 2 , W 2 , Z 2 , T 2 ) of ∆ 1 ( F 1 , W 1 , Z 1 , T 1 ) f rom the in v erted gate Γ 2 ( G 2 , X 2 , Y 2 , T 2 ) of Γ 1 ( G 1 , X 1 , Y 1 , T 1 ). It suffices to prov e that the comp osition of ∆ 1 and ∆ 2 has the unit matrix as its c haracter matrix. See Fig. 2 for the int u ition of the p ro of, while detailed v erification will b e given in the full v ersion of the p ap er. Figure 2: Examp le of k = 2. X 1 = { 1 , 2 } , Y 1 = { 6 , 7 } , T 1 = { 4 } X 2 = { 8 , 9 } , Y 2 = { 13 , 14 } , T 2 = { 11 } , W 1 = { 1 , 2 , 3 } , Z 1 = { 5 , 6 , 7 } , W 2 = { 7 , 8 , 9 } , Z 2 = { 12 , 13 , 14 } . A THEOR Y FOR V A LIANT’S MA TCHCIR CUITS 497 4.2. The t ransformation lemma In this part, we construct the matc hgates to realize the p hases T1 – T4 prescrib ed in section 3, and sho w that ev ery k -bit n onsingular charact er matrix can b e transformed to a k -bit reducible c haracter matrix b y u s ing the tr ansformation. The key p oint to the p ro of of the theorem is the follo wing: Lemma 4.2. L et A b e a 2 k × 2 k nonsingular char a cter matrix. Then ther e exist nonsingular char acter matric es L s , . . . , L 2 , L 1 , R 1 , R 2 , . . . , R t for some s and t su c h that L s · · · L 2 L 1 AR 1 R 2 · · · R t is a r e ducible char acter matrix. Pr o of. Giv en a nonsingular c haracter matrix A , w e d enote A by A (0) . W e construct the matc hgates to realize the four ph ases T1 – T4. W e use A ( i ) to denote the charac ter matrix obtained from A ( i − 1) b y u sing phase Ti, where i = 1 , 2 , 3 , 4. W e start with A (0) , and defin e the transformation to b e a series of actions, defined in section 3. In the d iscussion b elo w, w e will u s e A to denote the c haracter matrix obtained so far in the construction fr om A (0) (or s h ortly , th e curren t matrix). The fou r phases pro ceed as f ollo ws . Phase T1: S upp ose that Γ l is the k -bit matc hgate su ch that the l -th pair of inp u t-output no des are connected b y a p ath of length 2 on whic h eac h edge has w eigh t 1, and eac h of the other pairs is connected by an edge of w eight 1, and k + 1 is the only u nomittable no de other than the input and output no des. (See Fig. 3 (a)). Let C l denote the c haracter matrix of Γ l . Figure 3: Supp ose withou t loss of the generalit y that A I = i 1 i 2 ...i k ,J = j 1 j 2 ...j k 6 = 0. Define L 1 = Y 1 ≤ l ≤ k ,i l =0 C l , R 1 = Y 1 ≤ l ≤ k ,j l =0 C l . It is easy to see that the righ t-b ottom m ost entry , a sa y , of L 1 AR 1 is either A I ,J or − A I ,J b y computing the PfS( G − X ∪ Y ) of the comp osed matc h gate corresp onding to L 1 AR 1 . Let L 2 = 1 a E , and A (1) = L 2 L 1 AR 1 . Clearly L 2 is a c haracter matrix, so is A (1) , b y theorem 2.1. 498 ANGSHENG LI AND M INGJI XIA Phase T 2 : Phase T2 will c hange the edge entries in the last column and the last row to 0’s. W e first describ e the acti ons for th e column as follo ws . Phase T2 for the last column : W e turn the edge en tries in the last column to 0’s one by one from b ottom to top. T o turn an edge entry ( X ′ , 2 k − 1) to zero, we need a ro w transform ation applied to the cu r ren t matrix A , w hic h add s the m ultiplication of − b and the last r o w to ro w X ′ , where b is the v alue of entry ( X ′ , 2 k − 1) of the curren t matrix. Therefore p hase T2 for the last column consists of the follo wing actio ns. In d ecreasing order of X ′ , f or ev ery edge en try ( X ′ , 2 k − 1), w e ha v e: Action ( X ′ , 2 k − 1): Multiplying an elemen tary c haracter matrix, L sa y , to the current c haracter matrix A from the left side, where L is a charac ter matrix s atisfying that the diagonal en tries are all 1’s, and that L I = X ′ , 2 k − 1 = − b . This mak es some row transform ations to the curr en t matrix according to the nonzero en- tries other than th e d iagonal en tries. T he ro w transformation corresp ond ing to L I = X ′ , 2 k − 1 = − b is exact ly the one that realizes the goal of this acti on. No w we formally constru ct the m atchga te to realize the c haracter matrix L as r equired in the action ( X ′ , 2 k − 1) ab ov e. Th e construction is divid ed in to tw o cases dep en d ing on the size of X ′ as f ollo ws. Case 1 . X ′ = X − { i } for some i . W e use the matc hgate with the follo wing prop erties: (1) eac h input-output p air of the gate is connected by an edge of weig ht 1, and (2) it con tains one more edge ( i, t ) to realize L , where t is th e u nique omitta b le no d e, and the w eigh t of ( i, t ) is either b or − b ensuring L I , 2 k − 1 = − b . F or in tuition of th e matc hgate, a reader is r eferred to Fig . 3 (b). Let ( I ′ , J ′ ) b e an arb itrary nonzero en try of L other than the diagonal en tries. By the construction of the gate, w e ha ve that the i -th b it of I ′ and J ′ are 0 an d 1 resp ectiv ely , and that I ′ , and J ′ are identic al on the j -th bit for every j 6 = i . Hence I ′ < J ′ and I ′ ≤ I (recall that I = X ′ ). The action at en try ( X ′ , 2 k − 1) in this case actually mak es the follo wing ro w transformation: F or eac h suc h pair ( I ′ , J ′ ), ro w I ′ is added by the m u ltiplicatio n of L I ′ ,J ′ and r o w J ′ . Since I ′ ≤ I , all the edge entries ( I 1 , 2 k − 1) with I 1 > I h a v e never b een injured by the actio n in this case. Case 2 X ′ = X − { i, j } for s ome i, j . The c haracter matrix L in this case is constructed by a similar wa y to that in case 1 ab o ve , usin g the matc h gate in Fig. 3 (c). The cost of the acti on in this case is similarly analyzed to that for case 1. Recall that after p hase T1, the righ t-b ottom most en try is 1. The actions in b oth case 1 and case 2 of p hase T2 ab o ve w ill nev er inj ure th e last ro w of the matrix, so that the satisfaction of T1 is still p reserv ed b y the current state of the construction. Phase T 2 for the last ro w : The construction, and analysis for the actions is th e same as that for the column case with the roles of rows and columns exchanged. Therefore, the goal of T2 pr escrib ed in sectio n 3 has b een realize d. Phase T3 : The goal of th is p hase is similar to that of phase T 1, but different actions are needed. T3 consists of 2 actions. Th e first action mo ves a non zero edge entry to p osition (2 k − 1 , 2 k − 1), and the second one c hanges edge entry (2 k − 1 , 2 k − 1) to 1. The actions pro ceed as follo ws. A THEOR Y FOR V A LIANT’S MA TCHCIR CUITS 499 Action 1 : First, w e c ho ose a n onzero edge en try . Sin ce A (2) is nonsingular, ther e must b e a nonzero edge entry A (2) X ′ = X −{ i } ,Y ′ = Y −{ j } for some i and j . (Otherwise, all edge en tries are zero’s so that A (2) is a zero m atrix, cont r adicting the non-singularity of A (0) .) W e use a gate of t yp e Γ d , defined as follo ws: (i) connect eac h in put-output pair other than the i -th or the j -th pair by an edge, (ii) the i -th inpu t is connected to the j -th output, and (iii) the j -th inpu t is connected to the i -th output. All edges are of w eight 1. (See Fig. 3 (d)) Let C i,j denote th e c haracter matrix of the matc hgate describ ed abov e. This action just turns A (2) to C i,k A (2) C j,k b y connecting the matc hgate of C i,k with the gate of A (2) , an d the gate of C i,k in the order of left to righ t. Firstly , w e v erify that action 1 realizes its goal. Generally , m ultiplying C a,b from left (resp. right ) side is equiv alen t to exc hanging p airs of r o ws (resp. columns) i 1 i 2 . . . i a . . . i b . . . i k and i 1 i 2 . . . i b . . . i a . . . i k , mo d u lar a factor of 1 or − 1. Hence, the edge entry (2 k − 2 , 2 k − 2) of C i,k A (2) C j,k is eit h er A (2) X ′ ,Y ′ or − A (2) X ′ ,Y ′ . Secondly , we analyze the cost of the action. Notice that the ro w exchanges are deter- mined by a bit exc hange on the lab els of r o ws, so that the n umb er of zeros in (the string of ) the ro w lab el is k ept unc hanged. By d efinition, an ed ge entry can b e exc hanged only with another edge entry . Therefore all edge entries in the last r o w an d column are kept zeros. In addition, it is easy to see that the left-b ottom m ost en try is kept 1. Action 2 : W e construct a matc hgate with all of the inpu t-output pairs connected by an edge of weig ht 1, except that the last pair is connected b y an edge of w eigh t w = 1 A 2 k − 2 , 2 k − 2 . All entries of th e charact er matrix of this matc hgate are zeros, except for the diagonal en tries. A d iagonal entry ( I , I ) is w , if the last bit of I is 0, and 1, otherwise. W e m ultiply this c haracter matrix with the cur ren t matrix, then a straigh tforward calculatio n shows that entry (2 k − 1 , 2 k − 1) is turned to 1, wh ile all the satisfied en tries ac hiev ed previously are still preserv ed. The goal of T3 is realized. Phase T4 : This phase is s imilar to phase T 2, except th at w e need consider th e consequence on the last column and row. W e start from changing the edge ent ries in column 2 k − 2. Phase T4 for column 2 k − 2: S upp ose we are going to change edge en try ( X − { i } , Y − { n − k + 1 } ) to zero by the order from b ottom to top. Denote the action realizing this goal b y action at ( X − { i } , Y − { n − k + 1 } ). W e construct the elemen tary matc hgate us ed in the action at ( X − { i } , Y − { n − k + 1 } ). Each p air of inpu t-output no des of this matc hgate is connected by an edge of w eigh t 1, furth er m ore, the i -th input n o de is connected to the last output n o de by an edge of weig ht w , where w is either A X −{ i } ,Y −{ n − k +1 } or − A X −{ i } ,Y −{ n − k +1 } suc h that en try ( X − { i } , Y − { n − k + 1 } ) of the charac ter matrix of the matc hgate is − A X −{ i } ,Y −{ n − k +1 } . (See Fig. 3 (e).) W e examine the nonzero ent r ies in the c haracter m atrix L of the constructed matc h gate. W e first note that all d iagonal en tries are 1’s. Let ( I ′ , J ′ ) denote an arbitrary nonzero en try other than the diagonal en tries of the matrix L . By construction of th e matc hgate, I ′ and J ′ differ at only th e i -th and the k -th b its, and I ′ | i = J ′ | k = 0, I ′ | k = J ′ | i = 1, I ′ < J ′ , I ′ < X − { i } and I ′ , J ′ con tain the same num b er of 0’s, which is at least 1, where I ′ | i denotes the i -th b it of I ′ . The action at ( X − { i } , Y − { n − k + 1 } ) multiplies L with A from the left side. It mak es some row transformations: for ev ery such entry ( I ′ , J ′ ) chosen as ab o v e, add r o w I ′ b y the m ultiplication of ro w J ′ b y L I ′ ,J ′ . So the go al of th is action is realized. 500 ANGSHENG LI AND M INGJI XIA No w w e analyze the cost of the acti on. W e fi r st pr ov e that it do es not in jure the edge en tries in column 2 k − 2 wh ic h hav e already b een satisfied. The reason is similar to that in p h ase T 2. Because I ′ ≤ X − { i } , the act ion only injures the ro ws with in d ices less than X − { i } . The cost of the action is different from that in p h ase T 2 in that it ma y affect the edge en tries in the last column which ha ve already b een satisfied in p hases T1 and T 2. Because I ′ and J ′ con tain the same n umb er of 0’s, whic h is at least 1, all the row changes m ade b y the action alw a ys add a zero edge entry of the last column to another zero ed ge entry in the same column. Hence, it do es not inju re th e satisfied en tries in the last column. Additionally , it is ob vious th at the last t wo rows are preserved during the current action, so the left-b ottom most entry , th e edge en tries in the last ro w and en try (2 k − 2 , 2 k − 2) are all pr eserv ed. Phase T4 for row 2 k − 2: S imilar actions to that in phase T4 f or the column ab o ve can b e applied to the r o w 2 k − 2 to change its ed ge entries to 0’s. Therefore, T4 realizes its goal, at the s ame time, it preserves the satisfied entries in phases T 1 – T3. W e h a v e realized th e ph ases T1 – T4 p rescrib ed in s ection 3, b y corollary 2.4, B is a reducible characte r matrix. The lemma follo ws. 4.3. Pro of of theorem 3.1 Pr o of. W e pro v e b y induction on k th at for every k , and ev ery 2 k × 2 k c haracter matrix A , if A is inv ertible, th en A − 1 is a charact er matrix. The case for k = 1 is easy , the fi rst p r o of was give n by V alian t in [4]. Supp ose by induction that the theorem holds for k − 1. By lemma 4.2, ther e exist nonsingular c haracter matrices L i and R j suc h that B = L s · · · L 2 L 1 AR 1 R 2 · · · R t is the c haracter matrix of a reducible matc hgate ∆. Let B ′ b e the 2 k − 1 × 2 k − 1 c haracter matrix of Γ constructed from ∆ by deleting the b ottom edge . Since A is inv ertible, so is B , and so is B ′ b y lemma 4.1. By the ind uctiv e h yp othesis, B ′− 1 is a charact er matrix, so is B − 1 b y lemma 4.1. By th e c hoice of L i and R j , for all 1 ≤ i ≤ s and 1 ≤ j ≤ t , we hav e that A − 1 = R 1 R 2 · · · R t B − 1 L s · · · L 2 L 1 . By th eorem 2.1, A − 1 is also a charact er matrix. This co mp letes the pro of of theorem 3.1. W e notice that the inductive argument in the pro of of theorem 3.1 also giv es a d ifferen t pro of for the result in the case of k = 2. O ur metho d is a constructiv e, and u niform one. It ma y ha v e some more applications. 5. Lev el 2 matc hgates are univ ersal W e in tro duce nine t yp es of m atc hgates as our element ary gates. W e use Γ a , . . . , Γ i , to denote th e elemen tary lev el 2 m atc h gates corresp ond ing to th at in the follo wing Fig. 4 (a), (b), (c), (d), (e), (f ), (g), (h) and (i) r esp ectiv ely . A THEOR Y FOR V A LIANT’S MA TCHCIR CUITS 501 Figure 4: W e describ e the elemen tary gates as follo ws. All edges in Γ a ha ve weigh t 1. All edges connecting an input and an output no de except for the edge in Γ f , and the diagonal edge in Γ g , are all of w eigh t 1. Th e remaining ed ges tak e we ights w . Γ a mak es a row (or column, when it is multiplied fr om righ t side) exc han ge, whic h is a sp ecial transf orm ation, of th e c h aracter matrix according to a b it flip on the lab el, and it is us ed to mo v e a nonzero entry to the right-bottom most en try by the same wa y as that in the pro of of theorem 2.3 in [1]. Γ b is used to r ealize cE , and to turn a nonzero en try to 1. Both Γ a and Γ b are only used in the first ph ase, i.e. T 1, of the transformation. Intuitiv ely , Γ c can exchange t w o consecutiv e bits, and it allo ws u s to apply some other elemen tary gates to n onconsecutiv e bits. Γ d and Γ e are u sed in ph ase T2 to eliminate the ed ge entries in the last column and the last ro w. Γ c will b e also used in phase T 3 to mo v e a nonzero edge ent ry to p osition (2 k − 2 , 2 k − 2), in which case, Γ f will fu rther turn this entry to 1. Γ g is used in phase T4 to eliminate the edge en tries in th e column 2 k − 2 and row 2 k − 2. A nonzero singular c haracter matrix will b e transformed to a matc hcircuit comp osed of only Γ h -t yp e gates. Γ i is used to realize zero matrix. T o und erstand the comp ositio n of Γ c with other elemen tary gates, we need the follo wing: Lemma 5.1. Supp ose A is the c har acter matrix of a k -bit matchcir cuit ∆ , and P 1 , P 2 ar e two arbitr ary p erm utations on k elements. Ther e exists matchcir cu it Λ c onstructe d fr om ∆ by adding some gates Γ c , such that the c orr esp onding char acter matric es B satisfying B 2 k − 1 , 2 k − 1 = A 2 k − 1 , 2 k − 1 and | B i 1 ··· i k ,j 1 ··· j k | = | A P 1 ( i 1 ··· i k ) ,P 2 ( j 1 ··· j k ) | . The follo win g lemma giv es the tran s formation for matc hcircuits. 502 ANGSHENG LI AND M INGJI XIA Lemma 5.2. F or any k > 2 , and any k -bit matchcir cu it ∆ c onsisting of a single nonsingular k -bit match gate Γ , ther e is a new matchcir cu it Λ c onstructe d by add ing some invertible single and two-bit matchgates to ∆ , such that the char acter matrix B of Λ is r e ducible. F urthermor e , B is the char acter matrix of an eve n r e ducible matchgate. So far w e h a v e established the result f or the first significant case that a matc hgate is applied to the fi rst k b its. In th e follo wing lemma w e consider t w o more cases: • a gate applied to consecutiv e bits but not starting from the fi rst b it, • a gate applied to nonconsecutiv e bits. F or th e fi rst case, the gate m ust b e an ev en or an o d d gate, w e observ e that only ev en and o dd gates are us ed in the tr ansformation for an even or an o d d gate. F or the second case, we extend its matrix, and r eplace it b y a new ev en gate which is applied to consecutive bits red u cing it to the first case. Lemma 5.3. F or any k > 2 , and any m - bit matchcir cuit ∆ c ontaining a k -bit matchgate Γ with char acter matrix A , ther e is a level k − 1 matchcir cu it Λ having the same char acter matrix as ∆ . The p ro of for lemma 5.1-5.3 will b e giv en in the fu ll ve rs ion. 5.1. Pro of of theorem 3.3 Pr o of. F or (1). Rep eat the p ro cess in lemma 5.3 u n til there is no gate of bit greater than 2. F or (2). Th e num b er of matc hgates used in the p hases of transformation are O( k ), O( k 3 ), O( k ) and O( k 2 ), resp ectiv ely , so a k -bit matc hgate can b e simulated by O( k 4 ) many single and t wo -bit matc h gates. This p r o cedure is p olynomial time compu table, b ecause there are p olynomially man y actions, and eac h action is p olynomial time computable due to the fact that w e compute only the edge en tries. References [1] J.-Y. Cai, V. Chou d hary , On the Theory of Matc hgate Computations. Electronic Colloquium on Com- putational Complexity (ECCC)(018), (2006). [2] K. Murota, Matrices and Matroids for Systems Analysis, Sprin ger, Berlin, 2000. [3] Mic hael A . Nielsen and I saac L. Chuang, Qu an tu m Computation and Quantum Information, Com bridge Universit y Press, 2000. [4] L. G. V a liant, Qu antum circuits that can be simulated classicall y in polyn omial time, S IAM Journal on Computing, 31 (2002) pp. 1229–1254. [5] L. G. V ali ant, Expressiveness of Matchga tes, Theoretical Computer Science, 281 (2003) pp. 457–471 . [6] L. G. V ali ant, Holographic Algorithms (Extended Abstract), FOCS 2004, pp. 306–315 . This wor k is licensed und er the Creative Commons Attr ibution-NoDe rivs License. T o view a copy of this license, visit http://cre ativecommons.org/licenses/by- n d/3.0/ .
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment