# How do you apply a projector in Qiskit?

I want to apply the projector $$|0\rangle\langle 0|$$ onto a previously prepared state $$|\psi_1\rangle$$ in qiskit. I have already initialized a quantum circuit (with two registers) into $$|\psi_1\rangle$$, but I don't know how to apply a gate that projects one of the registers into $$|0\rangle$$.

How can I create a projector operator to obtain this? I want to run this program in QASM Simulator (and later in a real device).

Projecting a state to $$|0\rangle\langle 0|$$ with probability 1 is equivalent to initialization (indeed, this is why it’s called “projective measurement”), so you can simply call reset (see here: https://qiskit.org/documentation/stubs/qiskit.circuit.QuantumCircuit.reset.html )