2

I am wondering what a circuit should look like if I want to prepare the state of the following form: $$ |0\rangle^{\otimes n} \mapsto \dfrac{ |1000\ldots0\rangle + |0100\ldots0\rangle + |0010\ldots0\rangle + \ldots + |00\ldots001\rangle }{\sqrt{n}} $$ Is this something well-known and trivial?

ANSWER

Apparently, this question was asked here.

The Q# realization is provided in katas 15-17 here.

mavzolej
  • 1,921
  • 7
  • 17

1 Answers1

3

Your state is a generalization of so-called W-state.

Here is a implementation of the state for three qubits.

You can also use method described in paper Transformation of quantum states using uniformly controlled rotations for preparing W-state with any qubits you want. When you use this method, set probability of states $|10\dots0 \rangle$, $|01\dots 0\rangle$,...$|00\dots1 \rangle$ to $\frac{1}{n}$ and probability of other states to zero.

mavzolej
  • 1,921
  • 7
  • 17
Martin Vesely
  • 13,891
  • 4
  • 28
  • 65