3

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?

kichapps
  • 103
  • 5

1 Answers1

5

I'm afraid it is not possible to remove states from a superposition that you do not want. At least, not easily. If it were, a lot of computationally hard problems would become much easier, since you could just create a huge superposition and then weed out all the non-solutions to your problem.

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.

The easiest way to run this in the IBM Q Experience is to make a circuit in which you first measure whether the condition is satisfied, and then do everything you would do on the remaining state if that condition comes out as true. When you run the circuit, you'll get many bit strings as output: some in which your condition is satisfied and some in which it is not. You then simply discard all the latter, and the former are then the results you need.

A method that is unitary would be to run Grover's algorithm to search for states that satisfy your condition. The way you do this may depend on the specific application you have in mind.

James Wootton
  • 11,700
  • 1
  • 35
  • 74