xiwi

Mobile notice: If you’re browsing this on a mobile device, many equations might run off to the side of your screen (but should be scrollable). View in landscape mode or use a computer.


These are my solutions for Chapter 4: Quantum Circuits.


4.1

In exercise 2.11, it was shown that the eigenvectors of the Pauli matrices were $$ \begin{align*} \ket{{X_+}} &= \frac{1}{\sqrt{2}}(\ket 0+\ket 1) &\equiv& \ket{+}\newline \ket{{X_-}} &= \frac{1}{\sqrt{2}}(\ket 0-\ket 1) &\equiv& \ket{-}\newline \ket{{Y_+}} &= \frac{1}{\sqrt{2}}(\ket 0+i\ket 1) &\equiv& \ket{i}\newline \ket{{Y_-}} &= \frac{1}{\sqrt{2}}(\ket 0-i\ket 1) &\equiv& \ket{-i}\newline \ket{{Z_+}} &= \ket 0 \newline \ket{{Z_-}} &= \ket 1. \end{align*} $$ We know that any normalised vector $\ket\psi = a\ket 0 +b\ket 1$ can be parametrised with the angles $(\theta,\phi)$ using $$ \begin{matrix} a = \cos\frac{\theta}{2} & \hspace{0.3cm}\text{and}\hspace{0.3cm} & b = e^{i\phi}\sin\frac{\theta}{2}, \end{matrix} $$

and their corresponding Bloch vector has the cartesian form $(\cos\phi\sin\theta,\sin\phi\sin\theta,\cos\theta)$. Thus, solving for the Pauli vectors mentioned above,

4.2

Let $A$ be a matrix such that $A^2 = \Bbb I$. We define the matrix $M = iAx$, with $x\in \Bbb R$.

Then $M^2 = -A^2x^2 = -x^2\Bbb I$, $\hspace{0.2cm} M^2 = -iAx^3$, and in general $$ \begin{align*} &M^{2k} = (-1)^k x^{2k}\Bbb I \newline &M^{2k+1} = (-1)^k ix^{2k+1}A \end{align*} \ ,\hspace{0.6cm} \text{for } k \in \Bbb N. $$

We know from a Taylor series expansion that $$ \begin{align*} \exp{M} &= \sum_{k=0}^\infty \cfrac{1}{k!}M^k = \sum_{k=0}^\infty \cfrac{1}{(2k)!}M^{2k} + \sum_{k=0}^\infty \cfrac{1}{(2k+1)!}M^{2k+1}\newline &= \left[\sum_{k=0}^\infty \cfrac{1}{(2k)!}(-1)^k x^{2k}\right]\Bbb I + i\left[\sum_{k=0}^\infty \cfrac{1}{(2k+1)!}(-1)^k x^{2k+1}\right]A\newline &= \cos(x)\Bbb I + i\sin(x)A. \end{align*} $$

Then, for $X = \begin{pmatrix}0&1\newline 1&0\end{pmatrix}$, $Y = \begin{pmatrix}0&-i\newline i&0\end{pmatrix}$ and $Z = \begin{pmatrix}1&0\newline 0&1\end{pmatrix}$, $$ \begin{align*} R_X(\theta) \coloneqq& \exp(-i\theta/2 X) = \cos(\theta/2)\Bbb I + i\sin(-\theta/2)X\newline =&\begin{pmatrix} \cos\frac{\theta}{2} & -i\sin\frac{\theta}{2}\newline -i\sin\frac{\theta}{2} & \cos\frac{\theta}{2}, \end{pmatrix},\newline \end{align*} $$ $$ \begin{align*} R_Y(\theta) \coloneqq& \exp(-i\theta/2 Y) = \cos(\theta/2)\Bbb I + i\sin(-\theta/2)Y \newline =&\begin{pmatrix} \cos\frac{\theta}{2} & -\sin\frac{\theta}{2}\newline \sin\frac{\theta}{2} & \cos\frac{\theta}{2}, \end{pmatrix},\newline \end{align*} $$ $$ \begin{align*} R_Z(\theta) \coloneqq& \exp(-i\theta/2 Z) = \cos(\theta/2)\Bbb I + i\sin(-\theta/2)Z\newline =&\begin{pmatrix} \cos\frac{\theta}{2} -i\sin\frac{\theta}{2} & 0\newline 0 & \cos\frac{\theta}{2}+i\sin\frac{\theta}{2} \end{pmatrix}\newline =&\begin{pmatrix} \exp(-i\frac{\theta}{2}) & 0\newline 0 & \exp(i\frac{\theta}{2}) \end{pmatrix}. \end{align*} $$

4.3

We know that the phase gate is $$T = \begin{pmatrix}1&0\newline 0&\exp(i\pi/4)\end{pmatrix}.$$ On the other hand, $$R_Z(\pi/4) = \begin{pmatrix}\exp(-i\pi/8)&0\newline 0&\exp(i\pi/8)\end{pmatrix}.$$ If we introduce a global phase factor of $e^{i\pi/8}$, then we get $$ \begin{align*} e^{i\pi/8}R_Z(\pi/4) &= e^{i\pi/8}\begin{pmatrix}\exp(-i\pi/8)&0\newline 0&\exp(i\pi/8)\end{pmatrix}\newline &=\begin{pmatrix}1&0\newline 0&\exp(i\pi/4)\end{pmatrix} = T. \end{align*} $$

4.4

We want to express the Hadamard $H$ as a product of $R_X(\alpha), R_Z(\beta)$ rotations and $e^{i\varphi}$ for some $\alpha, \beta$ and $\varphi$.

Since the rotation operators deal with the half angle, it might be a bit simpler to consider the angles $2\alpha$ and $2\beta$ for calculation purposes. If we carry out the product we are left with: $$ e^{i\varphi}R_X(2\alpha)R_Z(2\beta) = \begin{pmatrix} e^{i(\varphi-\beta)}\cos\alpha & -ie^{i\varphi}\sin\alpha\newline -ie^{i\varphi}\sin\alpha & e^{i(\varphi+\beta)}\cos\alpha \end{pmatrix}. $$

We know the Hadamard has the form $H = \cfrac{1}{\sqrt{2}}\begin{pmatrix} 1&1\newline 1&-1\end{pmatrix}$. The easiest value to determine first is $\alpha = \pi/2$ to take care of the $1/\sqrt{2}$ value. Then we are left with the following conditions that must be simultaneously true:

$$ \begin{matrix} \varphi-\beta = 0, & \varphi + \beta = \pi, & -ie^{i\varphi} = 1. \end{matrix} $$ We can then conclude that $\alpha = \beta = \varphi = \pi/2$ give us the matrix that we need: $$ \begin{align*} e^{i\pi/2}R_X(\pi)R_Z(\pi) &= \begin{pmatrix} e^{0}\cos\pi/2 & -ie^{i\pi/2}\sin\pi/2\newline -ie^{i\pi/2}\sin\pi/2 & e^{i\pi}\cos\pi/2 \end{pmatrix}\newline &= \begin{pmatrix} 1/\sqrt{2} & 1/\sqrt{2}\newline 1/\sqrt{2} & -1/\sqrt{2} \end{pmatrix} = H. \end{align*} $$

4.5

Similar to what we did in exercise 2.60, we know that for a real unit vector $\hat n = (n_x,n_y,n_z)$ $$ \vec n \cdot \vec\sigma = \begin{pmatrix}n_z & n_x-in_y\newline n_x+in_y & n_z\end{pmatrix}. $$ Then $$ \begin{align*} (\vec n \cdot \vec\sigma)^2 &= \begin{pmatrix}n_z & n_x-in_y\newline n_x+in_y & n_z\end{pmatrix}\begin{pmatrix}n_z & n_x-in_y\newline n_x+in_y & n_z\end{pmatrix}\newline &= \begin{pmatrix}n_z^2+n_x^2+n_y^2 & 0\newline 0 & n_x^2+n_y^2+n_z^2\end{pmatrix} = \Bbb I. \end{align*} $$

Using the result from exercise 4.2 we know the expression for $\exp[ix(\hat n\cdot\vec\sigma)]$.

Setting $x = -i\theta/2$ we get $$ \exp[-i\theta/2(\hat n\cdot\vec\sigma)] = \cos\frac{\theta}{2}\Bbb I - i\sin\frac{\theta}{2}(n_xX+n_yY+n_zZ). $$

4.7

a)

We know that $X$ and $Y$ anticommute $\lbrace X,Y\rbrace = XY + YX = 0\Rightarrow XY = -YX$. And since $X^2 = \Bbb I$, then $$XYX = -YX^2 = -Y.$$

b)

$$ \begin{align*} XR_Y(\theta)X &= X\exp\left(-\frac{\theta}{2}Y\right)X\newline &=X\left[\cos\frac{\theta}{2}\Bbb I -i\sin\frac{\theta}{2} Y\right]X\newline &= \cos\frac{\theta}{2}X^2-i\sin\frac{\theta}{2}XYX\newline &= \cos\frac{\theta}{2}\Bbb I + i\sin\frac{\theta}{2}Y\newline &= \cos\left(-\frac{\theta}{2}\right)\Bbb I -i\sin\left(-\frac{\theta}{2}\right)Y\newline &= R_Y(-\theta). \end{align*} $$

4.8

a)

We know that unitary transformations map Bloch vectors to Bloch vectors, and that they preserve angles between them. We also know that we can map any Bloch vector to another Bloch vector through a rotation along a suitable axis $\hat n$ and an appropriate angle $\theta$. This means that, intuitively at least, for any unitary operation $U$ we can find an equivalent rotation $R_{\hat n}(\theta)$ (up to a global phase).

b)

Since the Hadamard is $H = \cfrac{X+Z}{\sqrt{2}}$, it sounds reasonable to suggest that its associated rotation operator is around the $\hat n = (1/\sqrt{2}, 0, 1/\sqrt{2})$ axis.

Supposing a) holds true, $$ \begin{align*} U_H &= \exp(i\alpha)R_{\hat n}(\theta) = \exp(i\alpha) \exp\left[-\cfrac{i\theta}{2} \left(n_xX+n_yY+n_zZ\right)\right]\newline &= \exp(i\alpha)\left[\cos\cfrac{\theta}{2}\Bbb I -i\sin\cfrac{\theta}{2}\left(\cfrac{X+Z}{\sqrt{2}}\right)\right]\newline \end{align*}. $$ If we set $\theta = \pi \hspace{0.2cm} \Longrightarrow U_H = -i\exp(i\alpha)\left(\cfrac{X+Z}{\sqrt{2}}\right)$, and if we set $\alpha = \pi/2$ $$\Rightarrow U_H = \cfrac{X+Z}{\sqrt{2}} \equiv H.$$

c)

We know that $T^2 = S$ and that $S^2 = Z$; they all represent rotations around the $z$ axis, so we can confidently suggest $\hat n = (0,0,1)$. Now, $$ \begin{align*} U_S &= \exp(i\alpha)R_{\hat n}(\theta) = \exp(i\alpha)\left[\cos\cfrac{\theta}{2}\Bbb I -i\sin\cfrac{\theta}{2}Z\right]\newline \end{align*}. $$ We want our rotation to satisfy $U_S^2 = Z$ $$ \begin{align*} U_S ^2 &= \left[-2\cos\cfrac{\theta}{2} \sin\cfrac{\theta}{2}i\exp(2i\alpha)\right]Z. \end{align*} $$ Setting $\theta = \pi/2$ takes care of the factor of 2, while $\alpha = \pi/4$ deals the rest. We can check our construction: $$ \begin{align*} U_S &= \exp(i\pi/4)R_{Z}(\pi/2) = \left(\cos\cfrac{\pi}{4}+i\sin\cfrac{\pi}{4}\right)\left[\cfrac{1}{\sqrt{2}}\Bbb I -i\cfrac{1}{\sqrt{2}}Z\right]\newline &= \cfrac{1}{\sqrt{2}}\left(\cos\cfrac{\pi}{4}+i\sin\cfrac{\pi}{4}\right) \begin{pmatrix} 1-i&0\newline 0&1+i \end{pmatrix}\newline &= \cfrac{1}{\sqrt{2}}\left(\cfrac{1+i}{\sqrt{2}}\right) \begin{pmatrix} 1-i&0\newline 0&1+i \end{pmatrix}\newline &= \cfrac{1}{2}\begin{pmatrix} 2&0\newline 0&2i \end{pmatrix}\newline &= \begin{pmatrix} 1&0\newline 0&i \end{pmatrix} \equiv S \end{align*} $$

4.9

Thanks to exercise 4.8 a) we know that any unitary transformation can be written as a rotation around an arbitrary axis and a phase factor. Writing out the terms $$ \begin{align*} U_H &= \exp(i\alpha)\left[\cos\cfrac{\theta}{2}\Bbb I -i\sin\cfrac{\theta}{2}\left(n_x X + n_y Y + n_z Z \right)\right]\newline &= \exp(i\alpha) \begin{aligned} &\left[ \begin{pmatrix} % identity \cos\cfrac{\theta}{2} & 0\newline 0 & \cos\cfrac{\theta}{2} \end{pmatrix} -i\begin{pmatrix} % X 0 & n_x\sin\cfrac{\theta}{2}\newline n_x\sin\cfrac{\theta}{2} & 0 \end{pmatrix} \right.\newline &+\left. \begin{pmatrix} % Y 0 & -n_y\sin\cfrac{\theta}{2}\newline n_y\sin\cfrac{\theta}{2} & 0 \end{pmatrix} -i\begin{pmatrix} % Z n_z\sin\cfrac{\theta}{2}&0 \newline 0&-n_z\sin\cfrac{\theta}{2} \end{pmatrix} \right] \end{aligned}\newline &= \exp(i\alpha) \begin{pmatrix} \cos\cfrac{\theta}{2}-in_z\sin\cfrac{\theta}{2} & -\sin\cfrac{\theta}{2}(n_y + i n_x) \newline \sin\cfrac{\theta}{2}(n_y - i n_x) & \cos\cfrac{\theta}{2}+i n_z\sin\cfrac{\theta}{2} \end{pmatrix}. \end{align*} $$ We can equate each entry in this matrix to the form given by the “$Z-Y$ single qubit decomposition theorem” to find the corresponding values of $n_x, n_y, n_z$ and $\theta$ that make this work (left to the reader).

4.10

Using the results of exercise 4.7 b) we can follow a similar procedure to show that $$ \begin{matrix} HR_X(\theta)H = R_Z(\theta), & HR_Y(\theta)H = R_Y(-\theta), & HR_Z(\theta)H = R_X(\theta). \end{matrix} $$

Then, we know (thanks to the “$Z-Y$ single qubit decomposition theorem” again) that any unitary gate $U'$ has the representation $$ U’ = e^{i\alpha}R_Z(\beta)R_Y(\gamma)R_Z(\delta). $$

Let $U$ be the unitary gate obtain after applying $H$ to $U'$ twice: $$ \begin{align*} U &= HU’H = e^{i\alpha}HR_Z(\beta)R_Y(\gamma)R_Z(\delta)H. \end{align*} $$ We note we can apply $H$ twice anywhere in there (since $H^2 = \Bbb I$), and we make use of the rotation transformations mentioned: $$ \begin{align*} \Rightarrow U &= e^{i\alpha}HR_Z(\beta)HHR_Y(\gamma)HHR_Z(\delta)H\newline &= e^{i\alpha}R_X(\beta)R_Y(-\gamma)R_X(\delta). \end{align*} $$

This means we have established a transformation $U’\rightarrow U$ that is valid for every unitary operator, which means that any unitary operator has an $X-Y$ rotation decomposition too.

4.12

We first want to find the $Y-Z$ decomposition of $H$. We know that (for some $\alpha, \beta, \gamma$ and $\delta$): $$ H = \begin{pmatrix} e^{i(\alpha-\beta/2-\delta/2)}\cos\gamma/2 & -e^{i(\alpha-\beta/2+\delta/2)}\sin\gamma/2\newline e^{i(\alpha+\beta/2-\delta/2)}\cos\gamma/2 & e^{i(\alpha+\beta/2+\delta/2)}\sin\gamma/2 \end{pmatrix}.$$

It’s easy to set $\gamma = \pi/2$ to get rid of the $1/\sqrt{2}$ factor, which means we’re left with the following system of equations: $$ \begin{align*} \alpha - \beta/2 - \delta/2 = 0, & \hspace{0.4cm} & \alpha - \beta/2 + \delta/2 = \pi, \newline \alpha + \beta/2 - \delta/2 = 0, & & \alpha + \beta/2 + \delta/2 = \pi. \newline \end{align*} $$ Solving this yields $$ \begin{matrix} \alpha = \pi/2, & \beta = 0, & \delta = \pi. \end{matrix} $$

Now, given corollary 4.2 we know that: $$ \begin{align*} A &= R_Z(\beta)R_Y(\gamma/2) &=& R_Y(\pi/4), \newline B &= R_Y(-\gamma/2)R_Z\left(-\frac{\delta+\beta}{2}\right) &=& R_Y(-\pi/4)R_Z(-\pi/2),\newline C &= R_Z\left(\frac{\delta-\beta}{2}\right) &=& R_Z(\pi/2). \end{align*} $$

4.13

We will only use the identities $X^2 = Y^2 = Z^2 = -iXYZ = \Bbb I$.

For $HXH$: $$ \begin{align*} HXH &= \left(\cfrac{X+Z}{\sqrt{2}}\right)X\left(\cfrac{X+Z}{\sqrt{2}}\right)\newline &= \cfrac{1}{2}(X+Z)(\Bbb I + XZ)\newline &= \cfrac{1}{2}(X+Z+X^2Z + ZXZ), \end{align*} $$ and since we know $ZXZ = -iZY = -X$ $$\therefore HXH = Z.$$

For $HYH$: $$ \begin{align*} HYH &= \left(\cfrac{X+Z}{\sqrt{2}}\right)Y\left(\cfrac{X+Z}{\sqrt{2}}\right)\newline &= \cfrac{1}{2}(X+Z)(YX+YZ)\newline &= \cfrac{1}{2}(XYX+XYZ+ZYX+ZYZ). \end{align*} $$ We know that $ZYX = (XYZ)^\dagger = -i\Bbb I = -XYZ$, so the two middle terms cancel each other out. Secondly, $ZYZ = iZX = -Y$ and we already know that $XYX = -Y$ $$\therefore HYH = -Y.$$

For $HZH$: $$ \begin{align*} HZH &= \left(\cfrac{X+Z}{\sqrt{2}}\right)Z\left(\cfrac{X+Z}{\sqrt{2}}\right)\newline &= \cfrac{1}{2}(X+Z)(ZX + \Bbb I)\newline &= \cfrac{1}{2}(XZX + X + Z^2X+ Z). \end{align*} $$ We just showed that $ZXZ = -X$, thus $XZX = X(ZXZ)Z = Z(-X)X = -Z$. $$\therefore HZH = X.$$

4.14

$$ \begin{align*} HR_Z(\theta)H &=H\left(\cos\cfrac{\theta}{2}\Bbb I -i\sin\cfrac{\theta}{2}X\right)H\newline &= \cos\cfrac{\theta}{2}H^2 -i\sin\cfrac{\theta}{2}HZH\newline &= \cos\cfrac{\theta}{2}\Bbb I - i\sin\cfrac{\theta}{2}X\newline &= R_X(\theta). \end{align*} $$ Since $e^{i\alpha}R_Z(\pi/4) = T$ (exercise 4.3) we have that $$ HTH = e^{i\alpha} HR_Z(\pi/4)H = e^{i\alpha}R_X(\pi/4).$$

4.15

a)

We want to equate $R_{\hat n_2}(\beta_2)R_{\hat n_1}(\beta_1) \stackrel{?}{=} R_{\hat n_{12}}(\beta_{12})$.

For the LHS: $$ \begin{align*} R_{\hat n_2}(\beta_2)R_{\hat n_1}(\beta_1) &= \left[\cos\cfrac{\beta_2}{2}\Bbb I - i\sin\cfrac{\beta_2}{2}(\hat n_2\cdot\vec\sigma)\right] \left[\cos\cfrac{\beta_1}{2}\Bbb I - i\sin\cfrac{\beta_1}{2}(\hat n_1\cdot\vec\sigma)\right]\newline &\equiv [c_2\Bbb I - is_2(\hat n_2\cdot\vec\sigma)] [c_1\Bbb I - is_1(\hat n_1\cdot\vec\sigma)]\newline &= [c_1c_2-s_1s_2(\hat n_1\cdot\vec\sigma)(\hat n_2\cdot\vec\sigma)]\Bbb I - i[s_1c_2(\hat n_1\cdot\vec\sigma)+c_1s_2(\hat n_2\cdot\vec\sigma)]. \end{align*} $$ We know that for any real vectors $\vec a$ and $\vec b$: $$(\vec a\cdot\vec\sigma)(\vec b\cdot\vec\sigma) = (\vec{a}\cdot\vec{b})\Bbb I + i(\vec{a}\times\vec{b})\cdot\vec{\sigma},$$ so that $$ \begin{align*} R_{\hat n_2}(\beta_2)R_{\hat n_1}(\beta_1) &= [c_1c_2-s_1s_2 (\hat n_1\cdot\hat n_2)]\Bbb I - i[s_1c_2(\hat n_1\cdot\vec\sigma)+c_1s_2(\hat n_2\cdot\vec\sigma)+s_1s_2(\hat n_1\times\hat n_2)\cdot\vec\sigma]\newline &=[c_1c_2-s_1s_2 (\hat n_1\cdot\hat n_2)]\Bbb I -i[s_1c_2\hat n_1 +c_1s_2\hat n_2 +s_1s_2(\hat n_1\times\hat n_2)]\cdot\vec\sigma \end{align*} $$

For the RHS: $$ \begin{align*} R_{\hat n_{12}}(\beta_{12}) &= \cos\cfrac{\beta_{12}}{2}\Bbb I - i\sin\cfrac{\beta_{12}}{2}(\hat n_{12}\cdot\vec\sigma)\newline &= c_{12}\Bbb I - is_{12}(\hat n_{12}\cdot\vec\sigma). \end{align*} $$ For these two quantities to be equal, the real and imaginary components have to match each other (and noting that $(\hat n_1\times\hat n_2) = -(\hat n_2\times\hat n_1)$): $$\Rightarrow \begin{align*} c_{12} &= c_1c_2-s_1s_2(\hat n_1\cdot\hat n_2)\newline s_{12}\hat{n}_{12} &= s_1c_2\hat n_1 +c_1s_2\hat n_2 -s_1s_2(\hat n_2\times\hat n_1). \end{align*} $$

b)

If $\beta_1 = \beta_2$ and $\hat n_1 = \hat z$, then $c_1 = c_2 \equiv c$ and $s_1 = s_2 \equiv s$, and straightforward substitution shows that the above expressions simplify to $$ \begin{align*} c_{12} &= c^2-s^2(\hat z\cdot\hat n_2)\newline s_{12}\hat{n}_{12} &= sc[\hat z + \hat n_2] -s^2(\hat n_2\times\hat k). \end{align*} $$

4.16

a)

For this first circuit, the operation $\Bbb I$ is applied to $\ket{x_1}$, while $H$ is applied to $\ket{x_2}$, so that the complete operation is $$ \begin{align*} \Bbb{I_1}\otimes H_{2} &= \begin{pmatrix} \large{H}&\large{0}\newline \large{0}&\large{H} \end{pmatrix}\newline &=\cfrac{1}{\sqrt{2}}\begin{pmatrix} \begin{matrix} 1&1\newline 1&-1 \end{matrix} &\large{0}\newline \large{0}& \begin{matrix} 1&1\newline 1&-1 \end{matrix} \end{pmatrix}. \end{align*} $$

a)

For the second circuit, $H$ is applied to $\ket{x_1}$, while $\Bbb I$ is applied to $\ket{x_2}$, so that the complete operation is $$ \begin{align*} H_{1}\otimes \Bbb{I_1} &= \cfrac{1}{\sqrt{2}}\begin{pmatrix} \large{\Bbb I}&\large{\Bbb I}\newline \large{\Bbb I}&-\large{\Bbb I} \end{pmatrix}\newline &=\cfrac{1}{\sqrt{2}}\begin{pmatrix} 1&0&1&0\newline 0&1&0&1\newline 1&0&-1&0\newline 0&1&0&-1 \end{pmatrix}. \end{align*} $$

4.17

We know that $HZH = X$ from exercise 4.13, so our intuition seems to indicate that we need to prove that

417

To verify this, we can compare the effects of the $CNOT$ on the computational basis

$$ \begin{align*} \ket{00} &\longrightarrow \ket{00}\newline \ket{01} &\longrightarrow \ket{01}\newline \ket{10} &\longrightarrow \ket{11}\newline \ket{11} &\longrightarrow \ket{10} \end{align*} $$

with the effects of the composite operation $(\Bbb I_1\otimes H_2)C(Z)(\Bbb I_1\otimes H_2)$–where subscripts $1$ and $2$ indicate action on the first and second qubit, respectively–on the same basis:

$$ \begin{align*} \ket{00} &\longrightarrow \ket{00}\newline \ket{01} &\longrightarrow \ket{01}\newline \ket{10} &\xrightarrow{H_2}\ket{1+}\xrightarrow{C(Z)}\ket{1-}\xrightarrow{H_2}\ket{11}\newline \ket{11} &\xrightarrow{H_2}\ket{1-}\xrightarrow{C(Z)}\ket{1+}\xrightarrow{H_2}\ket{10}. \end{align*} $$

Since they have the same effect on the basis states we can conclude they are the same and therefore we can construct a $CNOT$ operation with a controlled-$Z$ plus Hadamards.

Note that $(\Bbb I_1\otimes H_2) \equiv H_2$ for clarity purposes.

4.18

418

The circuit on the left computes $C_1(Z_2) = \ket 0\bra 0\otimes \Bbb I + \ket 1\bra 1\otimes Z$, while the one in the right computes $C_2(Z_1) = \Bbb I\otimes\ket 0\bra 0 + Z\otimes\ket 1\bra 1$.

Checking that their matrices match: $$ \begin{align*} C_1(Z_2) &= \begin{pmatrix} \large{\Bbb I} & \large{0}\newline \large{0} & \large{0} \end{pmatrix} + \begin{pmatrix} \large{0} & \large{0}\newline \large{0} & \large{Z} \end{pmatrix}\newline &= \begin{pmatrix} 1&0&0&0\newline 0&1&0&0\newline 0&0&1&0\newline 0&0&0&-1 \end{pmatrix}, \end{align*} $$ while $$ \begin{align*} C_2(Z_1) &= \begin{pmatrix} \begin{matrix} 1&0\newline 0&0 \end{matrix} & \large{0}\newline \large{0} & \begin{matrix} 1&0\newline 0&0 \end{matrix} \end{pmatrix} + \begin{pmatrix} \begin{matrix} 0&0\newline 0&1 \end{matrix} & \large{0}\newline \large{0} & -\begin{matrix} 0&0\newline 0&1 \end{matrix} \end{pmatrix}\newline &= \begin{pmatrix} 1&0&0&0\newline 0&1&0&0\newline 0&0&1&0\newline 0&0&0&-1 \end{pmatrix}, \end{align*} $$ proving they’re the same.

4.19

For a (closed) two qubit system, the density matrix $\rho$ is a $4\times 4$ matrix and we know that in this picture, the density operator evolves as $\rho \longrightarrow A\rho A^\dagger$ under the action of unitary $A$. We also know that $(CNOT)^\dagger = CNOT$. Using this, we can explicitly calculate $$ \begin{align*} \rho \stackrel{CNOT}{\longrightarrow}& CNOT \ \rho \ CNOT\newline \stackrel{CNOT}{\longrightarrow}& \begin{pmatrix} 1&0&0&0\newline 0&1&0&0\newline 0&0&0&1\newline 0&0&1&0 \end{pmatrix} \begin{pmatrix} \rho_{11}&\rho_{12}&\rho_{13}&\rho_{14}\newline \rho_{21}&\rho_{22}&\rho_{23}&\rho_{24}\newline \rho_{31}&\rho_{32}&\rho_{33}&\rho_{34}\newline \rho_{41}&\rho_{42}&\rho_{43}&\rho_{44} \end{pmatrix} \begin{pmatrix} 1&0&0&0\newline 0&1&0&0\newline 0&0&0&1\newline 0&0&1&0 \end{pmatrix}\newline =& \begin{pmatrix} 1&0&0&0\newline 0&1&0&0\newline 0&0&0&1\newline 0&0&1&0 \end{pmatrix} \begin{pmatrix} \rho_{11}&\rho_{12}&\rho_{14}&\rho_{13}\newline \rho_{21}&\rho_{22}&\rho_{24}&\rho_{23}\newline \rho_{31}&\rho_{32}&\rho_{34}&\rho_{33}\newline \rho_{41}&\rho_{42}&\rho_{44}&\rho_{43} \end{pmatrix}\newline =& \begin{pmatrix} \rho_{11}&\rho_{12}&\rho_{14}&\rho_{13}\newline \rho_{21}&\rho_{22}&\rho_{24}&\rho_{23}\newline \rho_{41}&\rho_{42}&\rho_{44}&\rho_{43}\newline \rho_{31}&\rho_{32}&\rho_{34}&\rho_{33} \end{pmatrix}. \end{align*} $$

4.20

a)

We essentially want to show that $$ H^{\otimes 2}(\ket 0\bra 0\otimes \Bbb I + \ket 1\bra 1\otimes X)H^{\otimes 2} = \Bbb I\otimes\ket 0\bra 0 + X\otimes\ket 1\bra 1.$$

If we calculate the matrix on the left hand side of the expression: $$ \begin{align*} \text{LHS} &= \cfrac{1}{2} \begin{pmatrix} \large{H} & \large{H}\newline \large{H} & \large{-H} \end{pmatrix} \begin{pmatrix} \large{\Bbb I} & \large{0}\newline \large{0} & \large{X} \end{pmatrix} \begin{pmatrix} \large{H} & \large{H}\newline \large{H} & \large{-H} \end{pmatrix} \newline &= \cfrac{1}{2} \begin{pmatrix} \large{H} & \large{H}\newline \large{H} & \large{-H} \end{pmatrix} \begin{pmatrix} \large{H} & \large{H}\newline \large{XH} & \large{-XH} \end{pmatrix} \newline &= \cfrac{1}{2} \begin{pmatrix} \large{H^2+HXH} & \large{H^2-HXH}\newline \large{H^2-HXH} & \large{H^2+HXH} \end{pmatrix}, \end{align*} $$ and recalling that $H^2 = \Bbb I$ and $HXH = Z$ (exercise 4.13), $$ \begin{align*} \text{LHS} &= \cfrac{1}{2} \begin{pmatrix} \large{\Bbb I +Z} & \large{\Bbb I-Z}\newline \large{\Bbb I-Z} & \large{\Bbb I+Z} \end{pmatrix}\newline &=\cfrac{1}{2} \begin{pmatrix} 2&0&0&0\newline 0&0&0&2\newline 0&0&2&0\newline 0&2&0&0 \end{pmatrix} =\begin{pmatrix} 1&0&0&0\newline 0&0&0&1\newline 0&0&1&0\newline 0&1&0&0 \end{pmatrix}. \end{align*} $$ On the other hand, the right hand side of the expression is $$ \begin{align*} \text{RHS} &= \begin{pmatrix} \begin{matrix} 1&0\newline 0&0 \end{matrix} & \large{0}\newline \large{0} & \begin{matrix} 1&0\newline 0&0 \end{matrix} \end{pmatrix} + \begin{pmatrix} \large{0} &\begin{matrix} 0&0\newline 0&1 \end{matrix} \newline \begin{matrix} 0&0\newline 0&1 \end{matrix} & \large{0} \end{pmatrix}\newline &=\begin{pmatrix} 1&0&0&0\newline 0&0&0&1\newline 0&0&1&0\newline 0&1&0&0 \end{pmatrix}. \end{align*} $$

b)

We can check the effect of a $CNOT_{1,2}$ gate on the sign basis: $$ \begin{align*} \ket{++} &\xrightarrow{H^{\otimes 2}}\ket{00} \xrightarrow{CNOT_{2,1}}\ket{00} \xrightarrow{H^{\otimes 2}}\ket{++} \newline \ket{+-} &\xrightarrow{H^{\otimes 2}}\ket{01} \xrightarrow{CNOT_{2,1}}\ket{11} \xrightarrow{H^{\otimes 2}}\ket{--} \newline \ket{-+} &\xrightarrow{H^{\otimes 2}}\ket{10} \xrightarrow{CNOT_{2,1}}\ket{10} \xrightarrow{H^{\otimes 2}}\ket{-+} \newline \ket{--} &\xrightarrow{H^{\otimes 2}}\ket{11} \xrightarrow{CNOT_{2,1}}\ket{01} \xrightarrow{H^{\otimes 2}}\ket{+-}, \end{align*} $$ where $CNOT_{A,B}$ denotes the controlled-$X$ gate with qubit $A$ as control and the $B$ bit as target.

4.21

421

$$ \begin{align*} \ket{xyz} &\xrightarrow{C_2(V_3)}& \ket{xy}V^{y}\ket{z}\newline &\xrightarrow{CNOT_{1,2}}& \ket{x,y\oplus x}V^{y}\ket{z}\newline &\xrightarrow{C_2(V_3^\dagger)}& \ket{x,y\oplus x}(V^{\dagger})^{y\oplus x}V^y\ket{z}\newline &\xrightarrow{CNOT_{1,2}}& \ket{x,y}(V^{\dagger})^{y\oplus x}V^y\ket{z} & & (y\oplus{2x} = y)\newline &\xrightarrow{C_1(V_3)}& \ket{x,y}V^{x}(V^{\dagger})^{y\oplus x}V^y\ket{z}\newline \end{align*} $$

$$\ket{xyz}\longrightarrow\ket{xyz},$$

$$\ket{xyz}\longrightarrow\ket{xy}V^\dagger V\ket{z} = \ket{xyz},$$

$$\ket{xyz}\longrightarrow\ket{xy}VV^\dagger\ket{z} = \ket{xyz},$$

$$\ket{xyz}\longrightarrow\ket{xy}V^2\ket{z} = \ket{xy}U\ket{z}.$$

This means that in every case, what is being computed is $$\ket{xyz}\longrightarrow \ket{xy}U^{xy}\ket{z}.$$

4.22

Thanks to the previous exercise, we know we can construct $C^2(U)$ if we let $V$ be a unitary operator such that $V^2 = U$. Let $V$ be an operator that satisfies this. We also know, due to corollary 4.2, that we can find unitary $A, B$ and $C$ such that $V = e^{i\alpha}AXBXC$ (with $ABC = \Bbb I$), and we know how to implement $C^1(V)$ using this (Figure 4.6 in N&C).

We can implement both ideas in one circuit as follows:

422_1

The dashed lines indicate the different components of the circuit (first $C(V), C(V^\dagger)$ and the second $C(V)$). The gate $\alpha$ represents a controlled phase shift gate of $\alpha$. We note that because $A, B$ and $C$ are unitary they satisfy that $AA^\dagger = C^\dagger C = \Bbb I$ so we can get rid of four single qubit gates since they are being applied consecutively.

422_2

Now we are left with a circuit that implements $C^2(U)$ with 8 one-qubit gates, but we still have 8 $CNOT$s.

(It might be possible to move stuff around to make a pair cancel out, but I’m not seeing how straight away.)

4.23

We are going to use the $U = e^{i\alpha}AXBXC$ construction for our controlled gates.

a)

For $U = R_Y(\theta)$ we can try to set the unitary gates $A,B$ and $C$ to be fractional rotations.

Using the fact that $XR_Y(\theta)X = R_Y(-\theta)$, we see that the middle gate has to essentially “undo” whatever the rest of the circuit does when it is between $X$ gates.

This suggests we set $A = R_Y(\theta/4)$, $B=R_Y(-\theta/2)$ and $C = R_Y(\theta/4)$ (plus $\alpha = 0$ so we avoid a phase factor), so we get $$ \begin{align*} AXBXC &= R_Y(\theta/4)XR_Y(-\theta/2)XR_Y(\theta/4)\newline &= R_Y(\theta/4)R_Y(\theta/2)R_Y(\theta/4) = R_Y(\theta), \end{align*} $$ and $$ \begin{align*} ABC &= R_Y(\theta/4)R_Y(-\theta/2)R_Y(\theta/4)=\Bbb I. \end{align*} $$ We can reduce the number of single qubit gates from three to two by setting $A$ ($C$) to $\Bbb I$ and $C$ ($A$) to $R_Y(\theta/2)$.

b)

For $U = R_X(\theta)$ we can follow a similar procedure.

We can’t just set $B$ to be a rotation $R_X(\theta’)$, because $XR_X(\theta’)X = R_X(\theta’)$. However, we know that $XZX = -Z$ and (like we have similarly done in many other exercises) can use this to show that $XR_Z(\theta)X = R_Z(-\theta)$. Finally, we also know that $HR_Z(\theta)H = R_X(\theta)$, so we can just sandwich everything between Hadamards.

Setting $A = HR_Z(\theta/4)$, $B=R_Z(-\theta/2)$ and $C=R_Z(\theta/2)H$ (plus $\alpha = 0$) we have $$ \begin{align*} AXBXC &= HR_Z(\theta/4)XR_Z(-\theta/2)XR_Z(\theta/4)H\newline &= HR_Z(\theta/4)R_Z(\theta/2)R_Z(\theta/4)H\newline &= HR_Z(\theta)H = R_X(\theta), \end{align*} $$ and $$ \begin{align*} ABC &= HR_Z(\theta/4)R_Z(-\theta/2)R_Z(\theta/4)H\newline &= HH = \Bbb I. \end{align*} $$

Since we can’t get rid of either Hadamard, we can’t reduce this to two one-qubit gates only.

4.24

Let’s calculate the effect of this circuit on the computational basis.1

$$ \begin{align*} \ket{xyz} &\xrightarrow{H_3}& \ket{xy}H\ket{z}\newline &\xrightarrow{CNOT_{2,3}}& \ket{x,y}X^yH\ket{z}\newline &\xrightarrow{T^\dagger_3}& \ket{x,y}T^\dagger X^yH\ket{z}\newline &\xrightarrow{CNOT_{1,3}}& \ket{x,y}X^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{T_3}& \ket{x,y}TX^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{CNOT_{2,3}}& \ket{x,y}X^yTX^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{T^\dagger_3}& \ket{x,y}T^\dagger X^yTX^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{CNOT_{1,3}}& \ket{x,y}X^x T^\dagger X^yTX^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{T^\dagger_2\otimes T_3}& \ket{x}T^\dagger\ket{y}TX^x T^\dagger X^yTX^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{CNOT_{1,2}\otimes H_3}& \ket{x}X^x T^\dagger\ket{y}HTX^x T^\dagger X^yTX^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{T^\dagger_2}& \ket{x}T^\dagger X^xT^\dagger\ket{y}HTX^x T^\dagger X^yTX^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{CNOT_{1,2}}& \ket{x}X^xT^\dagger X^xT^\dagger\ket{y}HTX^x T^\dagger X^yTX^x T^\dagger X^yH\ket{z}\newline &\xrightarrow{T_1\otimes S_2}& T\ket{x}SX^xT^\dagger X^xT^\dagger\ket{y}HTX^x T^\dagger X^yTX^x T^\dagger X^yH\ket{z}\newline \end{align*} $$

We know that $T^2 = S$ and that $S^2 = Z$, and the effects that $T$ and $S$ have on the computational basis are $$ \begin{matrix} T\ket{k} = e^{i\pi k/4}\ket{k} & \text{and} & S\ket{k} = (-i)^k\ket{k}. \end{matrix} $$

Thus

$$ \begin{align*} \ket{xyz} &\longrightarrow e^{i\pi/4}\ket{x}e^{-i\pi/4}S(TT^\dagger)\ket{y} HT(XX)T^\dagger H\ket{z}\newline &\longrightarrow \ket{x}(-i)^y\ket{y} HH\ket{z}\newline &\longrightarrow \ket{xyz}. \end{align*} $$

4.25

a)

The construction of the $SWAP$ gate made use of three alternating $CNOT$ gates, so it seems intuitive to extend this to the construction of the $CSWAP$ gate by using three alternating $CCNOT$ gates.

425_1

Remembering that (bitwise) $k^2 = k$ and $2k = 0$:

$$ \begin{align*} \ket{xyz} &\xrightarrow{CSWAP_{3}}& \ket{xy}X^{xy}\ket{z} = \ket{x,y,z\oplus xy}\newline &\xrightarrow{CSWAP_{2}}& \ket{x,y\oplus x(z\oplus xy),z\oplus xy}\newline &=& \ket{x, y\oplus xz \oplus x^2y, z\oplus xy}\newline &=& \ket{x, y\oplus xz \oplus xy, z \oplus xy}\newline &\xrightarrow{CSWAP_{3}}& \ket{x,y\oplus xz \oplus xy,z\oplus xy\oplus xy\oplus x^2 z\oplus x^2y}\newline &=& \ket{x, y\oplus xz \oplus xy, z\oplus zx\oplus xy}. \end{align*} $$

Thus the circuit calculates $CSWAP$.

b)

425_2

$$ \begin{align*} \ket{xyz} &\xrightarrow{CNOT_{2,3}}& \ket{x,y,z\oplus y}\newline &\xrightarrow{CSWAP_{2}}& \ket{x,y\oplus xz\oplus xy,z\oplus y}\newline &\xrightarrow{CNOT_{2,3}}& \ket{x,y\oplus xz \oplus xy, z\oplus 2y\oplus xz \oplus xy}\newline &=& \ket{x, y\oplus xz \oplus xy, z\oplus zx\oplus xy}, \end{align*} $$ which is the same output state as before.

c)

If we replace the Toffoli gate with the circuit used when implementing $C^2(U)$ for an arbitrary $U$ (exercise 4.22), we arrive at the following circuit:

425_c1

We note that the first $CNOT$ and $C(V)$ act on the same qubits, so they can be regarded as one, two-qubit gate. We also use the fact that $V^\dagger V = VV^\dagger$, and move the last $C(V)$ gate forward 3 spots (this is also possible because the parity is maintained when doing this), netting the following circuit

425_c2

d)

Can it be done in less? The first step towards this was to move the last $C(V)$ forward2 and noting that the last two $CNOTS$ commute.

425_c3

Like we did before, we note that the $C(V^\dagger)$ and $CNOT$ act on the same qubits and we can regard them as a single gate. Then we built the Toffoli with 5, two-qubit gates.

425_c4

4.26

The effect of this circuit is $$ \ket{xyz}\rightarrow\ket{xy}R_Y(-\pi/4)X^y R_Y(-\pi/4) X^xR_Y(\pi/4) X^y R_Y(\pi/4)\ket{z}. $$

Computing this matrix we have $$ \begin{align*} R_Y(-\pi)X &= \begin{pmatrix} \cos\pi/2 & \sin\pi/2\newline -\sin\pi/2 & \cos\pi/2 \end{pmatrix}\begin{pmatrix} 0&1\newline 1&0\end{pmatrix}\newline &= \begin{pmatrix} 1&0\newline 0&-1\end{pmatrix} = Z, \end{align*} $$ so $$ \begin{align*} \ket{xyz} &\rightarrow e^{i\pi z}\ket{xyz} \equiv e^{i\pi z}\ket{xy}X^{xy}\ket{z}. \end{align*} $$

This means that, up to a relative phase, this circuit is operationally the same as a Toffoli gate.

4.28

I haven’t attempted a concrete solution, but wouldn’t a particular case of exercise 4.30 solve this?

4.29

4.30

4.31

4.32

4.33

4.34

4.35

4.36

4.37

4.38

4.39

4.40

4.41

4.42

4.43

4.44

4.45

4.46

Let $\rho$ e a density matrix for a system with $n$ qubits. Then its dimensions are $2^n\times 2^n$ which means it has $4^n$ total terms.

Since $\rho$ is a density matrix, it satisfies two conditions:

  1. $\text{tr}(\rho) = 1$
  2. $\rho = \rho^\dagger$

For the diagonal terms, 1. means that one of the terms can be expressed in terms of the others. 2. means that, since $\rho_{ii} = \rho_{ii}^\dagger$, they are real numbers.

For the off diagonal terms, 2. means that we only need half of the total terms. Furthermore, since they are complex numbers, we need 2 real amplitudes to describe them.

Then the total real numbers needed is

$$ 2\left[\cfrac{2^n(2^n-1)}{2}\right]+ 2^n-1 = 4^n-1. $$

4.47

We showed in exercise 2.54 that for operators $A$ and $B$ $$ \exp(A+B) = \exp(A)\exp(B)$$ as long as $[A,B] = 0$.

In this case, we know that (for $j\neq 1$) $[H_1,H_j] = 0 \ \Rightarrow [-iH_1t, -iH_jt] = 0$. Thus, because of the linearity of the commutator, we have $$ \begin{align*} [-iH_1t,-iH_2t] + [-iH_1t,-iH_3t] + \ldots + [-iH_1t,-iH_Lt] &= 0\newline = [-iH_1t,-i\sum_{k=2}^L H_kt] &= 0, \end{align*} $$ which means that $$ \exp(-iHt) = \exp\left(-iH_1-i\sum_{k=2}^L H_kt\right) = \exp(-iH_1t)\exp\left(-i\sum_{k=2}^L H_kt\right). $$ We can apply this iteratively for every term, since $[H_i, H_j] = 0, \ \ \forall \ i,j$.

4.48

By allowing each $H_k$ to involve $c$ subsystems, the number of terms we need to describe the total interaction is bounded by $$ \dbinom{n}{c} = \cfrac{n!}{c!(n-c)!} = O(n^c). $$

4.49

We can assume that Trotter’s formula is a given, and we try to find an equivalent formulation. We apply similar reasoning to the original proof, where the assumed last step is elevating to the power of $n$ and taking the limit to infinity (I swap $\Delta t/n$ for $\Delta t$ for readability purposes).

a) $\ \ e^{(A+B)\Delta t} = e^{A\Delta t}e^{B\Delta t}e^{-\frac{1}{2}[A,B]\Delta t^2}+ O(\Delta t^3)$

$$ \begin{align*} \exp[(A+B)\Delta t] &= \Bbb I + (A+B)\Delta t +\frac{\Delta t^2}{2}(A+B)^2 + O(\Delta t^3)\newline &= \Bbb I + (A+B)\Delta t +\frac{\Delta t^2}{2}(A^2+B^2+AB+BA) + O(\Delta t^3) \hspace{1cm} (\bigstar)\newline &= \Bbb I + (A+B)\Delta t +\frac{\Delta t^2}{2}(A^2+B^2+2AB-AB+BA)+ O(\Delta t^3)\newline &= \left[\Bbb I + (A+B)\Delta t +\frac{\Delta t^2}{2}(A^2+B^2+2AB)+ O(\Delta t^3)\right]\left[\Bbb I -\frac{\Delta t^2}{2}[A,B]+ O(\Delta t^3)\right]\newline &= \left[\Bbb I + A\Delta t +\frac{\Delta t^2}{2}A^2+ O(\Delta t^3)\right]\left[\Bbb I + B\Delta t +\frac{\Delta t^2}{2}B^2+ O(\Delta t^3)\right]\left[\Bbb I -\frac{\Delta t^2}{2}[A,B]+ O(\Delta t^3)\right]\newline &= \exp(A\Delta t)\exp(B\Delta t)\exp\left(-\frac{1}{2}[A,B]\Delta t^2\right)+ O(\Delta t^3). \end{align*} $$

b) $\ \ e^{i(A+B)\Delta t} = e^{iA\Delta t}e^{iB\Delta t}+O(\Delta t^2)$

$$ \begin{align*} \exp(iA\Delta t) \exp(iB\Delta t) &= \left[\Bbb I + iA\Delta t -\frac{\Delta t^2}{2}A^2 + O(\Delta t^3)\right] \left[\Bbb I + iB\Delta t -\frac{\Delta t^2}{2}B^2 + O(\Delta t^3)\right]\newline &= \left[\Bbb I + i(A+B)\Delta t - \frac{\Delta t^2}{2}(A^2+B^2+2AB) +O(\Delta t^3)\right]. \end{align*} $$

Comparing with $(\bigstar)$ from the previous problem (and substituting $iA$ for $A$) we can see that

$$ \begin{align*} \exp[i(A+B)\Delta t] &= \left[\Bbb I + i(A+B)\Delta t + O(\Delta t^2)\right]\newline &= \exp(iA\Delta t) \exp(iB\Delta t) + O(\Delta t^2). \end{align*} $$

c) $ \ \ e^{i(A+B)\Delta t} = e^{iA\Delta t/2}e^{iB\Delta t}e^{iA\Delta t/2} + O(\Delta t^3)$

$$ \begin{align*} e^{iA\Delta t/2} e^{iB\Delta t} e^{iA\Delta t/2} = &\left[\Bbb I + i\left(\frac{A}{2}+B+\frac{A}{2}\right)\Delta t +\right.\newline &\left. -\frac{\Delta t^2}{2}\left(\frac{A^2}{4}+B^2+2\frac{A}{2}B+\frac{A^2}{4}+\frac{A^2}{2}+BA\right) +O(\Delta t^3)\right]\newline =& \ \Bbb I + i(A+B)\Delta t - \frac{\Delta t^2}{2}(A^2+B^2+AB+BA) +O(\Delta t^3), \end{align*} $$ which is equivalent to $(\bigstar)$. Thus $$\exp[i(A+B)\Delta t] = \exp(iA\Delta t/2)\exp(iB\Delta t)\exp(iA\Delta t/2) + O(\Delta t^3). $$

4.50

a)

$$ \begin{align*} U_{\Delta t} &= \left[e^{-iH_1\Delta t}\cdots e^{-iH_L\Delta t}\right]\left[e^{-iH_L\Delta t}\cdots e^{-iH_1\Delta t}\right]\newline &= e^{-iH_1\Delta t}\cdots \left[e^{-iH_{L-1}\Delta t}e^{-2iH_{L}\Delta t}e^{-iH_{L-1}\Delta t}\right]\cdots e^{-iH_{1}\Delta t}. \end{align*} $$

Using the exponentiation approximation shown in 4.49c, the middle term becomes $$ \begin{align*} U_{\Delta t} &= e^{-iH_1\Delta t}\cdots e^{-iH_{L-2}}\left[e^{-2i(H_{L-1}+H_{L})\Delta t} + O(\Delta t^3)\right]e^{-iH_{L-2}}\cdots e^{-iH_{1}\Delta t}\newline &= e^{-iH_1\Delta t}\cdots \left[e^{-iH_{L-2}}e^{-2i(H_{L-1}+H_{L})\Delta t}e^{-iH_{L-2}}\right]\cdots e^{-iH_{1}\Delta t} + O(\Delta t^3)\newline & \hspace{0.2cm}\vdots\newline &= e^{-2i\sum_k^L H_k \Delta t} + O(\Delta t^3) = e^{-2iH\Delta t} + O(\Delta t^3). \end{align*} $$

b)

The approximation error between $U_{\Delta t}$ and $\exp(-2iH\Delta t)$ is defined as

$$ E(U_{\Delta t}, e^{-2iH\Delta t}) = \underset{\ket{\psi}}{\max} \lVert (U_{\Delta t} - e^{-2iH\Delta t})\ket{\psi}\rVert = O(\Delta t^3). $$ Furthermore, due to equation 4.63 in N&C $$ \begin{align*} E(U_{\Delta t}^m, e^{-2miH\Delta t}) &= E(\underbrace{U_{\Delta t}\cdots U_{\Delta t}}_{m}, \underbrace{e^{-2iH\Delta t}\cdots e^{-2iH\Delta t}}_{m})\newline &\leq \sum_k^m E(U_{\Delta t}, e^{-2iH\Delta t}) = m O(\Delta t^3). \end{align*} $$ Finally, by definition we have that $O(\Delta t^3) = \alpha\Delta t^3$ for some $\alpha > 0$, and

$$ E(U_{\Delta t}^m, e^{-2miH\Delta t}) = m\alpha\Delta t^3. $$

4.51

For the hamiltonian $\cal{H}$ $= X_1\otimes Y_2\otimes Z_3$ we just need to transform the first and second qubit operations to $Z$. We can decompose them as

so that

451

is the circuit that simulates $\cal H$. The gate $\boxed{\pi/2}$ represents a phase gate of $\pi/2$, but we could omit it as it is just a global phase (alternatively we could apply this gate to any qubit).3


  1. This almost like some weird ASCII art, if you squint a little bit. ↩︎

  2. I did this before starting the final question of the exercise to save on the amount of images I needed to load. In my opinion, that one extra image wasn’t worth much. ↩︎

  3. This feels a bit wrong to do, because it lacks symmetry in the circuit design. An alternative (and symmetrical) decomposition would be $Y_2 = S_2 X_2 S_2^\dagger = S_2 H_2 Z_2 H_2 S_2^\dagger$. ↩︎