# Conditional measurement using classical bit in qiskit

The specific part that I'm struggling with is the controlled (on |0>) measurement in part F of Figure 6.

I can't figure out how to code that controlled measurement element in qiskit. Below is my simple python qiskit (v0.20.0) code :

from qiskit import *
from qiskit import Aer

circ = QuantumCircuit(4,2)
circ.h(0)
circ.measure(0,1)
circ.measure(2,1).c_if(1,0)

fig=circ.draw('mpl')
fig.show()

backend = Aer.get_backend('statevector_simulator')
job = backend.run(circ)
result=job.result()


My code results in the image :

Note that it does not look like part F from Figure 6. Specifically, it isn't apparent that the conditioning is on classical output of $$q_{0}$$

QUESTION :

1. How do I replicate part F of Figure 6 from Schuld's paper using qiskit?

Although QASM allows controlled measurements like if (c == 0) measure q[1] -> c[1];, I am afraid you won't be able to execute it in Qiskit. Conditional measurements are not supported by Qiskit and you will get an error message when trying to run your circuit on backend. Nevertheless you can create and draw such a circuit. What you described in your code is exactly what is shown in the figure 6. It is just that Qiskit draws it in a slightly different way. There has been a similar question here.