I am very new to quantum computing and I have recently started to experiment with qiskit module in python, by following tutorials and implementing simple algorithms.

I constructed the quantum circuit described on this page: Qiskit teleportation And got same results that were expected:

my circuit:


my results:


Which are apparently expected results, since

"we will always measure 0 from Bob's qubit because we started off with |0⟩"

However, if I apply NOT Gate at the start of q0, I still get the exact same results. Is my understanding of algorithm wrong? Shouldnt I be getting q2 as 1 after applying the NOT gate at start?


import qiskit as q
from qiskit.visualization import plot_histogram

circuit = q.QuantumCircuit(3, 3)

# entangle cubit 1 & 2


circuit.cx(1, 2)

# apply CNOT to qubit we want to send
circuit.cx(0, 1)


circuit.measure([0,1], [0,1])

circuit.cx(1, 2)

circuit.cz(0, 2)


backend = q.Aer.get_backend('qasm_simulator')
job = q.execute(circuit, backend, shots=1024)
result = job.result()

counts = result.get_counts(circuit)

Outcomes when NOT gate is inserted at the start of q0:

enter image description here

  • $\begingroup$ Your circuit is good; could you insert the image of the alternative circuit? I am not sure what you did, and a picture is better than words. $\endgroup$
    – kludg
    Dec 2, 2019 at 12:04
  • $\begingroup$ @kludg, you mean circuit in Ascii? I will post that as well along with code $\endgroup$
    – Ach113
    Dec 2, 2019 at 12:06
  • $\begingroup$ no, i meant the picture of alternative circuit like the picture of original circuit. $\endgroup$
    – kludg
    Dec 2, 2019 at 12:08
  • $\begingroup$ @kludg I am not sure what you mean, the picture in post is generated by circuit.draw(output='mpl') so it is the description of what my code is doing $\endgroup$
    – Ach113
    Dec 2, 2019 at 12:11
  • 1
    $\begingroup$ shouldn't you measure q2 after teleportation? $\endgroup$
    – kludg
    Dec 2, 2019 at 12:28

1 Answer 1


Your circuit does not measure $q_2$ qubit after teleportation; I guess that is why teleportation of $|1\rangle$ qubit is shown incorrectly.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.