Canonical Multi-Target Toffoli Circuits Hans-J¨ org Kreowski, Sabine Kuske and Aaron Lye University of Bremen, Department of Computer Science P.O.Box 33 04 40, 28334 Bremen, Germany { kreo,kuske,lye } @informatik.uni-bremen.de 18.03.2016 10th International Conference on Language and Automata Theory and Applications (LATA 2016)
Reversible Circuits ◮ introduced by Toffoli at ICALP 1980 ◮ vivid research area in the last decade ◮ low power consumption ◮ relation to quantum circuits
Reversible Computation Definition (Reversible Function) Let B = { 0 , 1 } , and ID be a set of identifiers of Boolean variables. Let B X be the set of all mappings a : X → B for some X ⊆ ID where the elements of B X are called assignments . Then a bijective Boolean (multi-output) function f : B X → B X is called reversible . Example (Reversible Circuit) x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4
Reversible Computation x 1 x 1 x 2 x 2 x 3 x 3 Definition x 4 x 4 1. multi-target Toffoli gate mtg = ( T , c : T → 2 X ) with target lines T ⊆ X , T � = ∅ and T ∩ c ( T ) = ∅ where c ( T ) = � c ( t ) are control lines. t ∈ T 2. parallel controlled negation � a ( x ) if x ∈ T and a ( y ) = 1 , ∀ y ∈ c ( x ) f mtg ( a )( x ) = a ( x ) otherwise 3. multi-target Toffoli circuit mtc = mtg 1 . . . mtg n 4. f mtc = f mtg n ◦ · · · ◦ f mtg 1 Toffoli circuits are universal
Reversible Computation Proposition Let mtg = ( T , c ) be a multi-target Toffoli gate, let T ′ ⊆ T with ∅ � = T ′ � = T . 1. Then mtg ′ = ( T ′ , c ′ ) with c ′ ( t ′ ) = c ( t ′ ) for t ′ ∈ T ′ is a multi-target Toffoli gate (denoted by mtg | T ′ , called the restriction of mtg to T ′ ).
Reversible Computation Proposition Let mtg = ( T , c ) be a multi-target Toffoli gate, let T ′ ⊆ T with ∅ � = T ′ � = T . 1. Then mtg ′ = ( T ′ , c ′ ) with c ′ ( t ′ ) = c ( t ′ ) for t ′ ∈ T ′ is a multi-target Toffoli gate (denoted by mtg | T ′ , called the restriction of mtg to T ′ ). 2. Accordingly, mtg ′′ = ( T ′′ , c ′′ ) with T ′′ = T − T ′ and c ′′ ( t ′′ ) = c ( t ′′ ) for t ′′ ∈ T ′′ is also a multi-target Toffoli gate.
Reversible Computation Proposition Let mtg = ( T , c ) be a multi-target Toffoli gate, let T ′ ⊆ T with ∅ � = T ′ � = T . 1. Then mtg ′ = ( T ′ , c ′ ) with c ′ ( t ′ ) = c ( t ′ ) for t ′ ∈ T ′ is a multi-target Toffoli gate (denoted by mtg | T ′ , called the restriction of mtg to T ′ ). 2. Accordingly, mtg ′′ = ( T ′′ , c ′′ ) with T ′′ = T − T ′ and c ′′ ( t ′′ ) = c ( t ′′ ) for t ′′ ∈ T ′′ is also a multi-target Toffoli gate. 3. The sequential composition mtg ′ mtg ′′ is semantically equivalent to mtg , i.e. f mtg = f mtg ′ mtg ′′ .
Sequentialization and Parallelization Definition Let mtg = ( T , c ) and T ′ ⊆ T with ∅ � = T ′ � = T . Let mtg ′ = mtg | T ′ and mtg ′′ = mtg | T ′′ where T ′′ = T − T ′ . 1. Then mtg ′ mtg ′′ is called sequentialization of mtg wrt T ′ and mtg parallelization of mtg ′ mtg ′′ (denoted by mtg ′ + mtg ′′ ).
Sequentialization and Parallelization Definition Let mtg = ( T , c ) and T ′ ⊆ T with ∅ � = T ′ � = T . Let mtg ′ = mtg | T ′ and mtg ′′ = mtg | T ′′ where T ′′ = T − T ′ . 1. Then mtg ′ mtg ′′ is called sequentialization of mtg wrt T ′ and mtg parallelization of mtg ′ mtg ′′ (denoted by mtg ′ + mtg ′′ ). 2. Let mtc = mtc ′ mtgmtc ′′ and mtg ′ mtg ′′ be the sequentialization of mtg wrt T ′ . Let mtc = mtc ′ mtg ′ mtg ′′ mtc ′′ .
Sequentialization and Parallelization Definition Let mtg = ( T , c ) and T ′ ⊆ T with ∅ � = T ′ � = T . Let mtg ′ = mtg | T ′ and mtg ′′ = mtg | T ′′ where T ′′ = T − T ′ . 1. Then mtg ′ mtg ′′ is called sequentialization of mtg wrt T ′ and mtg parallelization of mtg ′ mtg ′′ (denoted by mtg ′ + mtg ′′ ). 2. Let mtc = mtc ′ mtgmtc ′′ and mtg ′ mtg ′′ be the sequentialization of mtg wrt T ′ . Let mtc = mtc ′ mtg ′ mtg ′′ mtc ′′ . Then mtc and mtc are ◮ in seq -relation wrt T ′ in gate i = | mtc ′ | + 1 , denoted by mtc − − − − − → seq ( i , T ′ ) mtc
Sequentialization and Parallelization Definition Let mtg = ( T , c ) and T ′ ⊆ T with ∅ � = T ′ � = T . Let mtg ′ = mtg | T ′ and mtg ′′ = mtg | T ′′ where T ′′ = T − T ′ . 1. Then mtg ′ mtg ′′ is called sequentialization of mtg wrt T ′ and mtg parallelization of mtg ′ mtg ′′ (denoted by mtg ′ + mtg ′′ ). 2. Let mtc = mtc ′ mtgmtc ′′ and mtg ′ mtg ′′ be the sequentialization of mtg wrt T ′ . Let mtc = mtc ′ mtg ′ mtg ′′ mtc ′′ . Then mtc and mtc are ◮ in seq -relation wrt T ′ in gate i = | mtc ′ | + 1 , denoted by mtc − − − − − → seq ( i , T ′ ) mtc ◮ in par -relation after gate i − 1 = | mtc ′ | , denoted by mtc − − − − − → par ( i − 1) mtc .
Example x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4
Example x 1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 − − − − → x 3 x 3 x 3 x 3 par (2) x 4 x 4 x 4 x 4
Example x 1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 − − − − → x 3 x 3 x 3 x 3 par (2) x 4 x 4 x 4 x 4 − − − − − ) } − − x 2 { ← 3 ( , q e s x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4
Example x 1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 − − − − → x 3 x 3 x 3 x 3 par (2) x 4 x 4 x 4 x 4 − − − − − ) } − − x 2 { ← 3 ( , q e s x 1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 − − − − → x 3 x 3 par (1) x 3 x 3 x 4 x 4 x 4 x 4
Shift Definition Let mtc and � mtc be two multi-target Toffoli circuits. mtc is a shift of mtc (for some i ≥ 1 and T ′ ⊆ X ) 1 if Then � � mtc − − − − − → mtc par ( i − 1) or � − − − − − − − → − − − − − → mtc mtc mtc seq ( i +1 , T ′ ) par ( i − 1) = = = mtc ′ mtg 1 mtg 2 mtc ′′ mtc ′ mtg 1 mtg ′ 2 mtg ′′ 2 mtc ′′ mtc ′ mtg 1 + mtg ′ 2 mtg ′′ 2 mtc ′′ 1 where T ′ is the set of target lines of the gate i + 1 in case that the shift is just a parallelization.
Shift Definition Let mtc and � mtc be two multi-target Toffoli circuits. mtc is a shift of mtc (for some i ≥ 1 and T ′ ⊆ X ) 1 if Then � � mtc − − − − − → mtc par ( i − 1) or � − − − − − − − → − − − − − → mtc mtc mtc seq ( i +1 , T ′ ) par ( i − 1) = = = mtc ′ mtg 1 mtg 2 mtc ′′ mtc ′ mtg 1 mtg ′ 2 mtg ′′ 2 mtc ′′ mtc ′ mtg 1 + mtg ′ 2 mtg ′′ 2 mtc ′′ denoted by � mtc − − − − − → mtc sh ( i , T ′ ) 1 where T ′ is the set of target lines of the gate i + 1 in case that the shift is just a parallelization.
Example x 1 x 1 x 1 x 1 − − − − → x 2 x 2 x 2 x 2 par (2) x 3 x 3 x 3 x 3 = x 4 x 4 x 4 x 4 sh (3 , { x 2 } ) − sh (2 , { x 2 } ) − − − − − − ) − } − − x 2 − { ← − 3 ( , q − e s ← x 1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 − − − − → x 3 x 3 x 3 x 3 par (1) x 4 x 4 x 4 x 4 What happens if one shifts as long as possible? Controlled negations move to the left
Example x 1 x 1 x 1 x 1 − − − − → x 2 x 2 x 2 x 2 par (2) x 3 x 3 x 3 x 3 = x 4 x 4 x 4 x 4 sh (3 , { x 2 } ) − sh (2 , { x 2 } ) − − − − − − ) − } − − x 2 − { ← − 3 ( , q − e s ← x 1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 − − − − → x 3 x 3 x 3 x 3 par (1) x 4 x 4 x 4 x 4
Example x 1 x 1 x 1 x 1 − − − − → x 2 x 2 x 2 x 2 par (2) x 3 x 3 x 3 x 3 = x 4 x 4 x 4 x 4 sh (3 , { x 2 } ) − sh (2 , { x 2 } ) − − − − − − ) − } − − x 2 − { ← − 3 ( , q − e s ← x 1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 − − − − → x 3 x 3 x 3 x 3 par (1) x 4 x 4 x 4 x 4 What happens if one shifts as long as possible?
Example x 1 x 1 x 1 x 1 − − − − → x 2 x 2 x 2 x 2 par (2) x 3 x 3 x 3 x 3 = x 4 x 4 x 4 x 4 sh (3 , { x 2 } ) − sh (2 , { x 2 } ) − − − − − − ) − } − − x 2 − { ← − 3 ( , q − e s ← x 1 x 1 x 1 x 1 x 2 x 2 x 2 x 2 − − − − → x 3 x 3 x 3 x 3 par (1) x 4 x 4 x 4 x 4 What happens if one shifts as long as possible? Controlled negations move to the left
Waiting Degree Given mtc = ( T 1 , c 1 ) . . . ( T n , c n ), then n � ( j − 1) · # T j wait ( mtc ) = j =1 Proposition � n mtc , then wait ( � � 1. If mtc − − − − − → mtc ) = wait ( mtc ) − # T j . par ( i − 1) j = i +1 � 2. If mtc − seq ( i +1 , T ′ ) mtc − − − − − − − → − − − − → mtc , then par ( i − 1) wait ( � mtc ) = wait ( mtc ) − # T ′ .
Recommend
More recommend