Quantum error correcting circuitry is both a resource for correcting errors and a source for generating errors. A balance has to be struck between these two aspects. Perfect quantum gates do not exist in nature. Therefore, it is important to investigate how flaws in the quantum hardware affect quantum computing performance. We do this in two steps. First, in the presence of realistic, faulty quantum hardware, we establish how quantum error correction circuitry achieves reduction in the extent of quantum information corruption. Then, we investigate fault-tolerant gate sequence techniques that result in an approximate phase rotation gate, and establish the existence of an optimal length of the length *L* of the decomposition sequence. The existence of is due to the competition between the increase in gate accuracy with increasing *L*, but the decrease in gate performance due to the diffusive proliferation of gate errors due to faulty basis gates. We present an analytical formula for the gate fidelity as a function of *L* that is in satisfactory agreement with the results of our simulations and allows the determination of via the solution of a transcendental equation. Our result is universally applicable since gate sequence approximations also play an important role, e.g., in atomic and molecular physics and in nuclear magnetic resonance.