# What happens if two separately entangled qubits are passed through a C-NOT gate?

Suppose I transform a state as follows:

1. I start with the state $\lvert 0\rangle \otimes \lvert0\rangle \otimes \lvert0\rangle \otimes \lvert 0 \rangle$.
2. I entangle the 1st and 2nd qubits (with an H gate and C-NOT).
3. I then then entangle the 3rd and 4th qubits the same way.

If I try to apply H gate and C-NOT to the 2nd and 3rd qubits afterwords, will the whole system become entangled? What happens to the 1st and 4th qubits in that case?

• – Emilio Pisanty Apr 19 '18 at 14:00
• I've focused your post down to the first question you asked, which is the more interesting of the two. You should try to avoid asking more than one question per post unless they are very closely related. – Niel de Beaudrap Apr 19 '18 at 14:01
• It would also be nice if the question included an explicit quantum circuit to inequivocally visualize the gates that are being applied. – agaitaarino Apr 19 '18 at 14:25
• Thanks for your questions! As others have said, it is better to have one question per post. If you repost the second question as separate question, I'm sure you'll get a detailed answer to that too. Though the DaftWullie's answer also does a good job. – James Wootton Apr 19 '18 at 14:51
• Thank you for your very quick response. I am a noobie to this quantum computing field. I recently watched 'quantum computing for the determined' [link] (youtu.be/X2q1PuI2RFI?list=PL1826E60FD05B44E4) playlist from youtube. Now, I am trying to create a programming library to emulate QC (i know there are already). Can anybody link me some source, that I can actually learn all the technical stuff? like, I didn't know the purpose of 'ρ' until the answer. (do I need to ask this as a new question?) – Midhun XDA Apr 19 '18 at 17:21

The question of "is it still entangled" is straightforwardly "yes", but that is a actually a triviality of a much more complex issue. It is entangled in the sense that it is not a product state $\ket{\psi_1}\otimes\ket{\psi_2}\otimes\ket{\psi_3}\otimes\ket{\psi_4}$.
One simple way to see that this state is entangled is to pick a bipartition, i.e. a split of the qubits into two parties. For instance, let's take qubit 1 as one party (A), and all the others as party B. If we work out the reduced state of party A, a product state (unentangled) would have to give a pure state. Meanwhile, if the reduced state is not pure, i.e. has a rank greater than 1, the state is definitely entangled. For example, in this case $$\rho_A=\text{Tr}(\ket{\Psi}\bra{\Psi})=\frac{\mathbb{I}}{2},$$ has rank 2. Actually, it doesn't matter what you did between qubits 2 and 3, as $\rho_A$ is independent of that unitary; it cannot remove the entanglement created with qubit 1 (just possibly spread it between qubits 2 and 3). The fact that you have to look at different bipartitions to see which qubits are entangled with which already starts to indicate some of the complexity. For pure states, it is sufficient to look at each of the bipartitions of 1 qubit with the rest. If each of these reduced density matrices is rank 1, your whole state is separable.
Related to your question, you might like to look up issues of "monogamy of entanglement" -- the more entangled qubit 1 is with qubit 2, the less entangled qubit 1 is with qubit 3 (for example), and that can be quantified in a number of different ways. Equally, you can ask questions about "what sort of entanglement is there?". One approach is to look at what types of entanglement can be converted into different types (often termed "SLOCC equivalence classes"). For example, with 3 qubits, people make the distinction between W-state entanglement, which looks like $\ket{001}+\ket{010}+\ket{100}$ and GHZ-entanglement that looks like $\ket{000}+\ket{111}$, as well as bipartite entanglement between different pairs of qubits, and a separable state on the other. It gets really messy for 4 qubits!