I have recently listened to a talk on quantum computing and was fascinated to learn about IBM Q Experience. Between the explanations in the User Guide and in Nielsen's book, I came to the following question:

Why does a controlled gate not act as a measurement?

enter image description here

In the common example of creating a Bell pair, we first bring a two qubit state from $| \psi \rangle = |00\rangle$ to $\frac{1}{\sqrt{2}} (|00\rangle + |10\rangle)$ with a Hadamard gate. So far so good.

But now we flip the second qubit only if the first is in state $|1\rangle$. This turns the state of the two-qubit system into $$\frac{1}{\sqrt{2}} (|00\rangle + |11\rangle).$$

How does that work without measuring the state of the first qubit?

  • 1
    $\begingroup$ Hi, welcome to QCSE. It's not as if the $\mathrm{CNOT}$ gate "looks" at the two qubits in their different states. A somewhat unsatisfactory answer is that the qubits must maintain coherence in order to apply the $\mathrm{CNOT}$ gate - the quantum gate is designed to specifically maintain coherence of the control and target qubit, for as long as possible. Maybe a better answer would explain how devices like IBM's are able to apply $2$-qubit gate while maintaining coherence. $\endgroup$ Commented Oct 19, 2019 at 12:42
  • $\begingroup$ Maybe a little late to the party but I want to drop a comment. It is not like your unitary checks that your qubit is in 0 or 1 and then puts it in 1 or 0 respectively when we apply X. Should ask the same question for other gates too, how they are able to convert the states without looking at them. In the case of the CNOT gate, it's doing the unitary transformation but it appears that one qubit is controlling the other's state. It does, in a way, but not the way we are thinking right now. It is doing the same rotations but results look different for different two qubit states. $\endgroup$
    – Prabhat
    Commented Jan 18, 2023 at 10:16

2 Answers 2


How it works depends on the choice of quantum system used for computation. For any choice of quantum system, the common theme is that $\text{CNOT}$ does not collapse the wavefunction, i.e. force a choice between $\vert 0 \rangle$ and $\vert 1 \rangle$, while a measurement does.

A simple example (oversimplified here) uses a non-linear Kerr medium to create a $\text{CNOT}$ gate with two photons acting as qubits. In this case a Hadamard gate ($H$) is created with phase shifters (slabs of transparent media with index of refraction $\ne 1$) and beam splitters (partially silvered glass), which produce the superposition of states.

The Kerr effect is a change in refractive index based on the presence of an electric field in the Kerr medium, and when two photons pass through a Kerr medium they can experience cross-phase modulation. In other words the atoms in the Kerr medium mediate an interaction between the two photons (qubits).

The upshot is that the system can be tuned such that the Kerr medium acts as the gate $$K = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & -1 \end{bmatrix}.$$ With access to $K$ and $H$, the $\text{CNOT}$ gate ($U_c$) is simply $$U_c = (I \otimes H) K (I \otimes H) = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{bmatrix}.$$ In this manner the $U_c$ gate is implemented without collapsing the wavefunction. Conversely, when a photon interacts with a photon detector (measurement) it is absorbed and converted to current or voltage, collapsing the wavefunction and forcing it to choose one definite state.

As noted above, this is an oversimplified explanation. Since you already have Nielsen and Chuang, you can see a much more rigorous treatment of this example in Section 7.4.2, as well as constructions of $\text{CNOT}$ in the context of ion traps (7.6.3) and nuclear magnetic resonance (7.7.3).


A mechanistic way of looking at it that is sure to infuriate any genuine physicists in the discussion :) is that a CNOT is two supercooled transmons interacting as described in the Open Pulse documentation and that the mystical "observation" does not occur until there is an interaction outside that environment.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.