期末考詳解,原文書:
Quantum Computation and Quantum Information, Michael A. Nielsen & Isaac L. Chuang
- 班平均:64
Problem 1
Recall that the Bell basis consist of the following states on two qubits:
Suppose Alice is holding the first two qubits of $\vert +\rangle \otimes \vert \beta_{11}\rangle$ and Bob is holding the third.
(a) If Alice applies $(I\otimes H)\text{CNOT}$ to her two qubits, where the first qubit is the control of the $\text{CNOT}$ and the second qubit is the target, what is the state shared by Alice and Bob now?
(b) After step (a), what is the reduced density matrix of Bob’s state?
(c) After step (a), Alice measures her two qubits in the Bell basis, what are the probabilities of each measurement outcome and Bob’s post-measurement state corresponding to each measurement outcome?
(a)
First apply $\text{CNOT}_\text{Alice}$
Then, apply $(I\otimes H)_\text{Alice}$
(b)
Let $\vert\psi\rangle=\displaystyle\frac{1}{2}\big((\vert00\rangle+\vert10\rangle)\vert-\rangle+(\vert11\rangle-\vert01\rangle)\vert+\rangle\big)$. The reduced density matrix of Bob’s state is
(c)
Problem 2
Calculate the output state and measurement distribution of the following circuits.
(a)
(b)
(a)
Output distribution:
(b)
Output distribution:
Problem 3
Suppose we have a one-bit function $f:\{0,1\}\to\{0,1\}$ and associated phase oracle
(a) Suppose we run the one-qubit circuit $HO_fH$ on input $\vert 0\rangle$ then measures in the computational basis, what is the output probability distribution in terms of $f(0)$ and $f(1)$?
(b) Now suppose we implemented quantum gate of $f$ while leaving some “garbage” in the work space, so we have the oracle
Suppose we run the two qubit quantum circuit $(H\otimes I)O’_f(H\otimes I)$ on the input $\vert 00\rangle$ and measurement the first qubit, what is the output probability distribution?
(a)
Apply $H$
Apply oracle $O_f$
Apply $H$
Output distribution
(b)
Apply $(H\otimes I)$
Apply oracle $O’_f$
Apply $(H\otimes I)$
Output distribution
Problem 4
In this problem, we walk through Shor’s algorithm with $N=3\times 5$
(a) What is the number of positive integers less than $N$ that is coprime to N?
(b) What is the order $r$ of $x=2$ modulo $N$ (the smallest positive integer $r$ such that $x^r=1(\text{mod}~N)$)? Check that $r$ is even.
(c) Calculate $x^{r/2}+1$ and $x^{r/2}-1$.
(d) Calculate $\text{gcd}(x^{r/2}-1, N)$ and confirm it is a factor of $N$.
(e) Recall the period finding algorithm has the following circuit
where the controlled gate does controlled multiplication: $\vert j,y\rangle\to\vert j,y\cdot x^j(\text{mod}~N)\rangle$, and $QFT_t$ is the quantum fourier transform gate on $t$ qubits, with $QFT_t\vert x\rangle=\frac{1}{\sqrt{2^t}}\exp[2\pi ixy/2^t]\vert y\rangle$ for $x\in\{0,1,\dots,2^t-1\}$. Use $t=5$, write down all intermediate states and the output probability distribution of the period finding algorithm. (Hint: recall $\vert 1\rangle=\frac{1}{\sqrt r}\sum^{r-1}_{s=0}\vert u_s\rangle$, where $\vert u_s\rangle=\frac{1}{\sqrt r}\sum^{r-1}_{k=0}\exp[-2\pi isk/r]\vert x^k\rangle$)
(a) By Euler’s totient function
(b)
$r$ is even.
(c)
(d)
Yes, $3$ is a factor of $N=15$.
(e)
Recall (from Hint)
$r=4~\Rightarrow$
Output distribution:
Problem 5
Suppose we have an input of $N$ numbers $x_1,x_2,\dots,x_N$. Give a rough sketch of a quantum algorithm that determines whether all inputs are different in $O(N)$ time. (You can use Grover’s algorithm that searches from any number of marked items as a subroutine.)
Reduce to Element distinctness problem
- Divide the inputs into $\sqrt N$ blocks of size $\sqrt N$
- Outer Grover search through each block $s$ and query all elements in it (check collision inside)
- Inner Grover search between pair ($x\in s,y\in s$)
- If $s$ contains an element of the collision, we found it $\Rightarrow Pr=\frac{1}{\sqrt N}$
Complexity:
- Inner Grover: $\sqrt{N}$
- Outer Grover: $\sqrt{\sqrt N}$
- Total: $\sqrt{\sqrt N}\cdot \sqrt{N}=O(N^{3/4})\le O(N)$