# How can I get $\sum_n e^{i a_n} |n\rangle$ from $\sum_n a_n |n\rangle$?

Suppose that I have a normalized quantum state $\sum_n a_n |n\rangle$, is there a quantum operation/circuit so that I can get $\frac{1}{N} \sum_n e^{i a_n} |n\rangle$ at output? How?

• I strongly suspect that this is not a unitary map, which means that it can't be implemented by a quantum circuit. Have you checked this? – Peter Shor Sep 24 '17 at 20:25

It's not unitary, so it's impossible because all quantum transformations have to be unitary.

Consider the states $$\frac{3}{5} |0\rangle + \frac{4}{5} |1\rangle \quad \mathrm{and} \quad \frac{3}{5} |0\rangle - \frac{4}{5} |1\rangle.$$

These get taken to $$\frac{1}{\sqrt{2}}\left(e^{3/5 i} |0\rangle + e^{4/5 i} |1\rangle\right) \quad \mbox{and}\quad \frac{1}{\sqrt{2}}\left( e^{3/5 i} |0\rangle + e^{-4/5 i} |1\rangle \right).$$

The inner product between the first pair of states is $-\frac{7}{25} = -0.28$, while the inner product between the second pair of states is $\frac{1}{2}(1+e^{8/5 i} )\approx 0.4585 +0.4998 i.$

Since unitary operations preserve inner products, this is not unitary.

I wouldn't think so. I'm assuming your $a_n$'s are normalized, i.e. that $||\sum_n a_n |n\rangle|| =1$. But then your wish output is not normalized since $$||\sum_n e^{ia_n} |n\rangle|| = \sqrt{\sum_n |e^{ia_n}|^2} = \sqrt N$$ where I assume there are $N$ terms in the sum. Quantum (unitary) operations have to preserve the norm so there can't be one that maps the first state to the second one.

• Yeah, but that's not the point. I have edited my question to make clear my intentions. – Grigori Sun Sep 1 '17 at 16:41