At present, it is one of various effective approaches for quantum algorithm by using the nuclear magnetic resonance (NMR) experiment technology. In this paper, a NMR pulse array is described to realize various quantum logic gates, such as the CNOT and the Toffoli gate. Then an experiment about QCE is given.