Buscar

11-3 - Operator method in Quantum Computing

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 3, do total de 71 páginas

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 6, do total de 71 páginas

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes
Você viu 9, do total de 71 páginas

Faça como milhares de estudantes: teste grátis o Passei Direto

Esse e outros conteúdos desbloqueados

16 milhões de materiais de várias disciplinas

Impressão de materiais

Agora você pode testar o

Passei Direto grátis

Você também pode ser Premium ajudando estudantes

Prévia do material em texto

1 
 
Operator method in Quantum Computing 
Masatsugu Sei Suzuki 
Department of Physics, SUNY at Binghamton 
Binghamton, NY 
(Date: November 27, 2014) 
 
N.D. Mermin, Quantum Computer Science An Introduction (Cambridge, 2007). 
 
1. Definition of the operator n̂ 
We define the operator n̂ from the eigenvalue problem 
 
xxxn ˆ , 
 
with 
 
0000ˆ n , 1111ˆ n , 
 
where x = 0 and 1. n̂ is the projection operator and is defined by 
 
11ˆ n . 
 
The matrix of n̂ under the basis of { 0 , 1 } is given by 
 







10
00
n̂ . 
 
The operator n̂ is the projection operator on the state . 1 
 
2. Definition of the operator nm ˆ1̂ˆ  
We define the operator m̂ as 
 
nm ˆ1̂ˆ  , 
 
where 1̂ is the identity matrix of 2x2, 
 







10
01
1̂ . 
 
For simplicity, here, we use m̂ instead of n~ (mermin used this notation). We note that 
 
2 
 
 
xxxxxxnxm )1()ˆ1̂(ˆ  . 
 
Thus we have 
 
00ˆ m , 0101ˆ m . 
 
The matrix of m̂ under the basis of { 0 , 1 } is given by 
 







00
01
m̂ . 
 
The operator n̂ is the projection operator on the state . 0 
 
00ˆ m . 
 
3. Properties of n̂ and m̂ 
 
nn ˆˆ2  , 
 
mm ˆˆ 2  , 
 
0ˆˆˆˆ  nmmn , 
 
1ˆˆ  nm . 
 
4. Pauli matrix 
 







01
10
ˆˆ xX  , 




 

0
0
ˆˆ
i
i
Y y , 







10
01
ˆˆ zZ  , 
 
mXXn ˆˆˆˆ  , nXXm ˆˆˆˆ  , 
 
1̂ˆˆˆ 222  ZYX , 
 
XZZX ˆˆˆˆ  , 
 
 
3 
 
)ˆ1(
2
1
ˆ Zn  , )ˆ1(
2
1
ˆ Zm  , mnZ ˆˆˆ  , 
 
XZiZXiY ˆˆˆˆˆ  , YXiXYiZ ˆˆˆˆˆ  , ZYiYZiX ˆˆˆˆˆ  . 
 
5. Hadamard operator 
 
)ˆˆ(
2
1
11
11
2
1ˆ ZXH 






 , 
 
1̂)ˆˆˆˆˆˆ(
2
1
)ˆˆ)(ˆˆ(
2
1ˆ 222  ZXZZXXZXZXH , 
 
ZHXH ˆˆˆˆ  , XHZH ˆˆˆˆ  . 
 
Note that 
 
Z
XZZXZX
ZXZZXZX
ZXZX
ZXXZXHXH
ˆ
)ˆˆˆˆˆˆ(
2
1
)ˆˆˆˆˆˆ(
2
1
)ˆˆ1)(ˆˆ(
2
1
)ˆˆ(ˆ)ˆˆ(
2
1ˆˆˆ
22
2






 
 
X
XZZX
XZZXZX
XZZX
ZXZZXHZH
ˆ
)ˆˆˆˆ(
2
1
)ˆˆˆˆˆˆ(
2
1
)ˆˆ1̂)(ˆˆ(
2
1
)ˆˆ(ˆ)ˆˆ(
2
1ˆˆˆ
22





 
 
)ˆˆˆˆˆˆˆˆ(
2
1
)ˆˆ()ˆˆ(
2
1ˆˆ ZZXZZXXXZXZXHH  . 
 
 
4 
 
6. Calculation of matrices by using Mathematica 
 
5 
 
Clear "Global` " ; I2 IdentityMatrix 2 ;
n
0 0
0 1
; m I2 n; X PauliMatrix 1 ;
Y PauliMatrix 2 ; Z PauliMatrix 3 ; 0
1
0
;
1
0
1
;
m MatrixForm
1 0
0 0
n MatrixForm
0 0
0 1
n.n n MatrixForm
0 0
0 0
m.m m MatrixForm
0 0
0 0
 
6 
 
n.X X.m MatrixForm
0 0
0 0
m.X X.n MatrixForm
0 0
0 0
m n MatrixForm
1 0
0 1
Z.X X.Z MatrixForm
0 0
0 0
1
2
I2 Z MatrixForm
0 0
0 1
1
2
X Z MatrixForm
1
2
1
2
1
2
1
2
 
7 
 
H1
1
2
X Z ; H1 MatrixForm
1
2
1
2
1
2
1
2
X.X MatrixForm
1 0
0 1
Z.Z MatrixForm
1 0
0 1
X.Z Z.X MatrixForm
0 0
0 0
H1.H1 MatrixForm
1 0
0 1
H1.X.H1 Z MatrixForm
0 0
0 0
 
8 
 
H1.Z.H1 X MatrixForm
0 0
0 0
H1. 0 MatrixForm
1
2
1
2
H1. 1 MatrixForm
1
2
1
2
f11 KroneckerProduct m, I2
KroneckerProduct n, X ;
f11 MatrixForm
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
 
9 
 
f12
1
2
KroneckerProduct I2, I2 X
KroneckerProduct Z, I2 X ;
f12 MatrixForm
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
f13
1
2
KroneckerProduct I2 Z, I2
KroneckerProduct I2 Z, X ;
f13 MatrixForm
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
S11 KroneckerProduct n, n
KroneckerProduct m, m
KroneckerProduct X.n, X.m
KroneckerProduct X.m, X.n ;
S11 MatrixForm
 
10 
 
1 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1
C11 KroneckerProduct m, I2
KroneckerProduct n, X ;
C11 MatrixForm
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
Z X .Y MatrixForm
0 0
0 0
Y Z.X MatrixForm
0 0
0 0
X Y.Z MatrixForm
0 0
0 0
 
11 
 
 
 
7. The CNOT gate with CNOTÛ 
The CNOT gate is defined by 
 
KroneckerProduct H1, H1 MatrixForm
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
U1
u11 u12
u21 u22
;
KroneckerProduct I2, U1 MatrixForm
u11 u12 0 0
u21 u22 0 0
0 0 u11 u12
0 0 u21 u22
h1
KroneckerProduct H1, H1 .KroneckerProduct X, X
MatrixForm
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
1
2
 
12 
 
)ˆˆˆ1̂1̂ˆ1̂1̂(
2
1
ˆ)ˆ1̂(
2
1
1̂)ˆ1̂(
2
1
ˆˆ1̂ˆˆ
XZXZ
XZZ
XnmUCNOT



 
 
with 
 
1̂ˆ 2 CNOTU , 
 
)1̂ˆˆ1̂ˆ1̂1̂1̂ˆ1̂1̂1̂(
2
1
1̂ˆ)21(ˆ 12


XZXZ
CUCNOT
 
 
)ˆ1̂ˆˆ1̂1̂1̂1̂ˆ1̂1̂1̂(
2
1
)31(ˆ XZXZUCNOT  
 
((Mathematica)) 
 
 
Clear "Global` " ;
I2 IdentityMatrix 2 ;
X PauliMatrix 1 ; Y PauliMatrix 2 ;
Z PauliMatrix 3 ;
UCNOT
1
2
KroneckerProduct I2, I2
KroneckerProduct Z, I2
KroneckerProduct I2, X
KroneckerProduct Z, X ;
UCNOT MatrixForm
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
 
13 
 
 
 
 
8. Swap (exchange) operator 
UCNOT12
1
2
KroneckerProduct I2, I2, I2
KroneckerProduct Z, I2, I2
KroneckerProduct I2, X, I2
KroneckerProduct Z, X, I2 ;
UCNOT12 MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
UCNOT13
1
2
KroneckerProduct I2, I2, I2
KroneckerProduct Z, I2, I2
KroneckerProduct I2, I2, X
KroneckerProduct Z, I2, X
MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 0
 
14 
 
swapĜ is called a swap (exchange) operator, which simply interchanges the states of qubits 1 and 
2. 
 
)ˆˆˆˆˆ1̂1̂(
2
1
)ˆ()ˆˆ(
4
1
)ˆ()ˆˆ(
4
1
)ˆˆ1̂1̂(
2
1
)ˆˆ()ˆˆˆ(
4
1
)ˆˆ()ˆˆˆ(
4
1
)ˆˆ1̂1̂(
2
1
)]ˆ1̂([)]ˆ1̂(ˆ[
4
1
)]ˆ1̂([)]ˆ1̂(ˆ[
4
1
)ˆ1̂()ˆ1̂(
4
1
)ˆ1̂()ˆ1̂(
4
1
)ˆˆ()ˆˆ()ˆˆ()ˆˆ(ˆˆˆˆˆ
ZZYYXX
YiXYiXYiXYiXZZ
ZXXZXXZXXZXXZZ
ZXZX
ZXZXZZZZ
nXmXmXnXmmnnGSWAP






 
 
Then the swap operator becomes equivalent to the Dirac exchange spin operator 
 
_________________________________________________________________________ 
9. Toffoli gate 
 
 
 
Only if 1ba , 
 
aa ' , bb ' , 
 
 
15 
 
cUc ˆ'  . 
 
Other wise 
 
aa ' , bb ' , 
 
cc ' . 
 
 
((Truth table)) 
 
a b c a’ b’ c’ 
0 0 0 0 0 0 
0 0 1 0 0 1 
0 1 0 0 1 0 
0 1 1 0 1 1 
1 0 0 1 0 0 
1 0 1 1 0 1 
1 1 0 1 1 100ˆ 2111 uuU  
1 1 1 1 1 101ˆ 2212 uuU  
 








































U
I
I
I
000
000
000
000
000000
000000
00100000
00010000
00001000
00000100
00000010
00000001
)](ˆ
2221
2211
uu
uu
UGToffli . 
 
10. Example: equivalent quantum circuits 
We show that a two-qubit controlled gate canted using a combination of one qubit controlled 
gate as 
 
1323
ˆ)1̂ˆ])([ˆ1̂)(1̂ˆ(ˆ][ˆ VCNOTCNOTVToffoli GGVGGGUG 
 . 
 
 
16 
 
 
 
This can be also described by 
 
2313
ˆ)1̂ˆ)]((ˆ1̂)[1̂ˆ(ˆ][ˆ VCNOTCNOTVToffoli GGVGGGUG 
 , 
 
which means that ][ˆ UGToffoli is a universal gate (reversible). 
 
 
 
The left hand-side is the Toffoli gate with the matrix Û , 
 



























2221
1211
000000
000000
00100000
00010000
00001000
00000100
00000010
00000001
][ˆ
UU
UU
UGToffoli 
 
where 
 
 
17 
 







2221
1211ˆ
UU
UU
U . 
 
Suppose that the matrix Û is expressed by 2ˆˆ VU  , where V̂ is the unitary operator. 
The CNOT operator is given by 
 




















X
I
0
0
0100
1000
0010
0001
ˆ
CNOTG , 
 
1̂ˆ CNOTG is obtained as 





















0ˆ00
ˆ000
00ˆ0
000ˆ
1̂
0
0
1̂ˆ
2
2
2
2
I
I
I
I
GCNOT X
I
. 
 
The control V gate is given by 
 







V
I
0
0
][ˆ VG ,. 





 

V
I
0
0
][ˆ VG . 
 
Then we have 
 








































V
I
V
I
000
000
000
000
000000
000000
00100000
00010000
000000
000000
00000010
00000001
][ˆ1̂ˆ
2221
1211
2221
1211
23
VV
VV
VV
VV
VUGV 
 
13
ˆ
VC is the matrix obtained from thematrix ][ˆ1̂ VG by the appropriate interchange of row and 
column, 
 
18 
 
 








































V
V
I
I
000
000
000
000
000000
000000
000000
000000
00001000
00000100
00000010
00000001
][ˆ
2221
1211
2221
1211
13
VV
VV
VV
VV
VGV . 
 
((Mathematica)) 
 
 
19 
 
 
Clear "Global` " ; I2 IdentityMatrix 2 ; CV
1 0 0 0
0 1 0 0
0 0 v11 v12
0 0 v21 v22
;
CVP
1 0 0 0
0 1 0 0
0 0 v11c v21c
0 0 v12c v22c
;
V1
v11 v12
v21 v22
;
CUV13 A : Module A1, U, U1, U11, U12 , A1 A;
U KroneckerProduct I2, A1 ;
U1 U All, 1 , U All, 2 , U All, 5 , U All, 6 ,
U All, 3 , U All, 4 , U All, 7 , U All, 8 ;
U11 Transpose U1 ;
U12 U11 1 , U11 2 , U11 5 , U11 6 , U11 3 ,
U11 4 , U11 7 , U11 8 ;
CV13 CUV13 CV ; CV13 MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 v11 v12 0 0
0 0 0 0 v21 v22 0 0
0 0 0 0 0 0 v11 v12
0 0 0 0 0 0 v21 v22
 
20 
 
UCNOT
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
; UCNOTI2 KroneckerProduct UCNOT, I2 ;
UCNOTI2 MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
CV23 KroneckerProduct I2, CV ;
CV23 MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 v11 v12 0 0 0 0
0 0 v21 v22 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 v11 v12
0 0 0 0 0 0 v21 v22
 
21 
 
 
CVP23 KroneckerProduct I2, CVP ; CVP23 MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 v11c v21c 0 0 0 0
0 0 v12c v22c 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 v11c v21c
0 0 0 0 0 0 v12c v22c
K1 CV23.UCNOTI2.CVP23.UCNOTI2.CV13 FullSimplify;
vvc
v11 v12
v21 v22
.
v11c v21c
v12c v22c
;
vcv
v11c v21c
v12c v22c
.
v11 v12
v21 v22
;
U1 V1.V1 Simplify;
rule1 vvc 1, 1 1, vvc 1, 2 0, vvc 2, 1 0,
vvc 2, 2 1, vcv 1, 1 1, vcv 1, 2 0, vcv 2, 1 0,
vcv 2, 2 1 ;
rule2 U1 1, 1 U11, U1 1, 2 U12, U1 2, 1 U21,
U1 2, 2 U22 ;
K11 K1 . rule1; K12 K11 . rule2; K12 MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 U11 U12
0 0 0 0 0 0 U21 U22
 
22 
 
_________________________________
____________________________________________ 
10. Equivalent circuits 
We show the equivalence between two quantum circuits as shown below, 
 
 
 




























00010000
00100000
01000000
10000000
00001000
00000100
00000010
00000001
)(ˆ)1̂ˆ()ˆ1̂)(1̂ˆ)(ˆ1̂( 13 CNOTCGGGG CNOTCNOTCNOTCNOT
 
 
where 
 
L1 CV13.UCNOTI2.CVP23.UCNOTI2.CV23 FullSimplify;
L11 L1 . rule1; L12 L11 . rule2; L12 MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 U11 U12
0 0 0 0 0 0 U21 U22
 
23 
 



























00100000
00010000
10000000
01000000
00001000
00000100
00000010
00000001
1̂ˆCNOTG 
 



























01000000
10000000
00100000
00010000
00000100
00001000
00000010
00000001
ˆ1̂ CNOTG 
 



























01000000
10000000
00010000
00100000
00001000
00000100
00000010
00000001
ˆ
13CNOTG 
 
)ˆˆˆ1̂1̂ˆ1̂1̂(
2
1
ˆ)ˆ1̂(
2
1
1̂)ˆ1̂(
2
1
ˆˆ1̂ˆ][ˆ
VZVZ
VZZ
VnmVG



 
 
 
24 
 



























2221
2221
1211
1211
12
000000
000000
000000
000000
00001000
00000100
00000010
00000001
1̂][ˆ
VV
VV
VV
VV
VG 
 









































V
I
V
I
000
000
000
000
000000
000000
00100000
00010000
000000
000000
00000010
00000001
][ˆ1̂][ˆ
2
2
2221
1211
2221
1211
23
VV
VV
VV
VV
VGVG
 
 









































V
V
I
I
000
000
000
000
000000
000000
000000
000000
00001000
00000100
00000010
00000001
)ˆ1̂ˆˆ1̂1̂1̂1̂ˆ1̂1̂1̂(
2
1
][ˆ
2
2
2221
1211
2221
1211
13
VV
VV
VV
VV
VZVZVG
 
 
((Mathematica)) 
 
25 
 
 
Clear "Global` " ; I2 IdentityMatrix 2 ;
X PauliMatrix 1 ; Y PauliMatrix 2 ;
Z PauliMatrix 3 ;
V
V11 V12
V21 V22
;
UV
1
2
KroneckerProduct I2, I2
KroneckerProduct Z, I2
KroneckerProduct I2, V
KroneckerProduct Z, V ;
UV MatrixForm
1 0 0 0
0 1 0 0
0 0 V11 V12
0 0 V21 V22
C12V KroneckerProduct UV, I2 ;
C12V MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 V11 0 V12 0
0 0 0 0 0 V11 0 V12
0 0 0 0 V21 0 V22 0
0 0 0 0 0 V21 0 V22
 
26 
 
 
 
_____________________________________________________________________________ 
11 Toffoli gate: 
The Toffoli gate is given by 
 
C23V KroneckerProduct I2, UV ;
C23V MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 V11 V12 0 0 0 0
0 0 V21 V22 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 V11 V12
0 0 0 0 0 0 V21 V22
C13V
1
2
KroneckerProduct I2, I2, I2
KroneckerProduct Z, I2, I2
KroneckerProduct I2, I2, V
KroneckerProduct Z, I2, V ;
C13V MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 V11 V12 0 0
0 0 0 0 V21 V22 0 0
0 0 0 0 0 0 V11 V12
0 0 0 0 0 0 V21 V22
 
27 
 











































X
I
I
I
000
000
000
000
01000000
10000000
00100000
00010000
00001000
00000100
00000010
00000001
ˆˆˆ1̂ˆˆ1̂1̂ˆ
)ˆˆ1̂ˆ(ˆ1̂1̂ˆ
ˆˆ1̂1̂ˆˆ
Xnnmnm
Xnmnm
GnmG CNOTtoffoli
 
 
where 
 
XnmGCNOT ˆˆ1̂ˆˆ  . 
 
((Mathematica)) 
 
28 
 
 
 
12. Fredkin gate 
The Fredkin gate is given by 
 
Clear "Global` " ; I2 IdentityMatrix 2 ; X PauliMatrix 1 ;
Y PauliMatrix 2 ; Z PauliMatrix 3 ; n
0 0
0 1
;
m
1 0
0 0
;
UCNOT
1 0 0 0
0 1 0 0
0 0 0 1
0 0 1 0
;
TOF1 KroneckerProduct m, I2, I2
KroneckerProduct n, UCNOT ;
TOF1 MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 1 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 0
 
29 
 





























10000000
01000000
00001000
00010000
00100000
00000100
00000010
00000001
ˆ)ˆˆˆˆˆ1̂1̂(
2
1
ˆ1̂1̂
ˆˆˆ1̂1̂ˆ
nZZYYXXm
nUmG SWAPFredkin
 
 
where SWAPĜ is the SWAP operator, 
 













1000
0010
0100
0001
)ˆˆˆˆˆ1̂1̂(
2
1ˆ ZZYYXXGSWAP . 
 
((Mathematica)) 
 
30 
 
 
 
13. Controlled V gate 
 
Clear "Global` " ; X PauliMatrix 1 ; Y PauliMatrix 2 ;
Z PauliMatrix 3 ; n
0 0
0 1
; m
1 0
0 0
;
I2 IdentityMatrix 2 ;
SWAP
1 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1
;
Fredkin
KroneckerProduct I2, I2, m
KroneckerProduct SWAP, n Simplify;
Fredkin MatrixForm
1 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0
0 0 0 0 1 0 0 0
0 0 0 1 0 0 0 0
0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 1
SWAP
1
2
KroneckerProduct I2, I2 KroneckerProduct X, X
KroneckerProduct Y, Y KroneckerProduct Z, Z ;
SWAP MatrixForm
1 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1
 
31 
 













2221
1211
00
00
0010
0001
)ˆˆˆ1̂1̂ˆ1̂1̂(
2
1
][ˆ
VV
VV
VZVZVC , 
 













2221
1211
00
0100
00
0001
)ˆˆ1̂ˆˆ1̂1̂1̂(
2
1
][ˆ
VV
VV
ZVVZVR , 
 
 
32 
 
 
 
____________________________________________________________________________ 
14. Controlled-U gate 
 





















U
I
0
0
00
00
0010
0001
)ˆˆˆ1̂1̂ˆ1̂1̂(
2
1
][ˆ
2221
1211
UU
UU
UZUZUC
 
Clear "Global` " ; I2 IdentityMatrix 2 ;
X PauliMatrix 1 ; Y PauliMatrix 2 ; Z PauliMatrix 3 ;
V
V11 V12
V21 V22
;
UV
1
2
KroneckerProduct I2, I2 KroneckerProduct Z, I2
KroneckerProduct I2, V KroneckerProduct Z, V ;
RUV
1
2
KroneckerProduct I2, I2 KroneckerProduct I2, Z
KroneckerProduct V, I2 KroneckerProduct V, Z ;
UV MatrixForm
1 0 0 0
0 1 0 0
0 0 V11 V12
0 0 V21 V22
RUV MatrixForm1 0 0 0
0 V11 0 V12
0 0 1 0
0 V21 0 V22
 
33 
 
 













2221
1211
00
0100
00
0001
)ˆˆ1̂ˆˆ1̂1̂1̂(
2
1
][ˆ
UU
UU
ZUUZUR . 
 
)(ˆ HR 
 













0010
0100
1000
0001
ˆ
CNOTR 
 
15. Controlled-CNOT 
 




















X
I
0
0
0100
1000
0010
0001
ˆˆ1̂ˆˆ XnmGCNOT . 
 
16. Fredkin gate 
 





























10000000
01000000
00001000
00010000
00100000
00000100
00000010
00000001
ˆ)ˆˆˆˆˆ1̂1̂(
2
1
ˆ1̂1̂
ˆˆˆ1̂1̂ˆ
nZZYYXXm
nGmG SWAPFredkin
 
 
17. Toffoli gate 
 
 
34 
 











































X
I
I
I
000
000
000
000
01000000
10000000
00100000
00010000
00001000
00000100
00000010
00000001
ˆˆˆ1̂ˆˆ1̂1̂ˆ
)ˆˆ1̂ˆ(ˆ1̂1̂ˆ
ˆˆ1̂1̂ˆˆ
Xnnmnm
Xnmnm
GnmG CNOTtoffoli
 
 
18. R-CNOT 
 













0010
0100
1000
0001
ˆˆˆ1̂ˆ nXmRCNOT . 
 
19. Swap gate 















1000
0010
0100
0001
)ˆˆˆˆˆ1̂1̂(
2
1
ˆˆˆˆˆˆˆˆˆˆˆˆ
ZZYYXX
mXnXnXmXnnmmGSWAP
 
 
_________________________________________________________________________ 
 







10
01
1̂ , 






01
10
X̂ , 
 





 

0
0ˆ
i
i
Y , 







10
01
Ẑ . 
 
35 
 
 
20. Hadamard gate: 
 








11
11
2
1
Ĥ , 
 









 i
i
e
e
P
0
0ˆ , 
 






  ie
T
0
01ˆ , 
 






 ie
S
0
01ˆ , 
 
_____________________________________________________________________________ 
 



























2221
2221
1211
1211
12
000000
000000
000000
000000
00001000
00000100
00000010
00000001
1̂][ˆ][ˆ
VV
VV
VV
VV
VGVGV 
 









































V
I
V
I
000
000
000
000
000000
000000
000000
000000
00001000
00000100
00000010
00000001
][ˆ1̂ˆ
2
2
2221
2221
1211
1211
23
VV
VV
VV
VV
VGGV
 
 
 
36 
 









































V
V
I
I
000
000
000
000
000000
000000
000000
000000
00001000
00000100
00000010
00000001
)ˆ1̂ˆˆ1̂1̂1̂1̂ˆ1̂1̂1̂(
2
1ˆ
2
2
2221
1211
2221
1211
13
VV
VV
VV
VV
VZVZGV
 
 
______________________________________________________________________________ 
10. Expression for CNOTĜ in terms of Pauli operators X̂ and Ẑ 
We know that the controlled-CNOT gate can be expressed by 
 
XnmGCNOT ˆˆ1̂ˆˆ  . 
 
Here we consider another expressions for the controlled-CNOT gate. We start with 
 
)10(
2
1
 , )10(
2
1
 . 
 
The projection operators are defined by 
 
  











 11
11
2
1
11
1
1
2
1
P̂ , 
 
  














 11
11
2
1
11
1
1
2
1
P̂ . 
 
We note that 
 
1̂ˆˆ   PP . 
 
The operator X̂ can be described as 
 
 
37 
 
 





 PPX ˆˆ
01
10ˆ . 
 
The operator Ẑ can be expressed by 
 
nmZ ˆˆ
10
01ˆ 






 . 
 
Note that 
 
)ˆ1̂(
2
1
ˆ Zm  , )ˆ1̂(
2
1
ˆ Zn  , 
 
since 1̂ˆˆ  nm . 
 
We now introduce the operator (controlled-CNOT gate), which can be generated from 
 













0100
1000
0010
0001
ˆˆ1̂ˆˆ XnmGCNOT . 
 
CNOTĜ is equivalent to the controlled-X gate 
 







X
I
0
0
][ˆˆ XCGCNOT . 
 
This can be derived using the Kronecker product. Since 
 
1̂ˆˆ   PP , XPP ˆˆˆ   , 
 
we get 
 
)ˆ1̂(
2
1ˆ XP  , )ˆ1̂(2
1ˆ XP  . 
 
Then the controlled-CNOT operator can be rewritten as 
 
38 
 
 








PZP
PnmPnm
PnPnPmPm
PPnPPmGCNOT
ˆˆˆ1̂
ˆ)ˆˆ(ˆ)ˆˆ(
ˆˆˆˆˆˆˆˆ
)ˆˆ(ˆ)ˆˆ(ˆˆ
 
 
or 
 
)]ˆ1̂(ˆ)ˆ1̂(1̂[
2
1ˆ XZXGCNOT  . 
 
11. The expression of CNOTĜ in terms of Hadamard gate Ĥ 
The Hadamard gate is defined by 
 
)ˆˆ(
2
1
11
11
2
1ˆ XZH 






 . 
 
Then we get 
 




















00
11
2
1
11
11
00
01
2
1ˆˆ Hm , 
 
)ˆ1̂(
2
1ˆ
11
11
2
1
00
11
11
11
2
1ˆˆˆ XPHmH 


















  . 
 
Noting that 1̂1̂1̂2  and using the property of the Kronecker product, we get 
 
)ˆ1)(ˆ1̂)(ˆ1̂()ˆˆ1̂)(ˆ1̂()ˆˆˆ(1̂ˆ1̂ HmHHmHHmHP   (1) 
 
Similarly, we have 
 





















11
00
2
1
11
11
10
00
2
1ˆˆHn , 
 
)ˆ1̂(
2
1ˆ
11
11
2
1
11
00
11
11
2
1ˆˆˆ XPHnH 





















  . 
 
39 
 
 
Noting that ZZ ˆ1̂ˆ  and using the property of the Kronecker product, we get 
 
)ˆ1̂)(ˆˆ)(ˆ1̂()ˆˆ1̂)(ˆˆ()ˆˆˆ(ˆˆˆ HnZHHnHZHnHZPZ   (2) 
 
From Eqs.(1) and (2), thus we have 
 
)ˆ1̂)(ˆˆˆ1̂)(ˆ1̂(
)ˆ1̂)(ˆˆ)(ˆ1̂()ˆ1)(ˆ1̂)(ˆ1̂(
ˆˆˆ1̂ˆ
HnZmH
HnZHHmH
PZPGCNOT


 
 
 
which can be rewritten as 
 
)ˆ1̂(ˆ)ˆ1̂()ˆ1̂(ˆ)ˆ1̂(ˆˆ HGHHRHGG ZZXCNOT  . 
 
since 
 
ZZ GR ˆˆ  . 
 
12. Matrix representation of Kronecker product for two qubits 
 







00
01
m̂ , 






10
00
n̂ , 1̂ˆˆ  nm . 
 
  











 11
11
2
1
11
1
1
2
1
P̂ ,   














 11
11
2
1
11
1
1
2
1
P̂ , 
 













0000
0000
0010
0001
1̂m̂ , 













1000
0100
0000
0000
1̂n̂ , 
 













0000
0100
0000
0001
ˆ1̂ m , 













1000
0000
0010
0000
ˆ1̂ n , 
 
40 
 
 













0000
0000
0000
0001
ˆˆ mm , 













0000
0000
0010
0000
ˆˆ nm , 
 













0000
0100
0000
0000
ˆˆ mn , 













1000
0000
0000
0000
ˆˆ nn , 
 













0000
0000
0001
0010
ˆˆ Xm , 













0100
1000
0000
0000
ˆˆ Xn , 
 













0000
0001
0000
0100
ˆˆ mX , 













0010
0000
1000
0000
ˆˆ nX , 
 













0000
0000
00
00
ˆˆ 2221
1211
uu
uu
Um , 













2221
1211
00
00
0000
0000
ˆˆ
uu
uu
Un , 
 













0000
00
0000
00
ˆˆ
2221
1211
uu
uu
mU , 













2221
1211
00
0000
00
0000
ˆˆ
uu
uu
nU , 
 













0000
0010
0000
0000
ˆˆˆˆ nXmX , 













0000
0000
0100
0000
ˆˆˆˆ mXnX , 
 
 
41 
 













0000
0010
0100
0000
ˆˆˆˆˆˆˆˆ mXnXnXmX , 
 












 
0000
0000
0011
0011
2
1ˆˆ Pm , 












 
1100
1100
0000
0000
2
1ˆˆ Pn , 
 














 
0000
0000
0011
0011
2
1ˆˆ Pm , 














 
1100
1100
0000
0000
2
1ˆˆ Pn . 
 
13. Equivalence of quantum circuits between ZĜ and ZR̂ 
We show that the controlled-Z gate ZĜ is equivalent to the quantum circuit with ZR̂ . 
((Method-1)) The use of matrices 
 










































1000
0100
0010
0001
1000
0100
0000
0000
0000
0000
0010
0001
ˆˆ1̂ˆˆ ZnmGZ
 
 
 
42 
 










































1000
0100
0010
0001
1000
0000
0010
00000000
0100
0000
0001
ˆˆˆ1̂ˆ nZmRZ
 
 
 
 
Fig. Quantum gates with ZĜ and ZR̂ . 
 
((Method-II) Operation method 
 
1̂
1̂)ˆˆ(
1̂ˆ1̂ˆ
ˆˆˆˆˆˆˆˆ1̂ˆ
)ˆˆ1̂ˆ)(ˆˆ1̂ˆ(ˆ
222
2





nm
nm
ZnZmnZnmm
ZnmZnmGZ
 
 
1̂
)ˆˆ(1̂
ˆ1̂ˆ1̂
ˆˆˆˆˆˆˆˆˆ1̂
)ˆˆˆ1̂)(ˆˆˆ1̂(ˆ
222
2





nm
nm
nZmnZnmZm
nZmnZmRZ
 
 
 
43 
 
1̂
)ˆˆ()ˆˆ(
ˆˆˆˆˆˆˆˆ
ˆˆˆˆˆˆˆˆˆˆˆˆ
)ˆˆˆ1̂)(ˆˆ1̂ˆ(ˆˆ





nmnm
nnmnnmmm
nZZnmZnnZmmm
nZmZnmRG ZZ
 
 
1̂
)ˆˆ()ˆˆ(
ˆˆˆˆˆˆˆˆ
ˆˆˆˆˆˆˆˆˆˆˆˆ
)ˆˆ1̂ˆ)(ˆˆˆ1̂(ˆˆ





nmnm
nnmnnmmm
ZnnZnmZZmnmm
ZnmnZmGR ZZ
 
 
where 
 
0ˆˆ nm , 1̂ˆˆ  nm , 
 
mmZZm ˆˆˆˆˆ  , nnZZn ˆˆˆˆ  . 
 
Since 
 
ZZZZ GRGG ˆ)ˆˆ(ˆ  , RGRR ZZ ˆ)ˆˆ(ˆ  , 
 
we get the relation 
 
ZZ RG ˆˆ  . 
 
The two quantum circuits are equivalent. 
______________________________________________________________________________ 
14. Quantum circuits related to the controlled U-gate 
(a) Quantum circuit with UnmGU ˆˆ1̂ˆˆ  . 
 
44 
 
 
 
Fig. Controlled-U gate with UnmGU ˆˆ1̂ˆˆ  . Û is the 2x2 matrix. 
 








































2221
1211
2221
1211
00
00
0010
0001
00
00
0000
0000
0000
0000
0010
0001
ˆˆ1̂ˆˆ
uu
uu
uu
uu
UnmGU
 
 
(b) Quantum circuit with nUmRU ˆˆˆ1̂ˆ  
 
 
 
 
45 
 
Fig. Quantum circuit with nUmRU ˆˆˆ1̂ˆ  . Û is the 2x2 matrix. 
 














2221
1211
00
0100
00
0001
ˆˆˆ1̂ˆ
uu
uu
nUmRU
 
_____________________________________________________________________________ 
15. Qauntum circuits related to the controlled-CNOT 
 
 
 
Fig. Controlled-CNOT with XnmGCNOT ˆˆ1̂ˆˆ  
 








































0100
1000
0010
0001
0100
1000
0000
0000
0000
0000
0010
0001
ˆˆ1̂ˆˆ XnmGCNOT
 
 
___________________________________________________________________________ 
 
 
46 
 
 
 
Fig. Quantum gate with Controlled-CNOT between 1 and 2. with 
1̂ˆˆ1̂1̂ˆ1̂ˆˆ 12  XnmGG CNOTCNOT . 
 





























00100000
00010000
10000000
01000000
00001000
00000100
00000010
00000001
1̂ˆˆ1̂1̂ˆ
1̂ˆˆ 12
Xnm
GG CNOTCNOT
 
 
___________________________________________________________________________ 
 
 
47 
 
 
 
Fig. Quantum gate with Controlled-CNOT between 2 and 3. with 
XnmGG CNOTCNOT ˆˆ1̂1̂ˆ1̂ˆ1̂ˆ 23  . 
 





























01000000
10000000
00100000
00010000
00000100
00001000
00000010
00000001
ˆˆ1̂1̂ˆ1̂
ˆ1̂ˆ 23
Xnm
GG CNOTCNOT
 
 
___________________________________________________________________________ 
 
 
48 
 
 
 
Fig. Quantum gate with Controlled-CNOT between 1 and 3. with 
XnmGCNOT ˆ1̂ˆ1̂1̂ˆˆ 13  . 
 




























01000000
10000000
00010000
00100000
00001000
00000100
00000010
00000001
ˆ1̂ˆ1̂1̂ˆˆ 13 XnmGCNOT
 
 
_________________________________________________________ 
16 R-CNOT gate with nXmRCNOT ˆˆˆ1̂ˆ  
 
 
49 
 
 
 
Fig. Quantum gate with nXmRCNOT ˆˆˆ1̂ˆ  
 








































0010
0100
1000
0001
0010
0000
1000
0000
0000
0100
0000
0001
ˆˆˆ1̂ˆ nXmRCNOT
 
 
17. Quantrum circuits related to the SWAP gate 
 
(a) Swap gate with mXnXnXmXnnmmGSWAP ˆˆˆˆˆˆˆˆˆˆˆˆˆ  
 
 
 
Fig. Swap gate with mXnXnXmXnnmmGSWAP ˆˆˆˆˆˆˆˆˆˆˆˆˆ  
 
 
50 
 


































































1000
0010
0100
0001
0000
0000
0100
0000
0000
0010
0000
0000
1000
0000
0000
0000
0000
0000
0000
0001
ˆˆˆˆˆˆˆˆˆˆˆˆˆ mXnXnXmXnnmmGSWAP
 
 
(b) Quantum circuit 1̂ˆˆ 12  SWAPSWAP GG 
 
 
 
Fig. Quantum circuit including Swap gate between 1 and 2. 1̂ˆˆ 12  SWAPSWAP GG 
 
 
51 
 





























10000000
01000000
00001000
00000100
00100000
00010000
00000010
00000001
1̂ˆˆˆˆ1̂ˆˆˆˆ1̂ˆˆ1̂ˆˆ
1̂ˆˆ 12
mXnXnXmXnnmm
GG SWAPSWAP
 
 
(c) Quantum circuit with SWAPSWAP GG ˆ1̂ˆ 23  
 
 
 
Fig. Quantum circuit including Swap gate between 2 and 3. SWAPSWAP GG ˆ1̂ˆ 23  
 
 
52 
 





























10000000
00100000
01000000
00010000
00001000
00000010
00000100
00000001
ˆˆˆˆ1̂ˆˆˆˆ1̂ˆˆ1̂ˆˆ1̂
ˆ1̂ˆ 23
mXnXnXmXnnmm
GG SWAPSWAP
 
 
(d) Quantum gate with 13ˆSWAPG 
 
 
 
Fig. Quantum circuit including Swap gate between 1 and 3. 13ˆSWAPG 
 
 
53 
 





























10000000
00001000
00100000
00000010
01000000
00000100
00010000
00000001
ˆˆ1̂ˆˆˆˆ1̂ˆˆˆ1̂ˆˆ1̂ˆ
ˆ
13
mXnXnXmXnnmm
GSWAP
 
 
18. Matrix representation of typical tri-qubits 
 



























10000000
01000000
00100000
00010000
00001000
00000100
00000010
00000001
1̂1̂1̂ , 



























00000000
00000000
00000000
00000000
00001000
00000100
00000010
00000001
1̂1̂m̂ , 
 



























00000000
00000000
00000000
00000000
00000000
00000000
00000010
00000001
1̂ˆˆ mm , 



























00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000001
ˆˆˆ mmm 
 
 
54 
 



























00000000
01000000
00000000
00010000
00000000
00000100
00000000
00000001
ˆ1̂1̂ m , 



























00000000
00000000
00000000
00010000
00000000
00000000
00000000
00000001
ˆˆ1̂ mm 
 



























00000000
00000000
00100000
00000000
00000000
00000000
00000010
00000000
ˆˆ1̂ nm 
 



























10000000
01000000
00100000
00010000
00000000
00000000
00000000
00000000
1̂1̂n̂ , 



























10000000
01000000
00000000
00000000
00000000
00000000
00000000
00000000
1̂ˆˆ nn , 
 



























10000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
ˆˆˆ nnn 
 
 
55 
 



























00000000
00000000
00000000
00000000
00001000
00000100
00000000
00000000
1̂ˆˆ nm , 



























00000000
00000000
00100000
00010000
00000000
00000000
00000000
00000000
1̂ˆˆ mn 
 
19 Quantum gates related to the Toffoli gate 
(a) Quantum gate toffoliĜ 
 
 
 
Fig. Toffoli gate with XnnmnmGtoffoli ˆˆˆ1̂ˆˆ1̂1̂ˆˆ  
 
 
56 
 


























































































































X
I
I
I
000
000
000
000
01000000
10000000
00100000
00010000
00001000
00000100
00000010
00000001
01000000
10000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00100000
00010000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00001000
00000100
00000010
00000001
ˆˆˆ1̂ˆˆ1̂1̂ˆˆ XnnmnmGtoffoli
 
(b) Quantum gate with toffoliR̂In the expression of 
 
321321321
ˆˆˆ1̂ˆˆ1̂1̂ˆˆ XnnmnmGtoffoli  
 
we change the number of subscript as 1→3, 2→2, 3→1, 
 
123123123
ˆˆˆ1̂ˆˆ1̂1̂ˆ Xnnmnm  
 
This can be rewrirren as 
 
nnXnmm
nnXnmmRtoffoli
ˆˆˆˆˆ1̂ˆ1̂1̂
ˆˆˆˆˆ1̂ˆ1̂1̂ˆ 321321321


 
 
57 
 
 
 
Fig. Quantum gate nnXnmmRtoffoli ˆˆˆˆˆ1̂ˆ1̂1̂ˆ  . 
 
We note that 
 




























00001000
01000000
00100000
00010000
10000000
00000100
00000010
00000001
ˆˆˆˆˆ1̂ˆ1̂1̂ˆ nnXnmmRtoffoli 
 
20. Quantum gate related to the Fredkin gate 
(a) Quantum gate with SWAPFredkin GnmG ˆˆ1̂1̂ˆˆ  
 
 
58 
 
 
 
Fig. Fredkin gate with SWAPFredkin GnmG ˆˆ1̂1̂ˆˆ  . 
 






























10000000
00100000
01000000
00010000
00001000
00000100
00000010
00000001
ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ1̂1̂ˆ
)ˆˆˆˆˆˆˆˆˆˆˆˆ(ˆ1̂1̂ˆ
ˆˆ1̂1̂ˆˆ
mXnXnnXmXnnnnmmnm
mXnXnXmXnnmmnm
GnmG SWAPFredkin
 
 
where 
 














1000
0010
0100
0001
ˆˆˆˆˆˆˆˆˆˆˆˆˆ mXnXnXmXnnmmGSWAP
 
 
(b) Quantum gate with FredkinR̂ 
 
59 
 
 
 
 
Fig. Modified Fredkin gate with nGmR SWAPFredkin ˆˆˆ1̂1̂ˆ  
 





























10000000
01000000
00001000
00010000
00100000
00000100
00000010
00000001
ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ1̂1̂
ˆˆˆ1̂1̂ˆ
nmXnXnnXmXnnnnmmm
nGmR SWAPFredkin
 
 
21. Quantum circuit equivalence to the Fredkin gate 
 
 
60 
 
 
 
nXmXnmXnXnnnnmmnm
XmnXnXnXnnXn
nmXmXnn
Xnmnnmmnmm
nXnXnXnmXnnXn
mnXmnnXmmnXmnXmXnn
mXmnnmmnnmXmmm
nXXnnmXnnnXmnmmn
nXmmmnXm
nXm
XnnmnmnXmRGR CNOTToffoliCNOT
ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ1̂1̂ˆ
ˆˆˆˆˆˆˆˆˆˆˆˆ
ˆ1̂ˆˆˆˆˆˆ
ˆˆˆˆˆˆˆˆˆ1̂ˆ
)ˆˆˆˆˆˆˆˆˆˆˆˆˆ
ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
ˆˆˆˆˆˆˆˆˆˆˆˆˆ1̂ˆ(
)ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ
ˆˆˆˆ1̂ˆ()ˆˆ1̂ˆ1̂1̂(
)ˆˆ1̂ˆ1̂1̂(
)ˆˆˆ1̂ˆˆ1̂1̂ˆ()ˆˆ1̂ˆ1̂1̂(ˆˆˆ
2
2
22
22
2323











 
 
where 
 
0ˆˆ nm , 0ˆˆ mn , mm ˆˆ 2  , nn ˆˆ2  , 1̂ˆ 2 X , 
 
1̂ˆˆ  nm , 
 
mXXn ˆˆˆˆ  , nXXm ˆˆˆˆ  , 
 
and 
 
 
61 
 





























00100000
01000000
10000000
00010000
00000010
00000100
00001000
00000001
ˆˆ1̂ˆ1̂1̂
ˆ1̂ˆ 23
nXm
RR CNOTCNOT
, 
 




























01000000
10000000
00100000
00010000
00001000
00000100
00000010
00000001
ˆˆˆ1̂ˆˆ1̂1̂ˆˆ XnnmnmGtoffoli
 
 
Thus we have 
 
FredkinCNOTToffoliCNOT GRGR ˆˆˆˆ 2323  , 
 
where 
 
 
62 
 




























10000000
00100000
01000000
00010000
00001000
00000100
00000010
00000001
ˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆ1̂1̂ˆˆ mXnXnnXmXnnnnmmnmGFredkin
 
 
22. Quantum circuit CNOTCNOTCNOT GRG ˆˆˆ equivalent to SWAPĜ 
 
 
 
Fig.a Quantum circuit with CNOTCNOTCNOT GRG ˆˆˆ . 
 
 
 
Fig.b Swap gate with mXnXnXmXnnmmGSWAP ˆˆˆˆˆˆˆˆˆˆˆˆˆ  . 
 
63 
 
 
We show that this quantum circuit is equivalent to the SWAP gate. We note that 
 
nXmRCNOT ˆˆˆ1̂ˆ  , 
 
XnmGCNOT ˆˆ1̂ˆˆ  . 
 
Then we get 
 
nXmXmXnXnnmm
XnmnXmXnmGRG CNOTCNOTCNOT
ˆˆˆˆˆˆˆˆˆˆˆˆ
)ˆˆ1̂ˆ)(ˆˆˆ1̂)(ˆˆ1̂ˆ(ˆˆˆ


 
 
which is the same as 
 
mXnXnXmXnnmmGSWAP ˆˆˆˆˆˆˆˆˆˆˆˆˆ  . 
 
23. Equivalent quantum circuits: XmnXGX CNOT ˆˆ1̂ˆ)1̂ˆ(ˆ)1̂ˆ(  
We show that these two quantum circuits are equivalent to each other. 
 
 
 
Fig.a Quantum circuit with )1̂ˆ(ˆ)1̂ˆ(  XGX CNOT . 
 
which is equivalent to a new type of quantum gate 
 
 
64 
 
 
 
Fig.b Quantum circuit with Xmn ˆˆ1̂ˆ  . Controlled operation with a NOT gate being 
performed on the second qubit, conditional on the first qubit being set to zero. 
 
We note that 
 
XnmGCNOT ˆˆ1̂ˆˆ  , 
 
Then we have 
 
Xmn
XXmXn
XXnXXmX
XXnXmX
XXnmXXGX CNOT
ˆˆ1̂ˆ
ˆˆˆ1̂ˆˆ
ˆˆˆˆ1̂ˆˆˆ
)ˆˆˆ1̂ˆˆ)(1̂ˆ(
)1̂ˆ)(ˆˆ1̂ˆ)(1̂ˆ()1̂ˆ(ˆ)1̂ˆ(
22





 
 
In fact we obtain 
 













1000
0100
0001
0010
)1̂ˆ(ˆ)1̂ˆ( XGX CNOT . 
 
24. Equivalence of two quantum circuits: XZ GHGH ˆ)ˆ1̂(ˆ)ˆ1̂(  
We show that these two quantum circuits are equivalent to each other. 
 
 
65 
 
 
 
Fig.a Quantum circuit with )ˆ1̂(ˆ)ˆ1̂( HGH Z  . 
 
 
 
Fig.b Equivalent quantum circuit with XĜ 
 
ZnmGZ ˆˆ1̂ˆˆ  , XnmGX ˆˆ1̂ˆˆ  . 
 
The quantum circuit can be represented by 
 
X
Z
G
Xnm
HZHnHm
HZnHmH
HZnmHHGH
ˆ
ˆˆ1̂ˆ
ˆˆˆˆˆˆ
)ˆˆˆˆˆ)(ˆ1̂(
)ˆ1̂)(ˆˆ1̂ˆ)(ˆ1̂()ˆ1̂(ˆ)ˆ1̂(
2





 
 
Note that 
 
1̂)ˆˆˆˆˆˆ(
2
1
)ˆˆ)(ˆˆ(
2
1ˆ 222  XZZXZXZXZXH , 
 
 
66 
 
X
ZYZiXYXi
YiZX
ZXZZX
ZXZZXHZH
ˆ
)ˆˆˆˆˆˆ(
2
1
)1̂ˆ)(ˆˆ(
2
1
)ˆˆˆ)(ˆˆ(
2
1
)ˆˆ(ˆ)ˆˆ(
2
1ˆˆˆ
2





 
 
where 
 
ZiXYYX ˆˆˆˆˆ  , XiYZZY ˆˆˆˆˆ  , YiZXXZ ˆˆˆˆˆ  . 
 
25. Equivalence of two quantum circuits; CNOTCNOT RHHGHH ˆ)ˆˆ(ˆ)ˆˆ(  
We show that these two quantum circuits are equivalent to each other. 
 
 
 
Fig.a Quantum circuit with )ˆˆ(ˆ)ˆˆ( HHGHH CNOT  . 
 
 
 
Fig.b Equivalent quantum circuit with nXmRCNOT ˆˆˆ1̂ˆ  . 
 
 
67 
 
We note that 
 
XnmGCNOT ˆˆ1̂ˆˆ  , nXmRCNOT ˆˆˆ1̂ˆ  . 
 
The quantum circuit (Fig.a) is expressed by 
 
ZHnHHmH
HXHHnHHmH
HXHHnHHHmH
HXHnHHmHH
HHXnmHHHHGHH CNOT
ˆˆˆˆ1̂ˆˆˆ
ˆˆˆˆˆˆ1̂ˆˆˆ
ˆˆˆˆˆˆˆˆˆˆ
)ˆˆˆˆˆˆˆ)(ˆˆ(
)ˆˆ)(ˆˆ1̂ˆ)(ˆˆ()ˆˆ(ˆ)ˆˆ(
2





 
 
or 
 
nXm
ZXZ
ZXZX
ZXXHHGHH CNOT
ˆˆˆ1̂
)ˆ1̂(
2
1ˆ)ˆ1̂(
2
1
1̂
)ˆˆˆ1̂1̂ˆ1̂1̂(
2
1
ˆ)ˆ1̂(
2
1
1̂)ˆ1̂(
2
1
)ˆˆ(ˆ)ˆˆ(




 
 
This agrees with 
 
nXmRCNOT ˆˆˆ1̂ˆ  . 
 
((Note)) 
 
ZHXH ˆˆˆˆ  , XHZH ˆˆˆˆ  , 
 
)ˆ1̂(
2
1
ˆ Zm  , )ˆ1̂(
2
1
ˆ Zn  . 
 
)ˆ1̂(
2
1
)ˆˆˆˆ(
2
1ˆ)ˆ1̂(ˆ
2
1ˆˆˆ 2 XHZHHHZHHmH  , 
 
)ˆ1̂(
2
1
)ˆˆˆˆ(
2
1ˆ)ˆ1̂(ˆ
2
1ˆˆˆ 2 XHZHHHZHHnH  . 
 
68 
 
 
26. Construction of the Bell's states 
 
 
 
Entangled qubits 
 
]ˆˆ)ˆ1̂(1̂ˆ)ˆ1̂[(
2
1
ˆˆˆ1̂ˆˆ
)1̂ˆ)(ˆˆ1̂ˆ()1̂ˆ(ˆ
XHZHZ
XHnHm
HXnmHGCNOT



 
 
where 
 
XnmGCNOT ˆˆ1̂ˆˆ  , 
 
)ˆˆ(
2
1ˆ ZXH  , YiXZ ˆˆˆ  , 
 
HZHm ˆ)ˆ1̂(
2
1ˆˆ  , )ˆ1̂(ˆ
2
1
ˆˆ ZHnH  . 
 
The matrix of )1̂ˆ(ˆ HGCNOT is given by 
 















0101
1010
1010
0101
2
1
)1̂ˆ(ˆ HGCNOT 
 
 
69 
 
 
 
)1100(
2
1
1
0
0
1
2
1
00













 . 
 
 
 
)0110(
2
1
0
1
1
0
2
1
01













 . 
 
 
 
)1100(
2
1
1
0
0
1
2
1
10














 . 
 
 
70 
 
 
 
)0110(
2
1
0
1
1
0
2
1
11














 . 
 
___________________________________________________________________________ 
REFERENCES 
 
R.P. Feynman, Feynman Lectures on Computation (Addison-Wesley, 1996). 
G.J. Milburn, The Feynman Processor (Perseus Books, 1998). 
G.P. Berman, G.D. Doolen, R. Mainieri, and V.I. Tsifrinovich, Introduction to Quantum 
Computers (World Scientific, 1998). 
J. Stolze and D. Suter, Quantum Computing A Short Course from Theory to Experiment (Wiley-
VCH, 2004). 
G. Bennet, G. Casati, and G. Strini, Principles of Quantum Computation and Information vol. I: 
Basic Concepts (World Scientific, 2005). 
D.C. Marinescu and G.M. Marinescu, Approaching Quantum Computing (Peason Education, 
Inc., 2005). 
M. Hayashi, Quantum Information An Introduction (Springer, 2006). 
M. Pavičić, Quantum Computation and Quantum Communication: Theory and Experiments 
(Springer 2006). 
P. Kaye, R. Laflamme, and M. Mosca, An Introduction to Quantum Computing (Oxford, 2007). 
M.L. Bellac, A Short Introduction to Quantum Information (Oxford University Press, 2006). 
N.D. Mermin, Quantum Computer Science An Introduction (Cambridge,2007) 
L. Diosi, A Short Course in Quantum Information Theory (Springer, 2007). 
G. Bennet, G. Casati, and G. Strini, Principles of Quantum Computation and Information vol. II: 
Basic Tools and Special Topics (World Scientific, 2007). 
G. Jaeger, Quantum Information An Overview (Springer, 2007). 
D. McMahon, Quantum Computing Explained (Wiley-Interscience, 2008) 
Z. Meglicki, Quantum Computing without Magic Devices (MIT Press, 2008). 
N.S. Yanofsky and M.A. Mannucci, Quantum Computing for Computer Scientists (Cambridge, 
2008). 
S.M. Barnett, Quantum Information (Oxford University Press, 2009). 
 
71 
 
A.D. Vos Reversible, Computing Fundamentals, Quantum Computing, and Applications (Wiley-
VCH, 2010). 
M.A. Nielsen and I.L. Chuang, Quantum Computation and Quantum Information (Cambridge, 
2010). 
D.C. Marinescu and G.M. Marinescu, Classical and Quantum Information (Elsevier, 2010). 
E. Rieffel and W. Polak, Quantum Computing: A General Introduction (The MIT Press, 2011). 
M. Fayngold and V. Fayngold, Quantum Mechanics and Quantum Information (Wiley-VCH, 
2013). 
S. Aaronson, Quantum Computing since Democritus (Cambridge University Press, 2013). 
 
_____________________________________________________________________________ 
Jacques Salomon Hadamard;(8 December 1865 – 17 October 1963) was a French 
mathematician who made major contributions in number theory, complex function theory, 
differential geometry and partial differential equations. 
_____________________________________________________________________________ 
Tommaso Toffoli is a professor of electrical and computer engineering at Boston University 
where he joined the faculty in 1995. He has worked on cellular automata and the theory of 
artificial life (with Edward Fredkin and others), and is known for the invention of the Toffoli 
gate. 
______________________________________________________________________________ 
Edward Fredkin (born 1934) is a distinguished career professor at Carnegie Mellon University 
(CMU) and an early pioneer of digital physics. His primary contributions include his work on 
reversible computing and cellular automata. While Konrad Zuse's book, Calculating Space 
(1969), mentioned the importance of reversible computation, the Fredkin gate represented the 
essential breakthrough. In recent work, he uses the term digital philosophy (DP). During his 
career Fredkin also served on the faculties of MIT in Computer Science, was a Fairchild 
Distinguished Scholar at Caltech, and Research Professor of Physics at Boston University. 
______________________________________________________________________________ 
David Elieser Deutsch, FRS (born 18 May 1953) is a British physicist at the University of 
Oxford. He is a non-stipendiary Visiting Professor in the Department of Atomic and Laser 
Physics at the Centre for Quantum Computation (CQC) in the Clarendon Laboratory of the 
University of Oxford. He pioneered the field of quantum computation by formulating a 
description for a quantum Turing machine, as well as specifying an algorithm designed to run on 
a quantum computer. He is a proponent of the many-worlds interpretation of quantum 
mechanics. 
______________________________________________________________________________