In this chapter, we introduce the basic concepts in modeling the effects of imperfections in qubit dynamics that occur for neutral atoms and optical cavities. Recall that such imperfections are linked to the design in quantum error correction in Section 2.9 of Chap. 2, as they cause the loss of fidelity and generate errors. The most significant impact is that it is no longer possible to describe the quantum system in terms of a “pure state” (a wave function or a state vector). A more general class of Hilbert space operators is needed that corresponds-for the finite-dimensional Hilbert spaces we restrict ourselves here to-to hermitian, positive semi-definite matrices. These objects are commonly called “density matrices” and denoted by ρ. Their time evolution is no longer described by the Schrödinger equation, but is given by a so-called completely positive map, at least in many physically relevant cases. For quantum computation, the most significant concept is the “fidelity” F of a quantum operation. If ρ|i〉(t) is the density matrix of the system after an evolution of time duration t for an initial state |i〉 and |f〉 = U(t)|i〉 is the “nominal” target state that the quantum gate would have produced under perfect conditions, then the fidelity

can be defined as [2]

F = min |i〉

tr ( P|f〉ρ|i〉(t)

) = min

|i〉 tr ( U(t)P|i〉U †(t)ρ|i〉(t)

) . (4.1)

We denote tr the trace of a matrix (see (4.5)), and use the definition

P|f〉 = |f〉〈f | (4.2)

for the “projector” onto the state |f〉. The minimum in (4.1) is taken over all possible initial states. We give a more detailed introduction to density matrices in Section 4.2 below.