# Implement a projection operator as a quantum circuit

Let the state $$|\Psi\rangle\equiv a|0\rangle\otimes|\psi_0\rangle + b|1\rangle\otimes|\psi_1\rangle$$, where $$|\psi_0\rangle$$ and $$\psi_1\rangle$$ belong to a multi-qubit register $$R$$ and the coefficients $$a,b$$ are not known a priori. I would like to extract the state $$|\psi_0\rangle$$. Essentially, I would like to apply the projector $$\hat P_0\equiv|0\rangle\langle0|$$ on $$|\Psi\rangle$$.

The standard approach seems to be to measure the solitary qubit to collapse $$R$$ into either $$|\psi_0\rangle$$ if you measured $$0$$ or $$|\psi_1\rangle$$ if you measured $$1$$. In the latter case, simply discard the state and try again from scratch. This is a probabilistic method and obviously undesirable if preparing $$\Psi$$ is difficult or if $$|a|$$ is very small.

Is there some quantum circuit to implement $$\hat P_0$$ and deterministically extract $$|\psi_0\rangle$$? It is clearly not unitary, so such a circuit clearly is not simple. But my intuition tells me that there ought to be a strategy involving an ancilla register and/or a second copy of $$|\Psi\rangle$$. I am however self-taught and my intuition is not terribly reliable; I would happily accept a proof that it can't be done. ^_^

The closest I've gotten so far is recognizing that it's easy to do with two entangled copies of $$|\Psi\rangle$$: let $$|\Phi\rangle\equiv \frac{a+b}{\sqrt{2}}|01\rangle\otimes|\psi_0\rangle\otimes|\psi_1\rangle + \frac{a-b}{\sqrt{2}}|10\rangle\otimes|\psi_1\rangle\otimes|\psi_0\rangle$$, where the two solitary qubits are lumped into one register. Then measure either solitary qubit. If it's $$0/1$$, $$|\psi_0\rangle$$ is the state in the first register $$R_1$$. If it's $$1/0$$, take the second register $$R_2$$. But I don't know how to generate the entangled state $$|\Phi\rangle$$, or whether it is possible to do so from two initially independent copies of $$|\Psi\rangle$$.

Bonus points if the procedure extends naturally to arbitrary multi-qubit projection operators without a tedious basis transformation!

• Did you try to apply amplitude amplification? Jul 25, 2021 at 7:29
• I need to read a bit more to be sure, but it seems like amplitude amplification will remain probabilistic if $a$ and $b$ aren't known..? Jul 26, 2021 at 14:04
• depends on the state, but in general yes. However, you might get a success probability that suffices in practice. Jul 26, 2021 at 14:39
• I suppose the circuit should also not depend on $|\psi_0\rangle$? Otherwise a trivial answer would be a circuit that completely disregard the inputs and always outputs $|\psi_0\rangle$
– glS
Aug 2, 2021 at 22:44
• Hah. Yes, I forgot to explicitly state that $|\psi_0\rangle$ is not known a priori. I would probably not accept your solution as an answer. :P Aug 3, 2021 at 20:42

Consider the states $$|\psi\rangle = a|0\rangle|\psi_0\rangle + b|1\rangle|\psi_1\rangle$$, and $$|\psi'\rangle = a|0\rangle|\psi_0'\rangle + b|1\rangle|\psi_1\rangle$$, where $$a$$ and $$b$$ are non-zero and $$\psi_0$$ and $$\psi_0'$$ are known and orthogonal. By applying your proposed circuit and measuring the circuit output (the orthogonal $$\psi_0$$ or $$\psi_0'$$) you could perfectly distinguish between the non-orthogonal $$\psi$$ and $$\psi'$$, which is impossible. Likewise for any finite-copy case.
• Do you by chance have any insights on the entangled state solution? Evidently the entangled state $|\Phi\rangle$ cannot be prepared given two copies of $|\Psi\rangle$, but suppose I have a circuit $V$ which prepares $|\Psi\rangle$ on $n$ qubits. Is there a modified procedure to generate the entangled version $|\Phi\rangle$ on $2n$ qubits? I'll probably pose this as an independent question in a day or two but I may as well ask here first. Aug 3, 2021 at 20:55
• Not totally clear to me how many copies of $\Phi$ you're obtaining from how many copies of $\Psi$ in your question, but I think the answer to whether it can be done reliably will be no, by the same reasoning: you can reliably obtain $\psi_0$ from $\Phi$, so you can use a circuit which creates $\Phi$ to reliably distinguish between non-orthogonal states $\psi$ and $\psi'$ in my example. It doesn't change the reasoning much if the input is now $\Psi^{\otimes n}$, because for finite $n$, $\psi^{\otimes n}$ and $\psi'^{\otimes n}$ are still non-orthogonal. Aug 3, 2021 at 22:47
• The input wouldn't be $|\Psi\rangle^{\otimes n}$ but rather the operator $V$ such that $V|0\rangle=|\Psi\rangle$. As you've proven, the procedure to generate $|\Phi\rangle$ wouldn't begin by preparing copies of $|\Psi\rangle$ independently, but I am imagining some sort of complex procedure in which $V$ is applied as a controlled operation, or perhaps it is applied to pre-entangled qubits, or something like that. But I admit I haven't thought very carefully about it yet. Aug 4, 2021 at 15:51