Equivalence of these quantum circuits

Click For Summary

Discussion Overview

The discussion revolves around the equivalence of two quantum circuits, focusing on the behavior of qubits under the influence of Hadamard and C-NOT gates. Participants explore theoretical aspects and mathematical representations related to the circuits, aiming to understand how the outputs relate to the inputs in terms of quantum states.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant describes the output states of the circuits and expresses confusion about the entanglement and the effect of Hadamard gates on the output.
  • Another participant suggests using the matrix form of Hadamard gates acting on the qubits to analyze the circuits.
  • A third participant proposes two methods to demonstrate circuit equivalence: using the computational basis and the matrix representation of the gates.
  • The second method is elaborated with detailed calculations involving the Hadamard gate and C-NOT gate, leading to a complex expression of the output states.
  • There is a discussion about the conditions under which certain equalities hold in the calculations, specifically regarding the values of the qubits.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the equivalence of the circuits, as there are multiple approaches and interpretations presented. The discussion remains unresolved with respect to the clarity of the output states and the implications of the calculations.

Contextual Notes

Participants express uncertainty about the entangled nature of the output states and the mathematical steps required to separate them for analysis. The discussion relies on specific definitions and representations of quantum gates, which may not be universally agreed upon.

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: 262
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.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 27 ·
Replies
27
Views
4K