5
$\begingroup$

Show that a $CZ$ gate can be implemented using a $CNOT$ gate and Hadamard gates and write down the corresponding circuit.

Recall from Quantum Information Theory that $Z=HXH$. As $CNOT$ is a controlled-$X$ operation, we would expect that $CZ= (I \otimes H)CNOT(I\otimes H)$.

Why would we expect this form? Where does this come from?

$\endgroup$

3 Answers 3

3
$\begingroup$

Here is the CNOT gate:

$$CNOT = |0\rangle \langle 0|\otimes I + |1\rangle \langle 1| \otimes X$$

So:

$$(I \otimes H) CNOT (I \otimes H) = |0\rangle \langle 0|\otimes HH + |1\rangle \langle 1| \otimes HXH$$

If we will take into account $HXH = Z$ and $HH = I$, then:

$$(I \otimes H) CNOT (I \otimes H) = |0\rangle \langle 0|\otimes I + |1\rangle \langle 1| \otimes Z = CZ$$


Let's show that $CNOT = |0\rangle \langle 0|\otimes I + |1\rangle \langle 1| \otimes X$:

$$ |0\rangle \langle 0|\otimes I + |1\rangle \langle 1| \otimes X = \begin{pmatrix}1&0 \\ 0&0 \end{pmatrix} \otimes\begin{pmatrix}1&0 \\ 0&1 \end{pmatrix} + \begin{pmatrix}0&0 \\ 0&1 \end{pmatrix} \otimes\begin{pmatrix}0&1 \\ 1&0 \end{pmatrix} = \\ =\begin{pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&0&0 \\ 0&0&0&0 \\ \end{pmatrix} + \begin{pmatrix} 0&0&0&0 \\ 0&0&0&0 \\ 0&0&0&1 \\ 0&0&1&0 \\ \end{pmatrix} = \begin{pmatrix} 1&0&0&0 \\ 0&1&0&0 \\ 0&0&0&1 \\ 0&0&1&0 \\ \end{pmatrix} = CNOT$$

$\endgroup$
0
2
$\begingroup$

enter image description hereThe form $(I \otimes H)CNOT(I \otimes H)$ just means that you have a control qubit whose state is left unchanged (applying the $I$ operator), and a target qubit whose state is operated with $H$, controlled-$X$ and $H$ again. This is actually a controlled-$Z$ operator applied to a two-qubit system.

$\endgroup$
2
$\begingroup$

In simple words:

  • if a control qubit of CNOT is $|0\rangle$, $I$ is applied on target qubit. Since $H^2=I$, $HIH=I$ and nothing is done on the target qbubit
  • if the control qubit of CNOT is $|1\rangle$, an operator $HXH=Z$ is applied on the target qubit.

Hence we have controlled $Z$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.