We introduce an interference measure which allows to quantify the amount of interference present in any physical process that maps an initial density matrix to a final density matrix. In particular, the interference measure enables one to monitor the amount of interference generated in each step of a quantum algorithm. We show that a Hadamard gate acting on a single qubit is a basic building block for interference generation and realizes one bit of interference, an ``ibit.'' We use the interference measure to quantify interference for various examples, including Grover's search algorithm and Shor's factorization algorithm. We distinguish between ``potentially available'' and ``actually used'' interference, and show that for both algorithms the potentially available interference is exponentially large. However, the amount of interference actually used in Grover's algorithm is only about
3ibits and asymptotically independent of the number of qubits, while Shor's algorithm indeed uses an exponential amount of interference.
The interference phenomenon of light is a common but most important effect in physics. In this article, we compare and analyse the interference effects of both coherent and incoherent light; in particular, the interference of spatially incoherent light sources is described. Thermal light and a two-photon entangled source may both be regarded as incoherent sources which can generate similar second-order interference effects, but their underlying physics is quite different. First-order interference can be realized with both spatially coherent and incoherent sources in the same well-designed experimental setup, but exhibit different interference patterns; their different interference mechanisms will also be clarified.