Quantum Information HT24, Quantum gates
Flashcards
The most common universal gate set is $\{\mathtt{CNOT}, H, T\}$. Can you define each?
- $\mathtt{CNOT} = \vert 0\rangle\langle 0 \otimes I + \vert 1\rangle\langle1 \vert \otimes X$
- $H = \vert +\rangle \langle 0 \vert + \vert -\rangle\langle 1 \vert $
- $T = P(\pi / 4) = \vert 0\rangle \langle 0 \vert + e^{i\pi / 4} \vert 1\rangle\langle 1 \vert $
Define the $\mathtt{CNOT}$ gate, first as the outer product of basis states, and then as a matrix in the computational basis.
Define the Pauli matrices.
How can you consider the quantum gates $Z$, $S$ and $T$ all as “the same thing”?
They are all phase gates. Define
\[P(\varphi) = |0\rangle \langle0| + e^{i\varphi} |0\rangle\langle0|\]Then
\[Z = P(\pi), S = P(\pi / 2), T = P(\pi /4)\]Can you define the quantum gate $H$ in terms of outer products of basis states, then as a matrix, and then say what this intuitively does?
This turns the computational basis into the Fourier basis,
\[\begin{aligned} |0\rangle &\mapsto |+\rangle \\\\ |1\rangle &\mapsto |-\rangle \end{aligned}\]Can you define the quantum gate $T$ in terms of outer products of basis states and then as a matrix?
Why is this quantum gate
\[T = |0\rangle \langle 0| + e^{i\pi / 4} |1\rangle\langle 1|\]
sometimes called the $\pi/8$ gate?
Because, up to global phase
\[T = e^{-\pi i / 8} |0\rangle \langle0| + e^{\pi i /8} |1\rangle\langle 1|\]How can you write the Hadamard gate
\[\begin{aligned}
H &= |0\rangle\langle +| + |-\rangle\langle 1| \\\\
&= \frac 1 {\sqrt 2}\begin{pmatrix}
1 & 1 \\\\
1 & -1
\end{pmatrix}
\end{aligned}\]
in terms of Pauli matrices (square roots are allowed)?
The Hadamard gate is a $\pi / 2$ rotation around the $Y$-axis, followed by a $\pi$ rotation about the $X$-axis, so
\[H = X Y^{\frac 1 2}\](Note that just $H = Y^\frac{1}{2}$ doesn’t work, despite the fact that $Y^\frac{1}{2} \vert 0\rangle = \vert +\rangle$, because applying the gate again gives $ \vert 1\rangle$, but $H^2 \vert 0\rangle = \vert 0\rangle$).
How could you write $\mathtt{SWAP}$ first in terms of Pauli matrices, and then as a matrix with respect to the computational basis?
How could you write the states $ \vert \Phi^+\rangle, \vert \Phi^-\rangle, \vert \Psi^{+}\rangle, \vert \Psi^{-}\rangle$ using the CNOT gate and qubits from $ \vert 0\rangle, \vert 1\rangle, \vert +\rangle, \vert -\rangle$?
How could you write the Pauli matrices $\{X, Y, Z\}$ in terms of gates from the standard gate set $\{\mathtt{CNOT}, H, T\}$?
How could you write the controlled-$Z$ gate ($CZ$) in terms of gates from the standard gate set $\{\mathtt{CNOT}, H, T\}$?
Note that since
\[\mathtt{CNOT} = |0\rangle \langle 0| \otimes I + |1\rangle\langle 1| \otimes X\]and that
\[Z = HXH, \quad HH = I\]we can just multiply both sides by $I \otimes H$:
\[(I \otimes H) \mathtt{CNOT} (I \otimes H) = \mathtt{CZ} = |0\rangle \langle 0| \otimes I + |1\rangle\langle 1| \otimes Z\]How can you implement $\mathtt{SWAP}$ using the standard gate set $\{\mathtt{CNOT}, H, T\}$?
where $\mathtt{CNOT} _ {12}$ is $\mathtt{CNOT}$ with control on the first qubit and $\mathtt{CNOT} _ {21}$ is $\mathtt{CNOT}$ with control on the second qubit. Then, since $\mathtt{CNOT} _ {21}$ can be written as
\[(H \otimes H) \mathtt{CNOT} (H \otimes H)\]we have
\[\mathtt{SWAP} = \mathtt{CNOT} (H \otimes H) \mathtt{CNOT} (H \otimes H) \mathtt{CNOT}\]