Quantum Computing · Chapter 6

Elitzur–Vaidman Bomb Detection

This chapter shows off one of the most surprising tricks in quantum mechanics: how to find out whether a bomb works without ever setting it off. The key ideas are the Quantum Zeno effect (freezing a qubit by watching it) and interaction-free measurement, where the mere possibility of a measurement reveals information. By the end you'll see how a simple rotation gate applied many times can identify a live bomb with a probability of explosion that shrinks toward zero.

≈ 18 min read0 worked examplesOriginal PDF ↗

6.1 The Quantum Zeno Effect

Suppose we have a qubit in the state \(\ket{0}\), and we want to put it into the \(\ket{1}\) state without using unitary transformations. For some small \(\epsilon\), we can measure the qubit in a basis that's rotated from \(\{\ket{0}, \ket{1}\}\) by an angle \(\epsilon\). The probability of getting the qubit moved by \(\epsilon\) increases as \(\epsilon\) decreases.

\[\begin{aligned} P(\ket{v}) &= |\braket{0|v}|^2 = |\cos (\epsilon)|^2 \approx 1 - \epsilon^2 \quad && \text{where } \ket{v} = \cos(\epsilon) \ket{0} + \sin(\epsilon)\ket{1} \\ P(\ket{w}) &= |\braket{0|w}|^2 = |\sin (\epsilon)|^2 \approx \epsilon^2 \quad && \text{where } \ket{w} = -\sin(\epsilon) \ket{0} + \cos(\epsilon)\ket{1} \end{aligned}\]

So, by repeating this process \(\approx 1/\epsilon\) times and rotating the measurement basis by an additional angle \(\epsilon\) each time, we can slowly drag the qubit from \(\ket{0}\) to \(\ket{1}\). What's the likelihood that we ever get a measurement outcome that wasn't the one we wanted? By the union bound, it's of order \((1/\epsilon) \times \epsilon^2 = \epsilon\), so it can be made arbitrarily small. This is called the Quantum Zeno Effect. (One of its conceptual discoverers was Alan Turing.)

Another interesting variant of this effect is called the Watched Pot Effect. Suppose we want to keep a qubit at \(\ket{0}\), but it keeps rotating toward \(\ket{1}\) (i.e., it's drifting). If we keep measuring it in the \(\{\ket{0}, \ket{1}\}\) basis every time the qubit has drifted by an angle \(\epsilon\), then the probability of it jumping to \(\ket{1}\) during any given measurement is only \(\epsilon^2\). So, if we repeat the measurements \(\approx 1/\epsilon\) times, the total probability that it ends up in \(\ket{1}\) is only \(\approx \epsilon\), even though it would have drifted to \(\ket{1}\) with certainty had we not measured.

The name comes from the paradox "a watched pot never boils." A quantum state that would freely rotate away gets "pinned down" if you keep measuring it fast enough. Each tiny measurement almost always finds it where it started, and that repeated collapsing prevents it from ever building up enough rotation to jump. This constant-observation-freezes-change idea is exactly the lever the bomb detector will pull.

6.2 The Problem

We are given a device which can either be a working bomb or a dud. The device takes a quantum bit as input and produces an output.

If the device is a bomb, it performs a measurement on the qubit. If the outcome of the measurement is \(1\), then the bomb explodes; otherwise, it does not explode.

If the device is a dud, then it does nothing — i.e., the output is the same as the input.

We wish to determine whether the device is a bomb or a dud without exploding the bomb. The Elitzur–Vaidman Bomb Detection Algorithm proceeds as follows:

Approach 1: Naive Approach

We give the device, naively, the input of \(\ket{0}\) and \(\ket{1}\).

To summarize the above approach: giving input \(\ket{0}\) is of no help, as it provides no information about the device. In both cases (bomb or dud), the output will be \(\ket{0}\). Upon giving input \(\ket{1}\), if the device is a dud, then the output will be \(\ket{1}\); but if the device is a bomb, it will explode. Thus, it tells us whether the device is a bomb or a dud, but if it's a bomb, it explodes. Hence, this approach is not useful since we can never detect a working bomb.

Approach 2: Quantum Superposition Approach

Here, we use a Hadamard gate before and after the device. The circuit is shown in the figure below.

q0: ───H───[Device: M]───H───M
Figure — Elitzur–Vaidman Bomb Detection (superposition approach): a Hadamard gate, then the device (which measures only if it is a bomb), then a second Hadamard gate and a final measurement.

The first measurement occurs only if the device is a bomb.

To summarize this approach: suppose there are 1000 devices, of which 50% are bombs and 50% are duds. If we give input \(\ket{0}\) to all the devices:

Those 250 non-exploded bombs with output \(\ket{0}\) will then pass through a Hadamard gate, producing state \(\ket{+}\), and upon final measurement, will give:

Thus, from the 250 bombs that did not explode, 125 will output \(\ket{1}\) and 125 will output \(\ket{0}\).

Thus, out of the 1000 devices, 250 bombs will explode. Among the remaining 750 devices, we will get an output of \(\ket{0}\) from 625 of them — consisting of 500 duds and 125 bombs that did not explode — and an output of \(\ket{1}\) from the remaining 125 devices.

Now, we are specifically interested in the cases where the output was \(\ket{1}\) upon input \(\ket{0}\). This is only possible if the device was a bomb that did not explode — since if it were a dud, the output would always have been \(\ket{0}\). Thus, the 125 cases where the output was \(\ket{1}\) upon input \(\ket{0}\) correspond to bombs that did not explode.

So, out of the 500 bombs:

Hence, we found 25% of the working bombs without exploding them. Equivalently, we can say that:

What if the input had been \(\ket{1}\)? The result would be similar. The only difference is that the output would be \(\ket{1}\) for both duds and bombs that didn't explode. Some bombs that didn't explode would instead give output \(\ket{0}\), and those can then be identified as working bombs.

Important

Thus, we can find a working bomb with probability \(\frac{1}{8}\) out of all the devices, or with probability \(\frac{1}{4}\) given that the device is a bomb. However, note that in this process, half of the bombs (i.e., 250) exploded. Out of the remaining 250 bombs that did not explode, only half (125) were successfully identified, while the other half remained indistinguishable from duds.

The single-Hadamard trick already beats the naive method — it can spot some live bombs without blowing them up — but it's wasteful: half the bombs still detonate. The real Elitzur–Vaidman algorithm below fixes this by replacing the "big" Hadamard rotation with many tiny rotations, so the bomb almost never gets pushed far enough to explode.

6.3 Elitzur–Vaidman Bomb Detection Algorithm

Recall that we are measuring in the orthonormal computational basis, i.e., \(\ket{0}\) and \(\ket{1}\). Consider the single-qubit gate \(R^Y_{\theta}\), which is defined as:

\[ R^Y_{\theta} = \begin{bmatrix} \cos\frac{\theta}{2} & -\sin\frac{\theta}{2} \\ \sin\frac{\theta}{2} & \cos\frac{\theta}{2} \\ \end{bmatrix} \]

where \(\theta\) is the angle of rotation. The \(R^Y_{\theta}\) gate is a rotation gate about the Y-axis. It is a unitary gate and thus preserves the norm of the vector as well as inner products. It is also a Hermitian gate. Thus, \(R^Y_{\theta}\) is self-inverse:

\[ R^Y_{\theta} = (R^Y_{\theta})^{\dagger} = (R^Y_{\theta})^{-1}. \]

The action of the \(R^Y_{\theta}\) gate on the state \(\ket{0}\) is as follows:

\[ R^Y_{\theta} \ket{0} = \begin{bmatrix} \cos\frac{\theta}{2} & -\sin\frac{\theta}{2} \\ \sin\frac{\theta}{2} & \cos\frac{\theta}{2} \\ \end{bmatrix} \begin{bmatrix} 1 \\ 0 \\ \end{bmatrix} = \begin{bmatrix} \cos\frac{\theta}{2} \\ \sin\frac{\theta}{2} \\ \end{bmatrix} = \cos\frac{\theta}{2}\ket{0} + \sin\frac{\theta}{2}\ket{1} \]

Thus, upon measurement, the probability of getting \(\ket{0}\) is \(|\cos\frac{\theta}{2}|^2\) and the probability of getting \(\ket{1}\) is \(|\sin\frac{\theta}{2}|^2\). Hence, the \(R^Y_{\theta}\) gate performs a rotation about the Y-axis by an angle \(\theta\).

Clearly, for very small \(\theta\), the probability of getting \(\ket{0}\) is approximately \(\cos^2 \frac{\theta}{2} \approx 1\).

The circuit for the Elitzur–Vaidman Bomb Detection Algorithm is shown in the figure below.

        ┌─────────── ×N ───────────┐
q0: ─|0⟩─┤ R_Y(π/N) ├──[ Device ]──┴── M
Figure — Elitzur–Vaidman Bomb Detection Algorithm: the qubit starts in \(\ket{0}\); the block of a small \(R_Y(\pi/N)\) rotation followed by the device is repeated \(N\) times before the final measurement.

Thus, when we pass \(\ket{0}\) through the \(R^Y_{\theta}\) gate, the output will be \(\cos\frac{\theta}{2}\ket{0} + \sin\frac{\theta}{2}\ket{1}\).

Here's the punchline. A dud lets the tiny rotations accumulate freely, so after \(N\) steps the qubit has swung all the way from \(\ket{0}\) to \(\ket{1}\) — final answer \(\ket{1}\) means "dud." A live bomb keeps measuring after every tiny nudge, and each measurement almost always snaps the qubit back to \(\ket{0}\) (the Quantum Zeno effect at work), so it never accumulates — final answer \(\ket{0}\) means "working bomb." The bomb reveals itself precisely because its constant watching freezes the qubit in place.

The probability that the bomb explodes after the first iteration is \(\sin^2 \left( \frac{\pi}{2N} \right)\), and the probability that the bomb explodes after \(N\) iterations is \(\sin^{2N} \left( \frac{\pi}{2N} \right)\).

This is because the explosion of the bomb is an independent event in each iteration. For independent events, we have:

\[ P(A \cap B \cap \ldots \cap Z) = P(A) \cdot P(B|A) \cdots P(Z|A,B,\ldots,Z) = P(A) \cdot P(B) \cdots P(Z), \]

so the probability

\[ P(\text{bomb explodes in 1st} \land \text{2nd} \land \ldots \land \text{$N$-th iteration}) = \left[\sin^2\left( \frac{\pi}{2N} \right)\right]^N = \sin^{2N}\left( \frac{\pi}{2N} \right). \]

For very large \(N\), we can use the small-angle approximation:

\[ \sin\left( \frac{\pi}{2N} \right) \approx \frac{\pi}{2N}. \]

Hence, the probability of the bomb exploding after \(N\) iterations is approximately:

\[ \left( \frac{\pi}{2N} \right)^{2N}. \]
Probability of bomb exploding after \(N\) iterations
\(N\)Probability of Bomb Exploding
2\(0.25\)
10\(7.702 \times 10^{-17}\)
20\(6.105 \times 10^{-45}\)
\(\vdots\)\(\vdots\)
500\(1.409 \times 2^{-2503}\)

As can be seen from the table above, the probability of the bomb exploding after \(N\) iterations drops rapidly for large \(N\). Thus, the Elitzur–Vaidman Bomb Detection Algorithm is a very efficient method for detecting a working bomb without exploding it.

The takeaway from the table is dramatic: even at \(N = 10\) the chance of detonation is already about \(10^{-17}\), and it keeps plummeting. By choosing \(N\) large enough you can make the risk of losing the bomb as small as you like — this is "interaction-free measurement" made practical.

Key Takeaways