# In quantum teleportation what is the need for the extra X/Z gate after classical information is sent from Alice to Bob?

In the Qiskit textbook, at step 4, Bob who has received the classical bits from Alice then needs to apply a X and/or Z gate depending on what the classical bits received are, why is that?

Without that fixup, the state of Bob's qubit can be in any one of the states $$\alpha |0\rangle + \beta |1\rangle$$ (the state we actually wanted to teleport) or $$\alpha |0\rangle - \beta |1\rangle$$, $$\beta |0\rangle + \alpha |1\rangle$$ or $$\beta |0\rangle - \alpha |1\rangle$$ (the states we don't want to end up with). X and Z gates are applied to fix the resulting state so that it ends up in $$\alpha |0\rangle + \beta |1\rangle$$ - otherwise we can't count our teleportation a a success.