quantum fourier transform · quantum fourier transform school on quantum computing @yagami day 2,...

33
Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and Physico-Informatics, and CREST-JST, Keio University

Upload: others

Post on 29-Jun-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Quantum Fourier TransformSchool on Quantum Computing @Yagami

Day 2, Lesson 19:00-10:00, March 23, 2005

Eisuke AbeDepartment of Applied Physics and Physico-Informatics,

and CREST-JST, Keio University

Page 2: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Outline

Quantum Fourier transformDefinition and examplesPower of QFTProduct representationQuantum circuit for QFT

Order finding algorithmOrder of permutationExampleRemarks

Page 3: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Quantum Fourier transform

Definition

∑−

=⎟⎠⎞

⎜⎝⎛⎯⎯⎯ →⎯

1

02exp1 N

k

N kNjki

NQFTj π

( )

Hk

kijkQFTj

k

jk

k

=−=

⎯⎯⎯ →⎯

=

=1

0

1

0

2

)1(2

1

exp2

1 π

( )⎩⎨⎧

=−=

=)1(1)0(1

expjkjk

ijkπ

Example; N = 2

QFT2 is Hadamard

We treat only N = 2n

Page 4: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QFT8

Example; N = 8

∑∑==

=⎟⎠⎞

⎜⎝⎛⎯⎯⎯ →⎯

7

0

7

0

8

81

82exp

81

k

jk

kkkjkiQFTj ωπ

( ) ii =≡ 8/2exp πω

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

=

1234567

246246

3614725

4444

5274163

642642

7654321

111

11111

111

111111111

81

8

ωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωω

QFT

ω

81 ω=

04 =+ +ii ωω

Page 5: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QFT8

∑∑==

⎯⎯⎯ →⎯7

0

87

0 kk

kj kQFTj βα

input string {αj} output string {βk}0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

N/r

8 1 0 0 0 0 0 0 0 → 1 1 1 1 1 1 1 1 14 1 0 0 0 1 0 0 0 → 1 0 1 0 1 0 1 0 22 1 0 1 0 1 0 1 0 → 1 0 0 0 1 0 0 0 41 1 1 1 1 1 1 1 1 → 1 0 0 0 0 0 0 0 8

r

076543210406420

642040765432100

→++++++++→+++

+++→++++++++→

QFT inverts the periodicity

Page 6: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QFT8

input string {αj} output string {βk}0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

N/r

4 1 0 0 0 1 0 0 0 → 1 0 1 0 1 0 1 0 2

r

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

++

++

++

++

=

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

01010101

//

111

111

111

111

00010001

111

11111

111

111111111

4

4

4

4

1234567

246246

3614725

4444

5274163

642642

7654321

ω

ω

ω

ω

ωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωω i=ω

Page 7: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QFT8

input string {αj} output string {βk}0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7

N/r

2 1 0 1 0 1 0 1 0 → 1 0 0 0 1 0 0 0 4

r

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

+++++++++

++++++

++++++

+++

=

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

00010001

//

111

11111

111

11111

01010101

111

11111

111

111111111

246

44

642

246

44

642

1234567

246246

3614725

4444

5274163

642642

7654321

ωωωωωωωω

ωωωωωωωω

ωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωω

04 =+ +ii ωω

Page 8: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QFT8

input string {αj} output string {βk}0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 71 0 0 0 1 0 0 0 1 0 1 0 1 0 1 00 1 0 0 0 1 0 0 1 0 i 0 −1 0 i 00 0 1 0 0 0 1 0 1 0 −1 0 1 0 −1 00 0 0 1 0 0 0 1 1 0 − i 0 −1 0 i 0

Period 4

642073642062642051

642040

ii

ii

+−−→+−+−→+−−+→++++→+

Offsets in the input are converted into phase factors in the output (shift invariance)

Page 9: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QFT8

input string {αj} output string {βk}0 1 2 3 4 5 6 7

0 1 2 3 4 5 6 70 1 0 0 0 1 0 0 1 0 i 0 −1 0 i 0

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

++++++++

=

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

0

01

0

01

//

11

00100010

111

11111

111

111111111

37

66

15

44

73

22

51

1234567

246246

3614725

4444

5274163

642642

7654321

i

i

ωωωωωωωωωωωωωω

ωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωωω i=ω

Page 10: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QFT8

input string {αj}r0 1 2 3 4 5 6 7

N/r

3 1 0 0 1 0 0 1 0 2.67

0 1 2 3 4 5 6 7

Ampl

itude

|βk|2

k

If r does not divide N, the inverse of the period is approximate

Page 11: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Power of QFTOur observation so far can be summarized as follows

∑∑−

=

=⎟⎠⎞

⎜⎝⎛⎯⎯⎯ →⎯+

1

0

1/

02exp1 r

k

NrN

jk

rN

rmki

rQFTmjr

Nr π

Period Offset Phase Inverse of the period

In the next few slides, we simply assume r divides N

Page 12: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Power of QFT

Proof

∑ ∑

∑ ∑

=

=

=

=

=

⎟⎠⎞

⎜⎝⎛

⎟⎠⎞

⎜⎝⎛→

⎟⎠⎞

⎜⎝⎛ +

+

1

0

1/

0

1

0

1/

0

1/

0

2exp2exp

)(2exp1

N

k

rN

j

N

k

rN

j

rN

j

kNjrki

Nmki

Nr

kN

kmjriNr

N

mjrNr

ππ

π

∑−

=⎟⎠⎞

⎜⎝⎛→

1

02exp1 N

kk

Njki

Nj π

2 cases; k divides N/r or not

Page 13: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Power of QFT

( )∑∑−

=

=

=′=⎟⎠⎞

⎜⎝⎛ 1/

0

1/

02exp2exp

rN

j

rN

j rNkij

Njrki ππ

krNk ′=Case 1

Constructive interference

( ) 12exp =′kijπ

10:10:

−→′−→

rkNk

∑ ∑

=

=′

=

=

⎟⎠⎞

⎜⎝⎛=

′××⎟⎠⎞

⎜⎝⎛ ′=

⎟⎠⎞

⎜⎝⎛

⎟⎠⎞

⎜⎝⎛

1

0

1

0

1

0

1/

0

2exp1

2exp

2exp2exp

r

k

r

k

N

k

rN

j

krN

rmki

r

krN

rNk

rN

Nmi

Nr

kNjrki

Nmki

Nr

π

π

ππ

Page 14: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Power of QFT

∑∑−

=

=

==⎟⎠⎞

⎜⎝⎛ 1/

0

1/

002exp

rN

j

jrN

j Njrki λπ

krNk ′≠Case 2

∑−

=

=−

−=

⎟⎠⎞

⎜⎝⎛≡

1/

0

/

01

1

2exp

rN

j

rNj

Nrki

λλλ

πλ

Destructive interference

∑∑−

=

=⎟⎠⎞

⎜⎝⎛⎯⎯⎯ →⎯+

1

0

1/

02exp1 r

k

NrN

jk

rN

rmki

rQFTmjr

Nr π

Combining Case 1 & 2, we obtain

Again, quantum interference is the key

Page 15: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Product representation

( )( ) ( )2/

211

21

21).02exp(01).02exp(01).02exp(0

nnnnn

n

jjjijjijijjj

LL

L

πππ +++→ −

∑=

−−− =+++==n

k

knkn

nnn jjjjjjjj

1

022

1121 2222 LL

∑=

−−−− =+++=n

k

kk

nnn jjjjjjj

1

22

1121 2222.0 LL

Notation

This representation provides a natural way to construct a quantum circuit for QFT, and a proof that QFT is unitary

Page 16: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Product representation

[ ]( )( ) ( )101010

21

1)22exp(02

1

)22exp(2

1

)22exp(2

1

)22exp(2

1

)2/2exp(2

1

211

1

1

.02.02.022/

12/

1

012/

1

0 1

1

02/

1

01

1

1

02/

12

02/

nnnn

l

n

n

n

jjjijjijin

ln

ln

kl

ll

n

ln

kl

ll

n

lkn

kn

n

l

ll

kn

k

nn

eee

ij

kijk

kijk

kkkij

kijk

j

LL

L

LL

πππ

π

π

π

π

π

+++=

+=

⎥⎦

⎤⎢⎣

⎡=

=

=

=

=

=

=

==

= =

=

=

∑⊗

∑⊗∑

∑ ∑∑

∑ ∑∑=

=

− ==n

l

ll

n

l

lnlnn kkk

11

2221

2

[ ] [ ]2211

2121

)exp()exp()exp(

kkkk

αααα

⊗=⊗+

[ ]

⎥⎦

⎤⎢⎣

⎡⊗⎥

⎤⎢⎣

⎡=

∑∑

∑ ∑

==

= =

1

022

1

011

1

0

1

02211

21

1 2

)exp()exp(

)exp()exp(

kk

k k

kk

kk

αα

αα

1)2exp(.2

1

11

==

+−−−

ln

nlnlnl

jijjjjjj

L

LL

π

Page 17: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Quantum circuit for QFT

L

M

1j

2j

1−nj

nj

( )( ) ( )1).02exp(01).02exp(01).02exp(02

12212/ nnnn jijjijjji πππ +++ LLL

H R2

H R2 Rn

H Rn-1

H

L

L

L

⎥⎦

⎤⎢⎣

⎡≡

)2/2exp(001

kk iR

π

( )( ) ( )1).02exp(01).02exp(01).02exp(02

12112/ nnnnn jjjijjiji LL πππ +++ −

SWAP

Page 18: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Quantum circuit for QFT

21).02exp(0 ajiπ+

( )⎩⎨⎧

=−=

=)1(1)0(1

.02expa

aa j

jjiπ

Haj

Rkaj

bj

ab jji )00.02exp( Lπ

bj

( )⎩⎨⎧

==

=)1()2/2exp()0(1

00.02expa

ka

b jij

jiπ

π L

k digits

Page 19: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Quantum circuit for QFT( )10

21

1.02 njjie Lπ+

( )

( )

( ) nn

n

nn

jjjjji

jjjji

jjjijjj

LL

M

L

LL

221

221

2121

1).02exp(02

1

1).02exp(02

1

1).02exp(02

1

π

π

π

+→

+→

+→

1j

2j

1−nj

nj

H R2 Rn-1 RnL

M

Page 20: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Quantum circuit for QFT

( )

( ) ( )

( )( )

( )( ) nnn

nn

nn

nn

jjjjijji

jjjjijji

jjjijji

jjjjji

LLL

M

LL

LL

LL

321

3321

321

321

1).02exp(01).02exp(021

1).02exp(01).02exp(021

1).02exp(02

11).02exp(02

1

1).02exp(02

1

ππ

ππ

ππ

π

++→

++→

++→

+

nj

( )102

11.02 njjie Lπ+

2j H R2 Rn-1L

M3j

( )102

12.02 njjie Lπ+

Page 21: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Quantum circuit for QFT

L

M

1j

2j

1−nj

nj

( )( ) ( )1).02exp(01).02exp(01).02exp(02

12212/ nnnn jijjijjji πππ +++ LLL

H R2

H R2 Rn

H Rn-1

H

L

L

L

( )( ) ( )1).02exp(01).02exp(01).02exp(02

12112/ nnnnn jjjijjiji LL πππ +++ −

SWAP

Page 22: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Quantum circuit for QFT8

( )( )( )1010108

1321323 .02.02.02 jjjijjiji eee πππ +++

TH S

H S

H

34/

2

001

001

Re

T

Ri

S

i =⎥⎦

⎤⎢⎣

⎡=

=⎥⎦

⎤⎢⎣

⎡=

π

1j

2j

3j

Page 23: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Order of permutation

y π (y)

0 31 72 53 14 25 46 67 0

Order of the permutation π (y);the least positive integer r that satisfies

00 )( yyr =πGenerally, r depends on y0, and finding r may be hard

Page 24: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Order of permutation

y π (y)

0 31 72 53 14 25 46 67 0

0 1 2 3 4 5 6 7π 1(0)

π 2(0)

π 3(0)π 4(0)

r = 4

2 4 5 6π 1(2)

π 2(2)π 3(2)

r = 3

6π 2(6)r = 1

Page 25: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Order finding

Find r quantum mechanicallyy π (y)

0 31 72 53 14 25 46 67 0

3 1 7 0π 1(3) π 2(3) π 2(3)

π 4(3)

0)3()3()3()3(7)3()3()3()3(

1)3()3()3()3(3)3()3()3()3(

151173

141062

13951

12840

==========

==========

L

L

L

L

ππππππππ

ππππππππ

r = 4

Page 26: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Order finding algorithm

H⊗n QFTΠy

n⊗0

y

n2

)(yxyx xy π=Π

For now, we accept that Πy is given as a black box, or imagine a situation similar to Deutsch’s problem(i.e., Alice wants to know the order, and Bob has π(y))

Page 27: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Order finding algorithm

H⊗4 QFT16

Π3

40 ⊗

1103 =

register bits

work bits

∑=

15

03

41

xx

)3(33xxx π=Π

∑=

15

0)3(

41

x

xx πΠ3

Encode information on π x(3) into the work bits

H⊗430 4⊗

Page 28: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Order finding algorithm

H⊗4 QFT16

( ) ( )( ) ( ) 01511737141062

113951312840)3(15

0

++++++++

+++++++=∑=x

xx π

0)3()3()3()3(7)3()3()3()3(

1)3()3()3()3(3)3()3()3()3(

151173

141062

13951

12840

==========

==========

L

L

L

L

ππππππππ

ππππππππ

( )( )( )( ) 012840

712840112840

312840

+−−+−+−+−−+

++++

i

ii

QFT16

Π

40 ⊗

31103 =

Page 29: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Order finding algorithm

H⊗4 QFT16

Either 0, 4, 8, 12

Π

40 ⊗

31103 =

( )( )( )( ) 012840

712840112840

312840

+−−+−+−+−−+

++++

i

ii

∑∑−

=

=⎟⎠⎞

⎜⎝⎛⎯⎯⎯ →⎯+

1

0

1/

02exp1 r

k

NrN

jk

rN

rmki

rQFTmjr

Nr π

Page 30: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Order finding algorithm

Fail (No info. on r)

⎪⎪⎩

⎪⎪⎨

=⇒

⎪⎪⎩

⎪⎪⎨

=

4/32/14/1

0

12840

16rk

rk Succeed

Fail (Wrong r)

Succeed

The algorithm fails if k = 0, or k and r have common divisors (Not so serious)

rrk

loglog1)1)/(gcd(Prob ≈=

Page 31: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

Remaining issues

The measurement does not give us r itself, then how to obtain r out of the measurement result?What if r does not divide N?How to construct the Πy gate?If it remains a black box, how can the algorithm be useful?

Page 32: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QuizContinued fraction expansion

“Convergent”Definition

],,,[

11

11

10

1

1

0

m

mm

aaaa

a

aa

L

O

++

++=

α

],,,,[

],,,[

1],[

][

110

1101

1

1010

1

1

000

0

mmm

m

mm

m

aaaaqp

aaaqp

aaaa

qp

aaqp

−−

=

=

+==

==

L

L

M

Page 33: Quantum Fourier Transform · Quantum Fourier Transform School on Quantum Computing @Yagami Day 2, Lesson 1 9:00-10:00, March 23, 2005 Eisuke Abe Department of Applied Physics and

QuizCheck that the continued fraction expansion for 31/13 and its convergents are given as follows

1331]2,1,1,2,2[

512]1,1,2,2[

37]1,2,2[

25]2,2[

2]2[

4

4

3

3

2

2

1

1

0

0

==

==

==

==

==

qpqpqpqpqp

211

11

12

12]2,1,1,2,2[1331

++

++==

Also check the following

]4,170,2,2,2,0[81923413

=