# How to verify teleportation was successful in this circuit?

In this circuit (link), q0 is Alice's qubit and q1, q2 are entangled qubits given to Alice and Bob respectively. After measuring q2 in this circuit, how can it be verified that the state of q0 and q2 are the same?

By default, q0 is in ground state, I assume. So, shouldn't q2 be also in the ground state if the state was teleported.

First, note that the circuit construction using classical condition like you have is not executable on IBM hardware at the moment. Devices like Honewywell Trapped ion allows you to do such thing (I think). However, thanks to principle of deferred measurement, we can push the measurement all the way back to the end of the circuit. See here.

The state of $$q2$$ will depends on the state of $$q0$$. If $$q0$$ starts in the state $$|0\rangle$$ then measurement in $$q2$$ will always (assume no noise) be 0. If instead I add the $$X$$ operation on $$q0$$ to turn it into the state $$|1\rangle$$ then measurement on $$q2$$ will registered a 1.
For example: if I initialize $$q0$$ to the state $$|0\rangle$$ then I will have
but if I initialize $$q0$$ to the state $$|1\rangle$$ then I will have