Quantum error correction single phase flip

With classic computers, all we have to worry about error correcting is the bit flip, but with quantum computers there is another type of flip that is possible: the phase flip. This flip is the equivalent of the Z gate acting upon the state. So the states |"0"> and |"1"> would be unchanged by a phase flip, while a state |"+"> or a state |"-"> would flip to the opposite state. The good news is that to correct this error, we can use a very similar circuit to the bit flip code. Recall that the H gate changes the |"0"> state into the |"+"> state. Any phase error on a single qubit would change the |"+"> state into the |"-"> state. Finally, if we apply another H gate, we would get the |"1"> state after this error. So, if we surround the portion in which a phase error is potentially introduced by H gates, we can transform on either end the phase error into a bit flip error and use the same bit flip code to detect the error. Then, to correct for the error, we apply the Z gate. Now that we can address both single bit flip errors and single phase flip errors, we are ready to address any single qubit error.