# Circuit to construct a $n$-qubit state which is a superposition of states with only a single qubit being $\lvert1\rangle$ [duplicate]

So the question came up in a book I am working through. Given a circuit with $$n$$ qubits, construct a state with only $$n$$ possible measurement results, each of which has only $$1$$ of $$n$$ qubits as $$1$$, such as $$|0001\rangle$$, $$|0010\rangle$$, $$|0100\rangle$$, $$|1000\rangle$$, obviously normalized.

The only way I can think to do this is to take the all $$|0\rangle$$ input state, apply $$\operatorname{H}$$ to each qubit and then used multiple-controlled $$\operatorname{CNOT}$$ gates to affect the change on each qubit, but I feel like this won't lead to the desired end state.

To be clear, I am enquiring how to create a $$W_n$$ state can be arbitrarily prepared, given $$n$$ qubits.

• I'm not sure what you mean by "n possible measurement results" here. If you have $n$ qubits then there are $2^n$ possible measurement results. The rest of the question is fine and interesting though. I edited the title to better reflect what I think you are asking. Feel free to revert the edit if I misunderstood you – glS Nov 2 '18 at 13:39
• also, just for reference, states such as the one you refer to are often referred to as W states, and a similar question was also asked on physics.SE, see physics.stackexchange.com/q/311743/58382. Finally, as pointed out in that question, you should really specify the set of gates that you want to use – glS Nov 2 '18 at 13:40
• @glS It appears the actual term for the state I was looking for is the W state, which has only n measurements. – luminalQubit Nov 2 '18 at 14:31
• again, I don't know what you mean by "has only n measurements". A state of $n$ qubits can have $2^n$ possible measurement results, it doesn't matter which particular state it is – glS Nov 2 '18 at 14:33
• @gIS: for what it's worth, I find luminalQubit's terminology fairly clear. A $W$ state does only have $n$ possible measurement results, because none of the other $2^n - n$ bit strings are 'possible measurement results' of the $W$ state. – Niel de Beaudrap Nov 2 '18 at 16:01