## 11.2 Decoherence and interference

Suppose the qubit undergoes the usual interference experiment, but, in between the two Hadamard gates, it is affected by decoherence (denoted by \times), which acts as described above (i.e. |0\rangle|e\rangle\mapsto|0\rangle|e_{00}\rangle and |1\rangle|e\rangle\mapsto|1\rangle|e_{11}\rangle).

Let us step through the circuit in Figure 11.1, keeping track of the state of the environment: \begin{aligned} |0\rangle|e\rangle & \overset{H}{\longmapsto} \Big( |0\rangle + |1\rangle \Big) |e\rangle \\& \overset{\phi}{\longmapsto} \Big( |0\rangle + e^{i\phi}|1\rangle \Big) |e\rangle \\& \overset{\times}{\longmapsto} |0\rangle|e_{00}\rangle + e^{i\phi}|1\rangle|e_{11}\rangle \\& \overset{H}{\longmapsto} |0\rangle\Big( |e_{00}\rangle + e^{i\phi}|e_{11}\rangle \Big) + |1\rangle\Big( |e_{00}\rangle - e^{i\phi}|e_{11}\rangle \Big). \end{aligned} If we write \langle e_{00}|e_{11}\rangle = ve^{i\alpha}, then the final probabilities of 0 and 1 oscillate with \phi as \begin{aligned} P_{0}(\phi) &= \frac12\big(1 + v\cos(\phi + \alpha)\big), \\P_{1}(\phi) &= \frac12\big(1 - v\cos(\phi + \alpha)\big). \end{aligned}

As we can see in Figure 11.2, the interference pattern is suppressed by a factor v, which we call the visibility. As v=|\langle e_{00}|e_{11}\rangle| decreases, we lose all the advantages of quantum interference. For example, in Deutsch’s algorithm we obtain the correct answer with probability at most \frac12(1+v). For \langle e_{00}|e_{11}\rangle = 0, the perfect decoherence case, the network outputs 0 or 1 with equal probabilities, i.e. it is useless as a computing device.

It is clear that we want to avoid decoherence, or at least diminish its impact on our computing device. For this we need quantum error correction: we encode the state of a single (logical) qubit across several (physical) qubits.

!!!TO-DO!!! generalised decoherence as controlled-U gate, varying from \mathbf{1} to controlled-\texttt{NOT}