Equivalence of these quantum circuits

In summary, the conversation discusses two quantum circuits that are equivalent and the attempt to understand how they are equivalent. The first method of showing equivalence is through the computational basis and the second method is through the matrix representation of the involved gates. The Hadamard gate acts on a single qubit by flipping the state and the CNOT gate involves two qubits, with one being unchanged and the other being bitwise-added to the first one. The conversation also includes a step-by-step explanation of how the two circuits are equivalent using the first method, and suggests that the second method would involve using the CNOT matrix representation and the 4x4 Hadamard gate matrix.
  • #1
lholmes135
12
0
TL;DR Summary
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: 172
Physics news on Phys.org
  • #2
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##.
 
  • #3
This is what I was looking for, thanks.
 
  • #4
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.
 

What is the concept of "equivalence" in quantum circuits?

Equivalence in quantum circuits refers to the idea that two circuits can produce the same output for a given input. This means that the two circuits perform the same logical function, even if they may be composed of different gates or have a different arrangement of gates.

How do you determine if two quantum circuits are equivalent?

To determine if two quantum circuits are equivalent, one can use techniques such as circuit rewriting, equivalence checking algorithms, or simulation methods. These methods involve breaking down the circuits into smaller components and comparing them to see if they produce the same output for a given input.

What are the implications of two quantum circuits being equivalent?

If two quantum circuits are equivalent, it means that they can be used interchangeably in a larger quantum computation without affecting the overall result. This can be useful for optimizing circuit designs or for implementing the same function using different quantum hardware.

Can two quantum circuits be equivalent even if they have a different number of qubits?

Yes, two quantum circuits can be equivalent even if they have a different number of qubits. This is because the number of qubits does not necessarily determine the logical function of a circuit. As long as the two circuits produce the same output for a given input, they can be considered equivalent.

What are some practical applications of understanding the equivalence of quantum circuits?

Understanding the equivalence of quantum circuits is important for optimizing circuit designs, verifying the correctness of quantum algorithms, and for developing efficient quantum error correction codes. It can also aid in the development of more robust and reliable quantum computing technologies.

Similar threads

  • Advanced Physics Homework Help
Replies
3
Views
1K
Replies
0
Views
147
Replies
1
Views
1K
Replies
2
Views
1K
Replies
3
Views
797
  • Quantum Physics
Replies
2
Views
2K
  • Quantum Physics
Replies
6
Views
815
Replies
16
Views
1K
  • Quantum Physics
Replies
6
Views
1K
Replies
3
Views
866
Back
Top