Physics 4481-7681; CS 4812 Problem Set 4 Six problems (six pages), all short, covers lectures 11 15, due in class 25 Oct 2018 Problem 1: 1-qubit state tomography Consider a 1-qubit state ψ cos θ 2 0 + sin θ 2 eiφ 1. Given a single copy of the state, it would be impossible to measure the parameters θ and φ, but suppose we can prepare the state reproducibly (by focusing a microwave pulse of the right frequency and duration or otherwise preparing an ion, superconducting qubit, nitrogen-vacancy center, photon,... this does not violate the no-cloning theorem by copying some unknown state, rather it involves repeatedly preparing a state in some known manner for measurement purposes). a) Suppose we measure the state N times, and N 0 of those times measure state 0, and N 1 times measure state 1. For large enough N, how can the value of θ be estimated in terms of those measurements? Relate θ to the expectation value of the Z operator ψ Z ψ. b) Now suppose we again prepare the state some large number of times, but now apply a Hadamard H before measuring the state, and find that 0 is measured N0 H times, and 1 is measured N1 H times. Show how the value of φ can be estimated in terms of N0 H and N1 H (and the above-determined θ). Relate this quantity to the expectation value of the X operator. c) As was pointed out in class, the above only determines the value of φ up to a sign. What measurement could be used to determine the sign of φ? d) Suppose we apply the operator u( ˆm, α) e i α 2 ˆm σ to the above state ψ. What is the effect on θ and φ in terms of ˆm and α? (try it first for ˆm ẑ or to ˆm (sin φ, cos φ, 0)) [In general, quantum state tomography determines the amplitudes based on repeated measurement of a state prepared in the same (known) way. The extent to which the measured values are equal to the expected values θ, φ values are quantified as the fidelity of the state preparation, to be considered in a later problem set.] 1
Problem 2: Experimental realization of W-state W 1 3 001 + 010 + 100 a) Write down a circuit to construct the 3-qubit W-state W. (One way to do this uses a 1-qubit gate u(ŷ, α) with cos α 1/3, plus two cnots, a C H, and an X. If you use these, also write down a separate circuit for constructing the controlled-hadamard C H.) b) Another way to construct the W-state is given in fig.1c of arxiv:1004.4246 (as shown in class): 0i exp( i 2 0i Z 4 /3 Wi 0i 4 S) 9 which they describe as using a single entangling step with simultaneous coupling between all three qubits. The entangling operation is turned on for a time t W (4/9)t iswap, where t iswap is the time needed to complete an iswap gate between two qubits. Translated, that means (see prob 8c of probset 3) applying the operator exp( i(π/2)(4/9)s), where the symmetric 3-way interaction S S 01 + S 02 + S 12 is the sum of 2-qubit interactions S ij 1 2 (X ix j +Y i Y j ). Show that the above circuit produces the W-state up to an overall unobservable phase. Note that S vanishes on the states 000 and 111. Letting P be the projector on the remaining six states, it is easy to show that S 2 2P + S, so that the operator N (2/3)(S P/2) satisfies N 2 P (i.e., N 2 1 on the projected subspace), making it easy to calculate exp(iαn). 2
Problem 3: Quantum universality exercise Consider three 1-qubit gates corresponding to the 2 2 unitary (SU(2)) transformations: a b c d α β W b a, V d c, U β α. Assuming you have 2-qubit controlled versions of these gates (as explained in class, this can always be done with controlled Swap), together with any of X, C, H (plus as well the uncontrolled 1-qubit gates W, V, U), draw a 2-qubit circuit diagram for each of the following 4 4 unitary transformations (written in the usual 00, 01, 10, 11 basis) in parts (a,b,c): a) (i) a b 0 0 W 0 b a 0 0 0 1 0 0 1 0 0 0 0 1 (ii) 1 0 0 W 0 1 0 0 0 0 a b 0 0 b a (iii) W 0 0 W a b 0 0 b a 0 0 0 0 a b 0 0 b a (iv) 0 W W 0 0 0 a b 0 0 b a a b 0 0 b a 0 0 a 0 b 0 a 0 0 b 0 1 0 0 0 1 0 0 b) (i) b 0 a (ii) 0 0 0 1 0 0 0 0 1 b 0 0 a 0 a 0 b 0 a b 0 0 1 0 0 (iii) (iv) 0 0 1 0 0 b a (v) 0 0 0 a b 0 b 0 a 0 0 0 1 0 0 b a α 0 β 0 α1 β1 0 α 0 β c) (i) β 1 α 1 β 0 α 0 (ii) W 0 0 V (iii) 1 2 ( 1 W 2 W 0 β 0 α ) V αw βv (iv) V β W α V d) Finally, write down the 3-qubit circuit diagram for this 8 8 unitary transformation (Hint: look for the H pattern) W 0 W 0 0 V 0 V W 0 W 0 0 V 0 V 3
e) (Bonus, though not all that hard). Use the forms of a)i,ii and b)i,ii,iii,iv above to show that an arbitrary 2-qubit gate (a 4 4 unitary in U(4)) can be always be written in terms of controlled 2 2 unitaries (controlled 1-qubit gates). The procedure is reminiscent of gaussian elimination and generalizes immediately to the general n-qubit gates, providing the last step of the quantum universality argument (that arbitrary n-qubit gates can be decomposed to some number of cnots and 1-qubit gates). 4
Problem 4: Defeating RSA encryption with period finding. I Here we examine RSA encryption and how it can be defeated by an efficient periodfinding program, by working everything out in a particular case. To get a better feeling for what is involved, try doing this without a computer or calculator. (a) The two numbers Bob announces publicly are N 55 and c 17. Let Alice s message a be 9. What number between 1 and 54 is Alice s encrypted message b a c (mod 55)? Rather than using a calculator, note that 17 in binary is 10001, so you can work it out efficiently by listing 9 2 mod 55, 9 4 mod 55, etc. Your write-up should list the values of all the powers of 9 modulo 55 that you had to calculate to construct b. (If easier, a few can be given as negative numbers modulo 55.) (b) Since you have in your head the computational resources needed to find the prime factors of 55, you are in a position to find Bob s decoding number d. What is it? (This can be done using the Euclidean algorithm described in Appendix I.) Confirm that b d a (mod 55), by the same process of successively squaring used in (a). (c) Eve, listening in to the public communication picks up Bob s publicly announced N 55 and c 17 as well as Alice s encoded message b. Using her quantum computer she calculates the period r of b modulo N. What is r? Although you lack a quantum computer you can factor N in your head, and therefore know the order of G N. Since r must divide that order there are not very many possibilities to examine. (d) Find the inverse d of c modulo r. (This is simple enough not to need Euclid s algorithm.) Confirm that b d a(mod 55). Problem 5: Defeating RSA encryption with period finding. II Now suppose Bob sends N 143 and c 53 over a public channel to Alice, who uses them to encode her message a and sends back the encoded message b 19 to Bob. (In the below, feel free to use a classical computer or classical pocket calculator if useful.) a) Eve uses her quantum computer to determine that the period of the function f(x) 19 x (mod 143) is r 60. Find d (using, e.g., Euclid s algorithm) such that cd 1 (mod r), and use that to recover Alice s original message a. b) Bob knows instead the prime factors p, q of N. Use those together with Euclid s algorithm to determine d such that cd 1 (mod (p 1)(q 1)), then use d to decrypt Alice s original message a, and see if Eve got it right. 5
Problem 6: Discrete Fourier transform In class (coincidentally lecture 15, and notes linked from course website), we emulate the steps to factor the number N 15 via period finding. Here we ll consider two problems related to factoring N 21: a) First we ll consider the function f(x) b x mod 21, with b 4. For experience with discrete Fourier transform, imagine starting from a state Φ 1 18 17 x0 x f(x) (though note this state can t be easily arranged with Hadamard gates in a conventional qubit quantum computer, since 18 is not a power of 2). (i) Suppose we measure the output f(x) as 16. In what state Ψ will that leave the input? Writing the state in the form Ψ 17 x0 γ(x) x, graph the (discrete) function γ(x) for values of x from 0 to 17. (ii) Now calculate the discrete Fourier transform γ(y) 1 18 17 x0 e2πixy/18 γ(x) (as given in eq. 3.20 of course text), and graph the values of the modulus-squared γ(y) 2 for y from 0 to 17. (iii) Imagine now measuring the state U FT Ψ 17 y0 γ(y) y. With what probability would the various non-zero values of y be measured? (iv) Unlike a classical discrete Fourier transform, in the quantum case the measurement in part (iii) only reveals a single Fourier transform component. Presuming you didn t already know the value of the period r of the above f(x), how could you infer the period from any one of those possible measured values of y? b) Consider the function f(x) b x mod 21, now with b 5, and start from a conventional qubit state Φ U f H 6 0 6 0 5 1 63 8 x0 x f(x). (The number of output bits n 0 5 is determined by 2 n 0 N 1 20. In general we re instructed to take the number of input bits n 2n 0, to ensure that 1/2 n < 1/r 2, so that the continued fraction method will pinpoint j/r; but in this case n 6 will suffice, since r (p 1)(q 1)/2 and hence r 2 36 < 2 6 64.) (i) The output qubits are measured to be 16, in what state Ψ does that leave the input qubits? (ii) Now imagine we apply U FT Ψ as in a.iii) above, and the input qubits are measured. Adapting formulae from the book, show that the probability of measuring y from 0 to 63 is given by p(y) 1 sin 2 60πy/64 640. What is the probability of measuring each of the five sin 2 6πy/64 most likely non-zero values of y, and what is the summed probability of measuring any of those five? (iii) Presuming you didn t already know the value of the period r of the above f(x), how could you infer the period from each of the measured values of y? 6