# What is the simplest circuit which given $|a\rangle$ and $|b\rangle$ outputs the superposition $\frac{1}{\sqrt{2}}\left(|a\rangle+|b\rangle\right)$?

What is the simplest quantum circuit which takes states $$|a\rangle$$ and $$|b\rangle$$ as its input, and outputs the superposition $$\frac{1}{\sqrt{2}}\left(|a\rangle+|b\rangle\right)$$?

Cross-posted on Physics.SE

• "normalized" means the output is actually c(|a>+|b>), to ensure it is a valid quantum state (in case this wasn't clear) – Samuel Apr 14 '20 at 16:38
• I think this question quantumcomputing.stackexchange.com/q/14185/9474 is closely related to yours. And it has some interesting answers – Egretta.Thula Mar 5 at 8:37

## 1 Answer

A copy of my answer to the cross-posted question:

Such a circuit cannot exist. To see why, assume $$|b\rangle = e^{i\phi}|a\rangle$$. Then, the input $$|a\rangle|b\rangle$$ is mapped to $$|a\rangle + e^{i\phi}|b\rangle=(1+e^{i\phi})|a\rangle$$, which (i) is not normalizable independent of $$\phi$$, (ii) is identically zero for $$\phi=\pi$$, and (iii) whose output normalization, and whose output state modulo a phase depends on the unphysical state of the input.

In brief, it is incompatible with linearity.

After all, if the map - let's call it $$U$$ - were linear, on input $$|v\rangle$$, it should produce the output $$U|v\rangle$$, and therefore due to linearity, on input $$e^{i\phi}|v\rangle$$ the output $$e^{i\phi}U|v\rangle$$. (As you can see: You don't even need linearity in this step, you just need homogeneity over the complex numbers!) Clearly, the argument above shows that for the map you quote, this is not the case.