1
$\begingroup$

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.

$\endgroup$

2 Answers 2

5
$\begingroup$

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:

enter image description here

This circuit has a depth of $2$

$\endgroup$
1
$\begingroup$

@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}$.

enter image description here

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:

enter image description here

$$ |\Psi \rangle = (U \otimes V) \sum_{i=1}^{2^N} \lambda_i |b_i\rangle \otimes |b_i\rangle $$

$\endgroup$
2
  • $\begingroup$ 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 ? $\endgroup$
    – MonteNero
    Jul 19 at 19:52
  • $\begingroup$ 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. $\endgroup$
    – MonteNero
    Jul 19 at 19:56

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.