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

<p>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. $$</p>

<p>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). $$</p>

<p>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.$</p>

<p>Since unitary operations preserve inner products, this is not unitary. </p>

CC BY-SA 3.0
2017-10-01T16:43:31.297Z
2017-10-01T19:14:06.360Z
2017-10-01T19:14:06.360Z
Peter Shor 
<p>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.</p>

CC BY-SA 3.0
2017-09-01T16:41:10.563Z
Yeah, but that's not the point. I have edited my question to make clear my intentions.
Grigori Sun
CC BY-SA 3.0
2017-09-01T16:31:28.230Z
2017-09-01T16:31:28.230Z
lamontap
<p>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?</p>

CC BY-SA 3.0
2017-09-24T20:25:29.593Z
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 
<quantum-computing><quantum-information>
How can I get $\sum_n e^{i a_n} |n\rangle$ from $\sum_n a_n |n\rangle$?
Grigori Sun
# How can I get $\sum_n e^{i a_n} |n\rangle$ from $\sum_n a_n |n\rangle$?

(Asked by: username_0 on 2017-09-01)

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?

**Tags:** quantum-computing, quantum-information

> **Comments:**
> **username_1**: 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?  

---

## 2 answers

### Answer by username_1 on 2017-10-01. Score: 6

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.


---

### Answer by username_2 on 2017-09-01. Score: 2

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.

> **Comments:**
> **username_0**: Yeah, but that's not the point. I have edited my question to make clear my intentions.  

---

