# Exercise 4.41 in N&C book QCQI: how can i implement $R_z(\theta)$ using the circuit shown and $Z$?

I'm studying Nielsen and Chuang's book.

I cannot solve one of the questions in the exercise 4.41.

The question is the last one that is

Explain how repeated use of this circuit and Z gates may be used to apply a $$R_z(\theta)$$ gate with probability approaching 1.

I found the last state of the circuit is

$$|\psi_{3}\rangle = |00\rangle(\frac{10^{1/2}}{4})e^{i\pi/4}R_z(\theta)|\psi\rangle +(-|01\rangle-|10\rangle+|11\rangle)\frac{1}{4}e^{-i\pi/4}Z|\psi\rangle$$

I put the picture of the circuit below.

How can i solve this problem?

Thanks

• On the title you mention exercise 4.51 and in the question 4.41, which one is it? Jun 22 at 6:37
• – glS
Jun 23 at 8:41

What your calculation conveys is that if you get any of the measurement results 01, 10 or 11, the output state is $$Z|\psi\rangle$$. If that happens, you apply $$Z$$ and your state is back to the one you started with. So, repeat the circuit and , if you get the answer 00, you've accomplished the process you want. If not, apply another $$Z$$ and repeat.
Each repetition succeeds with probability $$p=\frac58$$. So after $$k$$ repetitions, success has occurred with probability $$\sum_{n=1}^k\left(\frac38\right)^{n-1}\frac58,$$ which you could evaluate using a sum of a geometric progression, if you wanted, but the point is that it tends to 1 as $$k$$ becomes large.