# How to initialize a $n$ qubit system in this specific state

Basically, I have $$2n$$ qubits and I want to initialize them in the state $$\frac{|\psi\rangle}{\lVert |\psi\rangle \rVert}$$ where $$|\psi \rangle = \sum_{\mathrm{w}\in \{0,1\}^n}|\mathrm{w}\mathrm{w}\rangle$$ I know how to do it naively in Qiskit and for my purpose, this is not that bad (i.e I have $$\log n$$ qubits so the whole process will take $$O(n^2)$$ steps) but I was wondering if there is a better way to do it. I'm new to Quantum Computing so I'm sorry if this is a trivial question.

You can generate an equal superposition on the first $$n$$ qubits using $$H^{\otimes n}$$, then use $$n$$ CNOT gates to get the desired state: This circuit has a depth of $$2$$

@Ergetta.Thula's answer is complete. I just thought to add a little bit more to this discussion.

In general, the following circuit takes the state $$|0\rangle^{\otimes 2N}$$ to the state $$\sum_{i=1}^N \lambda_i |b_i \rangle |b_i \rangle$$ where we also have that $$\big(W \otimes I^{\otimes N} \big)|0\rangle^{\otimes 2N} = \sum_{i=1}^{2^N} \lambda_i |b_i\rangle |0\rangle^{\otimes N}$$. Note $$|b_i\rangle$$ are the computational basis states. That is, $$|b_i \rangle \in \{0,1\}^{ N}$$. If we add two other unitaries, says $$U, V$$ to system $$A$$ and $$B$$, then we can represent any arbitrary state $$|\Psi \rangle$$ of an $$N + N$$ qubit system. That is: $$|\Psi \rangle = (U \otimes V) \sum_{i=1}^{2^N} \lambda_i |b_i\rangle \otimes |b_i\rangle$$

• There seem to be some problem with formatting in the second paragraph. Also, regarding your last paragraph. Is there a situation where I want to use the aforementioned construction ($2N$ qubits with $N$ CNOTs and operators $U,V$) instead of some other arbitrary circuit? Also, where can I find a more formal reference for that ? Jul 19 at 19:52
• Also since we already have $N$ CNOTs shouldn't be there any condition on $U$ and $V$? Like $U$and $V$ are comprised of 1 qbit gates or something. Jul 19 at 19:56