3

I'm curious about how to form arbitrary-sized uniform superpositions, i.e., $$\frac{1}{\sqrt{N}}\sum_{x=0}^{N-1}\vert x\rangle$$ for $N$ that is not a power of 2.

If this is possible, then one can use the inverse of such a circuit to produce $\sqrt{p}\vert 0\rangle+\sqrt{1-p}\vert 1\rangle$ (up to some precision). Kitaev offers a method for the reverse procedure, but as far as I can tell there is no known method to do one without the other.

Clearly such a circuit is *possible*, and there are lots of general results on how to asymptotically make any unitary I want, but it seems like a massive headache to distill those results into this one simple, specific problem.

Is there a known, efficient, Clifford+T circuit that can either produce arbitrary uniform superpositions or states like $\sqrt{p}\vert 0\rangle+\sqrt{1-p}\vert 1\rangle$?

1what do you mean by "efficient" in regards to producing $\sqrt{p}|0\rangle+\sqrt{1-p}|1\rangle$ given that there's no scaling involved in such a question – DaftWullie – 2019-02-08T12:08:14.727

The scaling would be fidelity with the required state, since we likely can't produce exactly the right state. Can we get $\epsilon$ close with only $O(\log(1/\epsilon))$ gates, say? – Sam Jaques – 2019-03-12T09:21:07.277

Yes: https://arxiv.org/abs/1212.6964 (don't ask me how it works!)

– DaftWullie – 2019-03-12T09:49:22.817That's a good reference (I think I found the previous work they cite when I asked this question) but I was hoping there would be an easily describable, compact version of the same, since this is such a simple and fundamental problem. – Sam Jaques – 2019-03-12T12:41:17.547