# Quantum circuit calculating sum of two quantum states $|a\rangle + |b\rangle$ [closed]

What is the simplest quantum circuit which takes states $$|a\rangle$$ and $$|𝑏\rangle$$ as its input, and outputs their (normalized) sum $$c (|𝑎\rangle+|𝑏\rangle$$)? Here $$c$$ is a normalization constant to make the output a valid quantum state. The use of Ancilla qubits is allowed. It might also be necessary to use some kind of "encoding" for states $$|a\rangle$$ and $$|𝑏\rangle$$.

Cross-posted on quantumcomputing.SE

• What does "encoding" mean? And can |a> and |b> be arbitrary states, or orthogonal basis states? In either case, what would a valid "encoding" be? – Norbert Schuch Apr 14 '20 at 16:10
• I’m voting to close this question because it is an exact cross-post of a question on QuantumComputing.SE. If you do not get an acceptable answer on QC.SE after a reasonable amount of time (>= 1 week), feel free to ping one of the mods and we can consider re-opening it here. – tpg2114 Apr 15 '20 at 12:28
• did you have a look at Oszmaniec et al. (2015)? – glS Apr 15 '20 at 12:28
• @glS Nice catch! Theorem 1! (Also, that's how one states the question precisely!) – Norbert Schuch Apr 15 '20 at 13:26
• @tpg2114 This cross-posting between pse and qc.se has become kind of a habit. Do we have a general policy on that? – Norbert Schuch Apr 15 '20 at 13:27

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.
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.
• @SamuelBosch My counterexample implies that linearity is violated: If the map would be linear, applying it to $|v\rangle$ and $e^{i\phi}|v\rangle$ would give the same output up to a global phase. – Norbert Schuch Apr 14 '20 at 17:34
• Dear @SamuelBosch, how about this: You write down clearly what you mean. And by "clearly" I mean formulas, not just words. Make dependencies clear, i.e. if $c$ depends on $a$ and $b$, write $c(a,b)$. Make clear what $|a\rangle$ is, i.e.: $|a\rangle\in\mathrm{set}$. Then I will be happy to explain why such a map cannot exist. Now you want me to state assumptions and conclusions, just to risk that you later complain that those weren't your assumptions. – Norbert Schuch Apr 14 '20 at 19:14