# does CNOT gate cause entanglement?

I have just started learning Quantum computing.

Pairs of qubits that are “entangled,” which means the two members of a pair exist in a single quantum state. Changing the state of one of the qubits will instantaneously change the state of the other one in a predictable way

For the below circuit, is this entanglement because changing q0 we are changing q1? if yes, is it so easy to create entanglement? The answer is yes and no depending on the state it acts upon.

If you perform a CNOT gate on the state $$|00\rangle$$ with the first qubit being controlled and the second qubit being the target then nothing happens. Thus, the resulting state is not entangled. This is the second circuit in your question.

$$CX_{0,1} |00\rangle = |00\rangle$$

If you perform the same CNOT gate to the state $$|10\rangle$$ then the resulting state is $$|11\rangle$$ which again is a product (not entangled) state.

$$CX_{0,1} |10\rangle = |11\rangle$$

This is the first circuit you have in your question.

However, if you perform the same CNOT gate to the product (not entangled state) state $$|\psi_0 \rangle = \dfrac{ (|0\rangle + |1\rangle) \otimes |0\rangle }{\sqrt{2}} = \dfrac{|00\rangle + |10\rangle}{\sqrt{2}}$$ then your result is an entangled state of the form $$|\psi \rangle = \dfrac{|00\rangle + |11\rangle}{\sqrt{2}}$$. This is also known as the Bell state. So that is,

$$CX_{0,1} \dfrac{|00\rangle + |10\rangle}{\sqrt{2}} = \dfrac{|00\rangle + |11\rangle}{\sqrt{2}}$$

The corresponding circuit here is: The Hadamard gate ($$H$$) brings the initial state $$|00\rangle$$ to the state $$|\psi_0 \rangle = \dfrac{ (|0\rangle + |1\rangle) \otimes |0\rangle }{\sqrt{2}} = \dfrac{|00\rangle + |10\rangle}{\sqrt{2}}$$.

So in summary, the resulted state after the application of the CNOT gate is entangled of not is depending what the prior state before the application of the CNOT gate is.

Yes, a circuit that lacks two qubit gates like CNOT gate can't create entanglement state! However, you don't have entanglement just because you have two qubit gates in your circuit.

There are way more entangle states then there are unentangle states so it is not hard to make a circuit to create a state with some degree in entanglement in your system. In fact, if you create a circuit randomly from single and two qubit gates, you will almost surely generate an entangled state.

Q: Is this entanglement because changing q0 we are changing q1?

A: Yes, an entangled state of the two qubits can be made via an gate on the control qubit, followed by the CNOT gate. This generates a particular maximally entangled two-qubit state known as a Bell state, named after John Stewart Bell.

Q: If yes, is it so easy to create entanglement?

A: This phenomena is the power of quantum computing, which is not resolved yet. The source of entanglement remains controversial even today. It is just there and easy to make, because it already there.

Tip: Take a look at my answer from last year, how a CNOT gate works.

If input states to control ($$q_c$$) and target ($$q_t$$) qubits are basis states $$|0\rangle$$ and $$|1\rangle$$, then after application of CNOT control qubit remains unchanged and target qubit state is chnaged to $$q_c \oplus q_t$$, where $$\oplus$$ is classical XOR function. So, in this case, no entanglement is established.
However, situation is different in case there is a state $$\alpha|0\rangle + \beta|1\rangle$$ ($$\alpha, \beta \in \mathbb{C}, |\alpha|^2+|\beta|^2 = 1$$) on control qubit. Then final state is $$\alpha|00\rangle + \beta|11\rangle$$ in case target qubit was previously in state $$|0\rangle$$, or $$\alpha|01\rangle + \beta|10\rangle$$ if the target was previously in state $$|1\rangle$$. Now, we have entangled states.