# CNOT gate - control qubit is in superposition

If a control qubit is in superposition, how it will affect target qubit if it is collapsed or in superposition? Is it true that CNOT works only if the control bit collapsed to 1? Also, is it possible to collapse or Hadamard control qubit “on the go” in a real life quantum computer and have a functional CNOT gate?

• If control bit is |1/2, 1/2| , output will be always unchanged? – Olexander Korenyuk Dec 9 '18 at 18:04
• I tried answering your question in the way I understood it. But I am not sure what you mean about collapse. For me, we use the word collapse when we measured qubits. I think you meant when it is only in $|0\rangle$ or $|1\rangle$ state. – cnada Dec 9 '18 at 18:10
• Can you reformulate you question? What is it exactly you are asking? – nippon Dec 9 '18 at 18:20

By an example with a control qubit in superposition and the target in $$|0\rangle$$ state:

$$\frac{|0\rangle + |1\rangle}{\sqrt{2}} |0\rangle = \frac{|0\rangle|0\rangle + |1\rangle |0\rangle}{\sqrt{2}}$$

Applying a CNOT will have the following result: $$\frac{ CNOT(|0\rangle|0\rangle + |1\rangle |0\rangle)}{\sqrt{2}} = \frac{ CNOT(|0\rangle|0\rangle) + CNOT(|1\rangle |0\rangle)}{\sqrt{2}} = \frac{ |0\rangle|0\rangle + |1\rangle |1\rangle}{\sqrt{2}}$$

That is the CNOT acts linearly with a control qubit in superposition, but will change the target only on the part involving a $$|1\rangle$$ in the control qubit.

• Thanks! I had misunderstanding that control qubit should be strictly |1⟩ to make CNOT flip. – Olexander Korenyuk Dec 9 '18 at 20:42
• Could you please clarify why you multiply two qubits before CNOT? – Olexander Korenyuk Dec 9 '18 at 20:44
• Well you can do this because of the tensor product, which makes you formulate your system of two qubits as one state like this. You apply the CNOT gate on a 2-qubit system state. – cnada Dec 9 '18 at 22:48
• Got it. Thanks. Its a rocket science, indeed. – Olexander Korenyuk Dec 27 '18 at 13:55