# Preparing any superposition of fixed Hamming weight states

There exists a nice way of preparing any superposition (with real amplitudes — this is the case I'm interested in) of states $$\{\ldots0001\rangle,\,|\ldots0010\rangle,\,|\ldots0100\rangle,\ldots\}$$, etc. This can be achieved with an $$O(\log_2 n)$$-depth circuit having $$O(n)$$ gates. To do so, one takes the circuit from Fig. 5 here, and replaces the $$G(1/2)$$ gate with $$R_y$$ rotations.

I'm wondering if this idea can be somehow generalized in order to prepare any superposition (with real coefficients) of constant Hamming weight states. Clearly, such a circuit will contain at least $$O\left({n}\choose{m}\right)$$ parametric gates. Would be cool if the depth could be made, similarly to the case above, significantly smaller than the number of gates.

Please do not suggest the UCC ansatz :D

UPDATE

In the comments below, Mark S pointed out a paper in which the preparation of Dicke states is discussed. Those are the equal-weight superpositions of constant Hamming weight states. The circuit contains only $$O(kn)$$ gates, and cannot be generalized to case of interest in an obvious way, as it can be done in the first paper cited above. Still, may be useful.

• Have you reviewed this question and answer? Aug 11 '20 at 22:44
• This question and answer also appear relevant. Aug 12 '20 at 0:00
• Thanks for the links! I really like the algorithm from "Deterministic Preparation of Dicke States". Do you think it can be adapted to my case? It only contains $O(nk)$ gates, and it's unclear to me how I can introduce $n\choose k$ free parameters. Aug 12 '20 at 10:12
• What is meant by "free parameters"? Are you asking for a distribution other than the uniform distribution (which is what i think the Dicke states will give you)? You could add another ancilla qubit, conditionally rotate the ancilla from $\vert 0\rangle$ to $\vert 1\rangle$ for each basis vector in your Dicke state by an amount given by (an appropriately normalized version of) your parameters, and post-select the ancilla being $\vert 1\rangle$ maybe? Aug 12 '20 at 14:44
• I need to have $({n\choose k} - 1)$ real parameters in the circuit so that for any possible superposition of the $n \choose k$ states with real amplitudes there would exist a set of parameters preparing such a superposition. I provide an example for $k=1$ in the first paragraph of my question. Aug 12 '20 at 14:56

Here's an idea for somewhere to get started... (I have not worked through this in any more detail than presented here, but it looks plausible.) Let $$U_{\Lambda}(\alpha_1,\alpha_2,\ldots,\alpha_{|\Lambda|})$$ be a unitary that acts on a set of qubits $$\Lambda$$ such that, if those qubits start in the state $$|0\rangle^{\otimes|\Lambda|}$$, they are output in the state $$\sum_i\alpha_i|0\rangle^{\otimes(i-1)}|1\rangle|0\rangle^{\otimes|\Lambda|-i}.$$ You say you already know how to do this.
Now consider wanting to make a state $$\sum\beta_{i (where $$|ij\rangle$$ is a shorthand to say 1s on qubits $$i,j$$ and 0 elsewhere) on $$N$$ qubits. Presumably we could do this by
1. let $$\alpha_i=\sqrt{\sum_{j:j>i}|\beta_{ij}|^2}$$.
2. Implement $$U_{1,2,\ldots,N}(\alpha_1,\alpha_2,\ldots,\alpha_N)$$.
3. Apply controlled-$$U_{2,3,\ldots ,N}(\tilde\beta_{12},\tilde\beta_{13},\ldots,\tilde\beta_{1N})$$ controlled off qubit 1, where $$\tilde\beta_{ij}=\beta_{ij}/\alpha_i$$. This gets all the terms correct where the first qubit is in the 1 state.
4. Then apply controlled-$$U_{3,4,\ldots,N}(\tilde\beta_{23},\tilde\beta_{24},\ldots,\tilde\beta_{2N})$$ where qubit 1 is controlled off $$|0\rangle$$, and qubit 2 is controlled off being in state $$|1\rangle$$.
5. Repeat in order until all are done. On the $$n^{th}$$ round, you control off $$n$$ qubits such that the first $$n-1$$ are in the $$|0\rangle$$ state and the $$n^{th}$$ is in the $$|1\rangle$$ state.
This should get you the correct 2-excitation state. But this is a procedure that you can nest to get higher excitation states: for the $$k$$-excitation case, you first perform the division in steps 1 & 2, then replace the $$U$$s in the controlled-$$U$$ with the $$k-1$$ excitation version.