# CNOT gate an elementary example of a single qubit quantum operation

A natural way to describe the dynamics of an open quantum system is to regard it as arising from an interaction between the system of interest and an environment, which together form a closed quantum system. In other words, suppose we have a system in state $$\rho$$, which is sent into a box that is coupled to an environment. In general, the final state of the system, $$\mathcal{E}{(\rho)}$$, may not be related by a unitary transformation to the initial state $$\rho$$. Assuming that the system–environment input state is a product state, $$\rho\otimes\rho_{env}$$. After the box’s transformation, $$U$$ the system no longer interacts with the environment, and thus we perform a partial trace over the environment to obtain the reduced state of the system alone: $$\mathcal{E}(\rho)=tr_{env}\Big[U(\rho\otimes\rho_{env})U^\dagger\Big]$$

As an explicit example of the use of this equation, consider the two qubit quantum circuit in which $$U$$ is a controlled-NOT gate, with the principal system the control qubit, and the environment initially in the state $$\rho_{env}=|0\rangle\langle 0|$$ as the target qubit.

Substituting $$U=U_{CNOT}=|0\rangle\langle 0|\otimes I+|1\rangle\langle 1|\otimes X$$ and $$\rho_{env}=|0\rangle\langle 0|$$ into the equation $$\mathcal{E}(\rho)=tr_{env}\Big[U(\rho\otimes\rho_{env})U^\dagger\Big]$$ $$\mathcal{E}(\rho)=tr_{env}\Big[(|0\rangle\langle 0|\otimes I+|1\rangle\langle 1|\otimes X)(\rho\otimes |0\rangle\langle 0|)(|0\rangle\langle 0|\otimes I+|1\rangle\langle 1|\otimes X^\dagger)\Big]\\ =tr_{env}\Big[|0\rangle\langle 0|\rho|0\rangle\langle 0|\otimes|0\rangle\langle 0|+|1\rangle\langle 1|\rho|1\rangle\langle 1|\otimes X|0\rangle\langle 0|X^\dagger+|0\rangle\langle 0|\rho|1\rangle\langle 1|\otimes X^\dagger+|1\rangle\langle 1|\rho|0\rangle\langle 0|\otimes X\Big]\\ =|0\rangle\langle 0|\rho|0\rangle\langle 0|\otimes.tr(|0\rangle\langle 0|)+|1\rangle\langle 1|\rho|1\rangle\langle 1|\otimes .tr(X|0\rangle\langle 0|X^\dagger)+|0\rangle\langle 0|\rho|1\rangle\langle 1|\otimes .tr(X^\dagger)+|1\rangle\langle 1|\rho|0\rangle\langle 0|\otimes .tr(X)\\ =|0\rangle\langle 0|\rho|0\rangle\langle 0|\otimes\langle 0|0\rangle+|1\rangle\langle 1|\rho|1\rangle\langle 1|\otimes \langle 0|X^\dagger X|0\rangle+|0\rangle\langle 0|\rho|1\rangle\langle 1|\otimes tr\begin{bmatrix}0&1\\1&0\end{bmatrix}+|1\rangle\langle 1|\rho|0\rangle\langle 0|\otimes tr\begin{bmatrix}0&1\\1&0\end{bmatrix}\\ =|0\rangle\langle 0|\rho|0\rangle\langle 0|+|1\rangle\langle 1|\rho|1\rangle\langle 1|+|0\rangle\langle 0|\rho|1\rangle\langle 1|\otimes 0+|1\rangle\langle 1|\rho|0\rangle\langle 0|\otimes 0\\ =|0\rangle\langle 0|\rho|0\rangle\langle 0|+|1\rangle\langle 1|\rho|1\rangle\langle 1|$$

obtains $$\mathcal{E}(\rho)=|0\rangle\langle 0|\rho |0\rangle\langle 0|+|1\rangle\langle 1|\rho |1\rangle\langle 1|=P_0\rho P_0+P_1\rho P_1$$ where $$P_0=|0\rangle\langle 0|$$ and $$P_1=|1\rangle\langle 1|$$ are projection operators.

My understanding about CNOT gate is that the control qubit remains the same and only the target qubit flips iff the control qubit state is $$|1\rangle$$.

Since that is the case, why are we getting $$\mathcal{E}(\rho)=P_0\rho P_0+P_1\rho P_1$$ ? What is special about it ?

Why don't we simply have $$\mathcal{E}(\rho)=\rho$$ ?

Then it stated that

Intuitively, this dynamics occurs because the environment stays in the $$|0\rangle$$ state only when the system is $$|0\rangle$$; otherwise the environment is flipped to the state $$|1\rangle$$.

I understand the CNOT operation, but what dynamics does this imply?

• @MarkS Thanks for responding. I have added the section of N&C where this lies. Please have a look Sep 8, 2022 at 9:52
• to be clear, are you asking why ${\rm Tr}_{\rm env}(U(\rho\otimes\rho_{\rm env})U^\dagger)\neq\rho$ when $U$ is the CNOT?
– glS
Sep 8, 2022 at 9:57
• @glS That is certainly one of the doubts. Sep 8, 2022 at 20:18

First let's clarify the configuration of the system described in the book - Given a principal system in inital state $$\rho$$ and the environement being simplified to a system in an initial state $$|0\rangle$$ (As explained in the book, being used here a method to describe an open quantum system as a closed quantum system consisted of 2 sub-systems - which are the prinicipal system and the environment). The interaction between the principal system and the environment occurs only through the unitary operator $$U$$, which in that specific case is defined as a $$CNOT$$ gate with the principal system as the control qubit and the environment as the target qubit.

$$CNOT$$ gates can create correlation between qubits known as entanglement. If $$\rho = |0\rangle\langle0|$$ or $$\rho = |1\rangle\langle1|$$ then there is no superposition in the control qubit and no entanglement is being created. But if the prinicipal system is in some superposition state (and given that the environment is in state $$|0\rangle$$ in that case), then the $$CNOT$$ entangles the principle system and the environment and now the overall state of the system is not separable - I.e one can't describe the state of the principal system alone nor the environment alone, and thus also describing the overall state with kronecker product of the 2 sub-systems is not possible as well.

What we can do is obtain some information on the state of a subsystem by using partial trace in order to form the reduced density matrix of a subsystem. The equation $$\mathcal{E}(\rho) = tr_{env}[U (\rho \otimes \rho_{env}) U^{\dagger}]$$ is exactly that - We are obtaining the reduced density matrix of the principal system by taking a partial trace of the environment from the density matrix of the overall system after going through $$U$$ (which is $$U (\rho \otimes \rho_{env}) U^{\dagger})$$.

So regarding this question:

My understanding about $$CNOT$$ gate is that the control qubit remains the same and only the target qubit flips iff the control qubit state is $$|1⟩$$.

Since that is the case, why are we getting $$\mathcal{E}(ρ)=P_0ρP_0+P_1ρP_1$$? What is special about it?

If the control qubit is in superposition before the $$CNOT$$, and as long as the target qubit isn't in an eigenstate of the $$X$$ gate - Then the state of the system after the $$CNOT$$ will not be separable, and thus there is no other way to describe the state of the control qubit (or the target qubit) alone, but to use this method.

Reagrding this question:

Intuitively, this dynamics occurs because the environment stays in the $$|0⟩$$ state only when the system is $$|0⟩$$; otherwise the environment is flipped to the state $$|1⟩$$.

I understand the $$CNOT$$ operation, but what dynamics does this imply?

If I need to explain the author's intention, I would say that by the term dynamics he meant to the affect of the $$CNOT$$ gate on the principal system, which its post-$$U$$ state is best-described by the reduced density matrix $$\mathcal{E}(\rho)$$.

• How do you say that "if the prinicipal system is in some superposition state then the CNOT entangles the principle system and the environment and now the overall state of the system is not separable" ? Can you suggest an example ? Sep 8, 2022 at 14:03
• $U_{CNOT}|+\rangle|-\rangle=|-\rangle|-\rangle$, here principal system is in a superposition state $|+\rangle=\frac{|0\rangle+|1\rangle}{\sqrt{2}}$ but overall state of the system seems to be separable ? Sep 8, 2022 at 14:05
• 1. Any bell state would be an example.. consider the bell state $|\Phi^+ \rangle = |00\rangle + |11\rangle$. Try to describe the state of each qubit separately. It’s not possible.
Sep 8, 2022 at 14:12
• Of course |$\Phi^{+}\rangle = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)$ (a little correction to the previous commnent). Anyway any entangled state is not separable. That’s a fundamental property of the entanglement phenomenon.
Sep 8, 2022 at 14:23
• 2. You are right that $CNOT(|+\rangle,|-\rangle) = |-\rangle|-\rangle$, but that’s a private case of $CNOT$ that doesn’t create entanglement.. It happens because $|-\rangle$ is an eigenstate of the $X$ gate. So by applying $CNOT(|+\rangle,|-\rangle)$ the eigenvalue $-1$ is kicked backed (it is the well known phase kickback phenomenon) towards the control qubit and the resulted state is the product state (I.e not entangled state) $|-\rangle|-\rangle$.
Sep 8, 2022 at 14:32

My understanding about CNOT gate is that the control qubit remains the same and only the target qubit flips iff the control qubit state is $$|1\rangle$$.

This is a reasonable intuition but it is actually untrue for quantum systems! For the CNOT, if the input state is in the computational basis, then it's true, but generally a multi-qubit gate can't leave any input qubit the same for all inputs, otherwise it would either be irreversible or not really a multi-qubit gate.

Let $$|+\rangle = \frac{1}{\sqrt{2}}(\vert 0\rangle + \vert 1\rangle$$ and $$\vert -\rangle = \frac{1}{\sqrt{2}}(\vert 0\rangle - \vert 1 \rangle)$$. You can show (two ways: one is directly, the other is to look at how $$H$$ gates commute with the CNOT) that for a CNOT gate:

$$CNOT\vert +\rangle \vert -\rangle = \vert - \rangle \vert - \rangle$$ $$CNOT \vert - \rangle \vert - \rangle = \vert + \rangle \vert - \rangle$$

That is, in this basis, the CNOT does nothing to the target qubit, but flips the control qubit!

I hope this helps with the intuition of why measuring the target qubit can affect the control qubit.

• Thanks, I think that makes sense now. Sep 8, 2022 at 20:20