Equivalence of these quantum circuits

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
lholmes135
Messages
12
Reaction score
0
TL;DR
C-NOT gate equivalent circuits
In the attached image, there are two quantum circuits that are equivalent. I am trying to understand how. Let's call the top qubit ##q_1## and the bottom one ##q_2##, and the outputs ##q_1'## and ##q_2'##. From what I understand, the C-NOT gate doesn't affect the control qubit. Because Hadamard gates are reversible, it looks to me like ##q_1'=q_1##. In the second circuit though, ##q_1'=q_1 \oplus q_2##. I also tried doing this through calculation. We'll make ##q_1=\begin{bmatrix}c_0\\c_1\end{bmatrix}## and ##q_2=\begin{bmatrix}d_0\\d_1\end{bmatrix}##. Looking at the left circuit, say the input state to the C-NOT gate is ##|\psi>## and the output state ##|\psi'>##.

\begin{equation*}
|\psi>=\frac{1}{2}\begin{bmatrix}(c_0+c_1)(d_0+d_1)\\(c_0+c_1)(d_0-d_1)\\(c_0-c_1)(d_0+d_1)\\(c_0-c_1)(d_0-d_1)\end{bmatrix}
\end{equation*}

C_NOT gate should flip third and fourth elements:

\begin{equation*}
|\psi'>=\frac{1}{2}\begin{bmatrix}(c_0+c_1)(d_0+d_1)\\(c_0+c_1)(d_0-d_1)\\(c_0-c_1)(d_0-d_1)\\(c_0-c_1)(d_0+d_1)\end{bmatrix}
\end{equation*}

The problem is that the output state is entangled, and I'm not sure how to calculate the two H gates on the right if I can't separate the states. This way turned out to be a dead end for me.
 

Attachments

  • Capture.PNG
    Capture.PNG
    1.1 KB · Views: 276
Physics news on Phys.org
You can find the matrix form of the two Hadamard gates acting on the two qubits. You can start by writing the 4x4 version of the Hadamard gate acting on a single qubit, ##H_1 \otimes I_2##.
 
This is what I was looking for, thanks.
 
I have a really basic understanding of quantum circuits but let me try to help

lholmes135 said:
In the attached image, there are two quantum circuits that are equivalent. I am trying to understand how.

There are two ways to show equivalence between circuits (that I am aware of).

##1)## By means of the computational basis ##\alpha## i.e.

\begin{equation*}
\alpha = \{ |00\rangle, |11\rangle, |10\rangle, |01\rangle\}
\end{equation*}

Where

\begin{equation*}
|0\rangle = \begin{pmatrix}
1 \\
0
\end{pmatrix}, \ \ \ \
|1\rangle = \begin{pmatrix}
0 \\
1
\end{pmatrix}
\end{equation*}

##2)## By means of the matrix representation of the involved gates with respect to the computational basis.

Let me go for ##1)##. I will let you show it via ##2)##.

The Hadamard gate acts on a single qubit as follows

\begin{equation*}
H |0 \rangle = \frac{1}{\sqrt{2}}\left( |0 \rangle + |1 \rangle\right) := |+ \rangle
\end{equation*}

\begin{equation*}
H |1 \rangle = \frac{1}{\sqrt{2}}\left( |0 \rangle - |1 \rangle\right) := |- \rangle
\end{equation*}

Or more compacted

\begin{equation*}
H |x \rangle = \frac{1}{\sqrt{2}}\left( |0 \rangle + (-1)^x|1 \rangle\right), \ \ \ \ \text{where} \ x \in \{ 0,1\}
\end{equation*}

The CNOT gate involves two qubits: one is left unchanged while the other is bitwise-added to the first one i.e.

7382937273.png


OK, let us focus on the given circuit. Reading from left to right (where ## x,y \in \{ 0,1\}##) we get

\begin{align}
&\left( H \otimes H \right) \text{CNOT} \left( H \otimes H \right) |x\rangle \otimes |y\rangle \nonumber \\
&= \frac 1 2 \text{CNOT} \left( |0\rangle + (-1)^x |1\rangle \right) \otimes \left( |0\rangle + (-1)^y |1\rangle \right) \nonumber \\
&= \frac 1 2 \left( H \otimes H \right) \text{CNOT} \left( |00\rangle + (-1)^{x+y}|11\rangle + (-1)^{y}|01\rangle + (-1)^{x}|10\rangle \right) \nonumber \\
&= \frac 1 2 \left( H \otimes H \right) \left( |00\rangle + (-1)^{x+y}|10\rangle + (-1)^{y}|01\rangle + (-1)^{x}|11\rangle \right) \nonumber \\
&= \frac 1 2 \left( |++\rangle + (-1)^{x+y}|-+\rangle + (-1)^{y}|+-\rangle + (-1)^{x}|--\rangle \right) \nonumber \\
&= \frac 1 2 \Big[ |+\rangle \otimes \left( |+\rangle + (-1)^{y}|-\rangle \right) + |-\rangle \otimes \left( (-1)^{x+y}|+\rangle + (-1)^{x}|-\rangle \right)\Big] \nonumber \\
&= \frac 1 2 \Big[ |+\rangle \otimes \left( |+\rangle + (-1)^{y}|-\rangle \right) + (-1)^{x+y} |-\rangle \otimes \left( |+\rangle + (-1)^{-y}|-\rangle \right)\Big] \tag{1}\\
&= \frac 1 2 \Big[ |+\rangle \otimes \left( |+\rangle + (-1)^{y}|-\rangle \right) + (-1)^{x+y} |-\rangle \otimes \left( |+\rangle + (-1)^{y}|-\rangle \right)\Big] \tag{2}\\
&= \frac 1 2 \Big[\left( |+\rangle + (-1)^{x+y}|-\rangle \right) \otimes \left( |+\rangle + (-1)^{y}|-\rangle \right) \Big] \nonumber \\
&= \frac 1 4 \left( (1+ (-1)^{x+y})|0\rangle + (1- (-1)^{x+y})|1\rangle \right) \otimes \left( (1+ (-1)^{y})|0\rangle + (1- (-1)^{y})|1\rangle \right) \nonumber \\
&= |x \oplus y \rangle |y \rangle \nonumber
\end{align}

Where we notice that for ##(1) = (2)## to hold we need ##(-1)^{x} = (-1)^{2y + x}##. We have two cases; Case A ##x=1##: We note that ##y## is free to be either ##0## or ##1##. For any of those two values ##2y + x## will yield an odd number so ##(-1)^{x} = (-1)^{2y + x}## holds. Case B ##x=0##: We note that ##y## is again free to be either ##0## or ##1##. For any of those two values ##2y + x## will yield an even number so ##(-1)^{x} = (-1)^{2y + x}## again holds.

To show equivalence via ##2)## you will need to use the CNOT matrix representation as well as the ##4\times4## Hadamard matrix.