 In this section we review the basic paradigm for quantum algorithms, namely the quantum circuit model, which is composed of the basic quantum units of information (qubits) and the basic logical manipulations thereof (quantum gates). For more detailed introductions see Nielsen and Chuang (2000) and Mermin (2007).