1
$\begingroup$

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.

$\endgroup$
2
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.