# Given 2 unknown qubits, which series of gates can put them in an equal superposition of $\vert 00 \rangle$ and $\vert 11 \rangle$?

You have 2 qubits, the states of which are unknown to you. They are either in the state $$\vert 0 \rangle$$ or $$\vert 1\rangle$$. Which sequences of gates can be applied so as to put the system in the state $$\frac{1}{\sqrt{2}}$$($$\vert 00 \rangle$$ + $$\vert 11\rangle$$)?

• I think more information is required, e.g. do you have some black-box procedure allowing you to prepare this unknown state as many times as you would like? If so, some variational minimization of some parameterized quantum circuit over a Hamiltonian whose ground state is the bell state would work. Apr 23 at 19:37

Can you use measurement?

• If you can, you measure the qubits and make the decision based on the measurement results.
• If not, and you're only allowed to use unitary gates, it's impossible. Unitary gates are reversible, so you cannot map several different states to the same $$\frac{1}{\sqrt{2}}(|00 \rangle + |11\rangle)$$ state. If there was such a transformation, applying its adjoint to the $$\frac{1}{\sqrt{2}}(|00 \rangle + |11\rangle)$$ state would lead to only one state, not both of your states.
• What about using ancillas instead of measurement? However, I am afraid we cannot uncompute them as we change input qubits. Apr 23 at 22:12
• Yes, that would work: set two auxiliary qubits to $(|00\rangle + |11\rangle)/\sqrt{2}$, then SWAP the auxiliary qubits with the input qubits. You are also correct that uncomputation is impossible without the knowledge of the input state (which reflects what Mariia said about reversibility of unitaries). Apr 24 at 6:12
• You wouldn't even need to uncompute the ancillas in this case if you're fine with garbage there, they wouldn't be entangled with the main qubits. But then you also wouldn't care about the starting state of the main qubits and the target state, so I don't think this is the intended solution Apr 24 at 7:24
• Can't we have something like the quantum XOR circuit, where we input some extra qubits to get unique outputs? Apr 26 at 9:55
• @Shantanu If you can use extra qubits and don't care about the state they end up in, you can use the SWAP approach described in the comments without relying on your inputs at all. It really depends on the constraints to your problem Apr 26 at 15:31

If you can use a reset, then applying this operation sets both qubits to $$|0\rangle$$. Then apply Hadamard gate on the first qubit and CNOT gate on both qubits. In the end you have your desired Bell state.