Вы находитесь на странице: 1из 11

Ph219a/CS219a

Solutions Nov 8, 2013

Problem 3.1
(a) Constructing the unitary transformation U1 as given in the circuit, we have U1 = (H I)(P)(H I). In the standard basis, H and P are given by 1 H= 2 1 1 1 1 P = 1 1 0 i (1)

so that H I and (P) have the block diagonal form: 1 HI= 2 I I I I (P) = I P (2)

where is the 2 2 zero matrix and I is the 2 2 identity matrix. Thus, 2 0 0 0 1 0 1+i 0 1i 1 I+P IP = U1 = 0 2 0 IP I+P 2 2 0 0 1i 0 1+i

(3)

Similarly, U2 is given by U2 = (I H)(P)(I H) = (SWAP)U1 (SWAP), since (P) acts symmetrically on the input qubits. Interchanging the second and third rows and columns of U1 , we have, 2 0 0 0 1 0 2 0 0 U2 = (4) 0 0 1 + i 1 i 2 0 0 1i 1+i It is easy to see that U1 and U2 act trivially on the states |u1 = |00 and |u2 = |10 + |11 ) U1 |00 U2 |00 = = |00 |00 1 U1 (|01 + |10 + |11 ) = 2 1 U2 (|01 + |10 + |11 ) = 2 1 (|01 + |10 + |11 ) 2 1 (|01 + |10 + |11 ) 2
1 (|01 2

(5)

1 1 (|10 |01 ) and |u4 = (|01 + |10 2 |11 ), together with |u1 (b) Notice that |u3 = 2 6 and |u2 , form an orthonormal basis for the 2-qubit space. The unitary matrix that transforms from the computational basis to the {|ui } basis is 1 0 0 0 1 1 1 0 3 3 3 V= (6) 1 1 0 0 2 2 1 2 1 0 6 6 6

To express U1 and U2 in the new basis, we simply need to conjugate with V 1 0 0 0 0 1 0 0 (U1 )new = VU1 V = 3( 1+ i ) i 0 0 3+ 4 4 3(1+i) 1+3i 0 0 4 4 1 0 0 0 0 1 0 0 (U2 )new = VU2 V = 3(1i) 3+i 0 0 4 4 3(1i) 1+3i 0 0 4 4 Thus, when restricted to the two dimensional subspace spanned by |u3 and |u4 ,

(7)

(U1 )new =

3+i 4 3(1+i) 4

3(1+i) 4 1+3i 4

(U2 )new =

3+i 4 3(1i) 4

3(1i) 4 1+3i 4

(8)

(c) Working in the basis consisting of identity and the Pauli matrices, suppose U1 = 1 I + 1 X + 1 Y + 1 Z. Equation(7) gives: 1+i i 21 = 1 + i 1 = = 2 2 3(1 + i) i 3i 1 = ( ) Tr(U1 X) = 21 = 2 2 2 Tr(U1 Y) = 21 = 0 1 = 0 Tr(U1 I) = Tr(U1 Z) Thus, U1 = = 21 = 1i 1 = 2 1 1 i n 1 . 2 2 i i ( ) 2 2 (9)

(10) i/2( 3i/2),

with n 1 = ( 3/2, 0, 1/2)T . Similarly, solving for the expansion coecients of U2 , we get, 2 = 2 = 0 and 2 = i/2(i/ 2), so that, U2 = where n 2 = ( 3/2, 0, 1/2)T . 2 i 1 1 i n 2 . 2 2

i/2, 2 =

(11)

(d) Using the results of part(c), we have,


1 U 2 U1

= =

1 i 1 i I+ n I n 1 . 2 . 2 2 2 2 1 i 1 (n 1 n 2 ). + (n 1 . )(n 2 . ) 2 2 2 i2

(12)

Now using the identity (n 1 . )(n 2 . ) = n 1 .n 2 + i (n 1 n 2 ), and computing n 1 .n 2 = 1/2 and n 1 n 2 = (0, 3/2, 0)T , we have, 1 15 1 U2 U1 = I i k. (13) 4 4 = (2/ 5, 1/ 5, 0)T . Thus we see that the operation U1 U1 is a rotation about the with k 2 , by an angle such that cos( ) = 1 . axis k 2 4

Problem 3.2
(a) A monic rational polynomial of degree 1 has exactly one rational root. Therefore the minimal degree monic rational polynomial that has ei 2 as a root must be of atleast degree 2. Since complex roots of rational polynomials must occur in pairs, we can construct the monic rational polynomial of degree 2 as follows 1 P (x) = (x ei 2 )(x ei 2 ) = x2 2 cos( )x + 1 = x2 x + 1 2 2

(14)

(b) Let A(x) = xn 1. Dividing A(x) by the rational polynomial P (x), we obtain rational polynomials Q(x) and R(x) such that A(x) = P (x)Q(x) + R(x) (15)

where R(x) has degree less than that of P (x). Substituting the value x = a, we see that A(a) = 0 and P (a) = 0, implying that R(a) = 0. This leads to a contradiction since P (x) is given to be the minimal degree rational polynomial with root a. Therefore, R(x) must vanish for all values of x, ie. R(x) = 0, x, so that A(x) = xn 1 = P (x)Q(x). (c) Let A(x) =
l

al xl and B (x) = C ( x) =
k

m bm x

, so that, al bm xl+m
l,m

ck xk = A(x)B (x) =

(16)

Clearly, given that A(x) and B (x) are integral, so is C (x). Lets assume C (x) is not primitive, ie. say there exists a prime p that divides all of the coecients ck . Since A(x) and B (x) are primitive, p does not divide all the al s or bm s. Let ar be the lowest-order coecient of A(x) that is not divisible by p and let bs be the lowest-order coecient of B (x) that is not divisible by p. Consider the (r + s)th order coecient of C (x). From equation(15), cr+s = ar bs +
l=r,m=s:l+m=r +s

al bm

(17)

By our assumption, cr+s is divisible by p, and so are all the terms in the summation on the RHS - for every term, either l < r so that al is divisible by p or m < s and bm is divisible by p. This implies that ar bs is divisible by p, ie. one of ar or bs is divisible by p, thus leading to a contradiction. By reductio ad absurdum, C (x) must be primitive. (d) Let r be the lowest common denominator of the coecients of A(x). Therefore, r is the x) where A( x) is integral. Now, suppose A( x) is not smallest integer such that rA(x) = A( 1 r primitive. Then there exists an integer k > 1 such that k A(x) is integral or equivalently, k A(x) r r r is integral. Since A(x) is monic, the highest order coecient of k A(x) is k , and since k A(x) is r integral, k must divide r. Thus we have found an integer k = l < r such that A (x) = lA(x) is integral. This contradicts our initial assumption that r is the smallest integer such that rA(x) x) = rA(x) must be primitive. By a similar argument, is integral. By reductio ad absurdum, A( we can nd an integer s such that B (x) = 1 s B (x) where B (x) is primitive integral. 1 x)B ( x) is a monic integral polynomial. Using the result of Given P (x) = A(x)B (x) = rs A( x) and B ( x) are primitive integral. Since P (x) part(c), A(x)B (x) is primitive integral, since A( x)B ( x) or rs = 1. The rst alternative is integral, either rs must divide all the coecients of A( is not possible, since A(x)B (x) is primitive. Therefore, rs = 1 or equivalently, r = s = 1. (e) Let a be a root of unity, ie. an = 1, for some integer n and P (x) be the minimal degree monic rational polynomial that has a as a root. Then part(b) implies that there exists a monic rational polynomial Q(x) such that xn 1 = P (x)Q(x). Finally, using part(d), since xn 1 is integral, P (x) must be integral too. QED!

Problem 3.3
(a) Representing all gates in the standard basis, HXH HYH HZH PXP1 PYP1 PYP1 = = = = = = 1 2 1 2 1 2 1 0 1 0 1 0 1 1 1 1 1 1 0 i 0 i 0 i 1 1 1 1 1 1 0 1 0 i 1 0 0 1 0 i 1 0 1 0 i 0 0 1 1 0 i 0 0 1 1 0 1 0 1 0 1 2 1 2 1 2 0 i 0 i 0 i 1 1 1 1 1 1 1 1 1 1 1 1 = = = 0 i 0 1 1 0 = = = i 0 1 0 0 1 1 0 0 1 0 i 0 1 i 0 1 0 =Y =X =Z (18) =Z = Y =X

(b) The action of K on the standard basis is given by 1 K = HP1 HPH = 2 4 0 1i 1+i 0 (19)

Once again, by simple matrix multiplication we can prove the following identities KXK KYK = = 1 2 1 2 1 2 0 1i 1+i 0 0 1i 1+i 0 0 1i 1+i 0 0 1 0 i 1 0 1 0 1 0 1i 0 i = =Y 1+i 0 i 0 2 1 0 1i i 0 1 = =X 1+i 0 0 1 0 2 1 0 0 1i 1 0 = = Z 1 1+i 0 0 1 2

KZK =

(c) To construct 2 (Y) using the gate set {H, P, 2 (X)}, we use the identity PXP1 = PXP3 = Y (proved above), so that 2 (Y) = |00 00| I + |01 01| I + |10 10| I + |11 11| Y = = = (|00 00| + |01 01| + |10 10|) PP1 + |11 11| PXP1 (I P) [(|00 00| + |01 01| + |10 10|) I + |11 11| X] (I P1 ) (I P)2 (X)(I P3 ) (20)

Similarly, to construct 2 (Z) we use the identity HXH = Z so that 2 (Z) = (I H)2 (X)(I H). Schematically,

(a) (Y)

(b) (Z)

Finally, we can trivially construct (P) I using 2 (X), 2 (Y) and 2 (Z), since (P) I = = = where we have used XYZ = iZ2 = iI. (d) Recall that (P) = diag(1, 1, 1, i). The real orthogonal matrix corresponding to this, (P)R , acts as follows: (P)R : |x, y, 0 |x, y, 1 (diag(1, 1, 1, 0) |x, y ) |0 + (diag(0, 0, 0, 1) |x, y ) |1 (diag(0, 0, 0, 1) |x, y ) |0 + (diag(1, 1, 1, 0) |x, y ) |1 5 (22) diag(I, I, I, iI) diag(I, I, I, XYZ) 2 (XYZ) = 2 (X)2 (Y)2 (Z) (21)

Thus (P)R acts trivially on all inputs except those with x = y = 1. In this case, it leaves the rst two qubits unchanged and acts on the third qubit as follows: |0 |1 and |1 |0 . This corresponds to doing an XZ gate on the third qubit (conditioned on the rst two qubits being in the |11 state), since XZ = 0 1 1 0 1 0 0 1 = 0 1 1 0 (23)

Hence (P)R is simply a controlled-controlled-XZ gate, ie. (P)R = 2 (XZ). (e) First we note that 2 (XZ) = 2 (X)2 (Z) 2 (X) (Z) 2 (X)2 (Z)
2

= = = =

(|00 00| + |01 01| + |10 10|) I + |11 11| X (|00 00| + |01 01| + |10 10|) I + |11 11| Z (|00 00| + |01 01| + |10 10|) I + |11 11| XZ 2 (XZ) (24)

Then, as shown in part(c), we can construct 2 (Z) using the Tooli gate and the Hadamard gate: 2 (Z) = (IH)2 (X)(IH). Therefore, 2 (XZ) = 2 (X)2 (Z) = 2 (X)(IH)2 (X)(IH). Schematically,

Problem 3.4
(a) Recall that the action of the SWAP gate on 1 0 SWAP = 0 0 the computational basis is given by 0 0 0 0 1 0 1 0 0 0 0 1

(25)

Writing out X X + Y Y + Z Z in the computational basis, we see that, 1 0 0 0 0 1 2 0 XX+YY+ZZ= 0 2 1 0 = 2(SWAP) I4 0 0 0 1 6

(26)

where I4 is the 4 4 identity matrix. Therefore, V( , , ) = exp[ i (X X + Y Y + Z Z) ] 4 4 4 4 = exp[ i (2SWAP I4 ) ] 4 i 4 exp[ i SWAP] = e 2 i = e 4 [ (cos )I + i(sin )SWAP ] 2 2 = ei 4 SWAP

(27)

In the penultimate step, we have used the identity eiA = (cos )I + i(sin )A for any real and any A such that (A)2 = I. Thus, upto an overall phase, V( 4 , 4 , 4 ) is simply the SWAP operation. (b) Writing down V(0, 0, 4 ) in the computational basis, we have, V(0, 0, ) 4 = = = Then, ei 4 (P P)V(0, 0,

exp[ i Z Z] 4 ei 4 diag(1, i, i, 1) ei 4 (|0 0| P1 i |1 1| P)

(28)

) 4

= |0 0| I + |1 1| P2 = (Z) (29)

since P2 = Z. Now to get the CNOT operation, we simply conjugate with the Hadamard gate, so that (X) = ei 4 (I H)(P P)V(0, 0, )(I H) (30) 4 showing that V(0, 0, 4 ) is indeed locally equivalent to (X). (c) Given any operator A and a unitary U, UeiA U = eU(iA)U

(31)

Since the Pauli operators are unitary, we can use this identity to get, (I X)V(x , y , z )(I X)V(x , y , z ) = = = exp[ i(I X)(x X X + y Y Y + z Z Z)(I X) ]V exp[ i(x X X + y Y XYX + z Z XZX) ]V exp[ i(x X X y Y Y z Z Z) ]V(x , y , z ) (32)

= V(x , y , z )V(x , y , z ) = V(2x , 0, 0) Similarly, we can show, (I Y)V(x , y , z )(I Y)V(x , y , z ) (I Z)V(x , y , z )(I Z)V(x , y , z ) 7 = V(0, 2y , 0) = V(0, 0, 2z ) (33)

(d) Once again, working in the computational basis, V(0, 0, ) = = Let = Then, equation(34) implies [I ]V(0, 0, ) = |0 0| I + |1 1| e2i 0 0 e2i (36) exp[iZ Z] = diag(ei , ei , ei , ei ) ei 0 ei |0 0| + |1 1| 0 ei 0 ei 0 0 ei

0 ei

(34)

(35)

= |0 0| I + |1 1| R( z , 4) (I )V(0, 0, ) = [R( z , 4)]

where R( z , 4) = e2iZ is a rotation about the z axis. This shows an equivalence between V(0, 0, ) and [R( z , 4)] ie. a controlled rotation by 4 about the z axis. Now to get a controlled rotation about an arbitrary axis n , we need to conjugate by a unitary that rotates between the eigenvectors of z . (= Z) and n . . If |n , + and |n , denote the eigenvectors of n . , the required unitary operation is Un , + 0| + |n , 1| = |n so that Un z , 4 ) U R( n = = = Un e2i 0 0 e2i U n (37)

e2i |n , + n , +| + e2i |n , n , | R( n, 4) (38)

Thus, conjugating both sides of equation(36) with I Un , we have,


(I Un n, 4)] )(I )V(0, 0, )(I Un ) = [R(

(39)

showing that V(0, 0, ) is indeed locally equivalent to a controlled rotation about an arbitrary axis on the Bloch sphere. (e) We know from parts (c) and (d) that any 2-qubit, entangling gate of the form V(x , y , z ) can be used, in combination with single qubit unitaries to realize a gate of the form V(0, 0, 2z ). Further, this is locally equivalent to [R( z , 4z )], a controlled rotation by 2z about the z-axis. Now, to prove the Lemma, let us consider the following two cases: (i) /4 is an integral multiple of 2|z | :In this case, 2q |z | = /4 for some positive integer q , and the Lemma is proved trivially V(x , y , z ) [R( z , 4z )]

(q times) q [R( z , 4z )] = [R( z , 4qz )] = [R( z , /2)] V(0, 0, ) 2 (X) (from part(b)) 8

(40)

where implies that two gates are locally equivalent. (ii) /4 is not an integral multiple of 2|z | :In this case, we need to use another gate to make up for the dierence. Let q = [ /8|z | ], where [.] denotes the greatest integer function. Then, we need to implement [R( z , )], ie. a controlled rotation by 0 < || = /4 2q |z | < 2|z | about the z-axis, to realize (X). To construct such a gate, rst note that the product of two controlled rotations [R( n, )] and [R(n , )] is also a controlled rotation whose axis of rotation and magnitude depends , , and . Thus, if we construct the gate [R( on n , n n, z )] for some arbitrary axis n (as described in part(d)), the product [R( z , z )][R( n, z )] is a controlled rotation [R(m, )], whose axis of rotation m and angle of rotation are given by cos() sin()m = = cos2 (z ) sin2 (z ) z .n sin(z ) cos(z )( z+n ) sin2 (z )( nz ) (41)

For a given z , varies continuously as a function of n . Then, by the Intermediate Value 1 Theorem , it takes all possible values in the interval [0, 2z ]. It is therefore possible to choose n such that we get the desired angle of rotation, = /4 2q |z |. Finally, to rotate the axis of rotation from m to the z-axis, we need to implement the local unitary U m , which was dened in equation(37) above. To summarize, V(x , y , z ) (I U z , z )][R( n, z )](I m )[R( Um ) = = Putting together cases (i) and (ii), we see that (X) [R( z, = = )] 2 [R( z , z )] [R( n, z )] (I U )](I Um ) m )[R(m, [R( z , 2q |z |)] 4

(42)

2q |z |)] 4 q [R( z , 4z )](I U z , z )][R( n, z )](I Um ) m )[R( [R( z , 4qz )][R( z, (43)

q [R( z , 4z )][R( z , z )][R( n, z )]

for an appropriate choice of n , obtained by solving equations(41). The gates in the nal step are all locally equivalent to a generic 2-qubit gate of the form V(x , y , z ) (provided x = y = z ) = {0, 4 }), thus proving the Lemma!

Problem3 3.5
a) A problem of size n is in BQP if there exists a polynomial-size uniform circuit family that depends on n, where for each such circuit the state for the rst output qubit is |0 (resp. |1 )
1 Suppose that f : [a, b] R is continuous and that u is a real number satisfying f (a) < u < f (b) or f (a) > u > f (b). Then for some c [a, b], f (c) = u

with probability at least 2/3 if the correct answer is 0 (resp. 1). Recall that, according to our model, the input qubits to each circuit are prepared in the standard state |0 n which we will denote as |0 for simplicity. If U is the unitary implemented by the quantum circuit, the output state is therefore U |0 . Let P0 be the projector onto the state (|0 0|)1 on the rst qubit. Then, the probability of obtaining the outcome 0 after measuring the rst output qubit is P (0) = 0|U (P0 In1 )U |0 . where In1 is the identity operator acting on all qubits except for the rst. We can now view V = U (P0 In1 )U as a new matrix, so that the classical simulation of the quantum computation executed by U reduces to the calculation of the matrix element 0|V |0 . We note that V consists rst of the unitary U , then of the projector onto the |0 state on the rst qubit, and nally of the inverse of the quantum circuit U 1 . This is reminiscent of the idea used by Bennett to show that reversible classical computation (i.e., computation in which no junk bits are produced and which can be performed with zero thermodynamic cost) is possible. b) We can write V = VL . . . V2 V1 where each Vi is either a Hadamard gate (H ), or a Tooli gate ((X )), or a projection P0 tensored with the identity on all qubits on which it acts trivially. Therefore, our classical simulation will need to compute the matrix element 0|VL . . . V2 V1 |0 . For every Tooli gate in this expression, we can insert the identity in the form I = H 2 following it on its target qubit. This way we obtain a new V , say V , of size S 2L, and let us denote by h the number of Hadamard gates it contains. Then we need to compute 1 P (0) = 0|VS . . . V2 V1 |0 , (45) 2h where for every Hadamard gate in V we have collected the 1/ 2 normalization in front of the expression and replaced the corresponding gate Va = H by the gate Va = 2H . We now note that 2H acts in the computation basis as
1

(44)

2 H : |i
j =0

(1)ij |j .

(46)

Similarly, for the Tooli gate (X ) : |i, j, k |i, j, k ij , (47)

which, when combined with the two Hadamard gates following it by the construction of V , becomes
1

(I I H )(X ) (I I H 2 )(X )

: |i, j, k : |i, j, k

(1)(kij )l |i, j, l ,
1

l=0 1

(48) (1)(kij m)l |i, j, m .

l=0 m=0

The result now follows. The initial state is a state in the computation basis (i.e., all qubits in the state |0 ). For every Hadamard gate initially in V , we can use Eq. (46) to generate a new 10

index and express the output state in the computation basis. For every (X ) gate initially in V , we can group it with the two Hadamard gates we inserted to obtains V and use Eq. (48) to generate two new indices. At the end of the computation we project onto the |0 state, so that all free indices at that point are forced to take the value 0. Thus we have reduced the calculation of P (0) in Eq. (45) to the calculation of a sum over h 2L intermediate binary indices of the form 1 P (0) = (1)(x) , (49) 2h x where x is a binary vector with the h intermediate indices as components and (x) is a polynomial of degree at most three in the intermediate indices. If N0 (resp. N1 ) is the number of values of x for which (x) = 0 (resp. (x) = 1), it follows that 1 P (0) = (N0 N1 ) . 2h (50)

11

Вам также может понравиться