# Weeding out qubit states with leftmost qubit as 1

Need help! I was working on a project when I required to use a projection operator. For an example case, I have the Bell state, $$|\psi\rangle = \frac1{\sqrt2}\left(\color{blue}{|0}0\rangle+|11\rangle\right)$$ which now I want to take to the state, $$|\psi'\rangle = |\color{blue}{0}0\rangle$$ by weeding out the states with the leftmost qubit as $$1$$.

Another example would be, $$\frac1{2}\left(|\color{blue}{0}0\rangle+|\color{blue}{0}1\rangle+|10\rangle+|11\rangle\right)\rightarrow\frac1{\sqrt2}\left(|00\rangle+|01\rangle\right).$$

Edit: Just putting another example to make my question clear. I want to weed out states when the third (leftmost) qubit is $$1$$ in the following example.

Suppose we have a three qubit state, $$|\psi\rangle=\displaystyle\frac1{N}\left(|\color{blue}{0}\rangle\otimes\left[|00\rangle+|01\rangle+|10\rangle\right] + |1\rangle\otimes|11\rangle\right)$$ it should then get transformed to $$|\psi'\rangle = \frac1{N'}|\color{blue}{0}\rangle\otimes\left[|00\rangle+|01\rangle+|10\rangle\right].$$

Is this possible? If yes, how can I implement it in the IBM Quantum Experience?

• It's not clear what you mean by "weeding out the states with the second qubit as $1$." It sounds as if you want to do some controlled operation on the second qubit, but if you want $\vert \psi\rangle$ to be $\vert 00\rangle$, why not apply a Hadamard transform to $\vert \psi\rangle$? – Mark S Jun 10 at 16:53
• In your second example, you probably meant $\frac1{2}\left(|00\rangle+|01\rangle+|10\rangle+|11\rangle\right)\rightarrow\frac1{\sqrt2}\left(|00\rangle+|10\rangle\right)$. – Sanchayan Dutta Jun 10 at 17:11
• I think it's standard to read "first," "second," "third" qubits from left to right. But your coloring helps. Also "weeding out" sounds pretty non-standard. But if you can prepare a Bell state from $\vert 00\rangle$, why not invert whatever operation got you there to get your state of interest? – Mark S Jun 10 at 18:14
• You can prepare the initial state $\vert \psi \rangle$ of the $3$-qubit state, starting as $\vert000\rangle$, with a Hadamard on the two right qubits and a Toffoli (CCNOT gate) having the right two qubits control the left qubit. To get to the final $\vert \psi'\rangle$ state, have you thought about making an $8\times 8$-column truth table and converting $\vert \psi\rangle$ to $\vert \psi'\rangle$? I'm not sure if it's reversible (unitary.) – Mark S Jun 10 at 19:04
• You could measure measure the leftmost bit in $\vert\psi\rangle$ and post-select upon measuring $\vert 0\rangle$; that would put you in $\vert\psi^{'} \rangle$. But otherwise quantum gates are unitary. – Mark S Jun 11 at 2:11

There are ways to do it, however. But they always come with a price. The easiest to implement is post-selection, as mentioned in a comment above. This means simply measuring whether a condition is satisfied (in your case, whether a certain qubit outputs 0). The outcome to this measurement will be random, but it will sometimes give the answer you want. You just need to repeat until that happens.