# Encoding arbitrary quantum gates using qubits

Given an arbitrary 3-qubit state $$\sum_{xyz} c_{xyz}|xyz\rangle$$, is there a circuit (possibly with measurement) that creates the state $$\sum_{xy} c_{xyy}|x\rangle$$, up to a normalization constant?

As a weaker question, is the above circuit possible, given that the initial state can be decomposed as a tensor product of the first two qubit and the third? This would allow an encoding of a quantum gate with 2 qubits.

I see that measuring the last two qubits in the Bell basis has a chance of succeeding. But for 3 out of 4 cases, although I know I failed, I cannot correct for it as in the quantum teleporting case, because the gates needed for correction is unknown. Is this task impossible? How can I prove it?

• Typo? Should be $|xy\rangle$ instead of $|x\rangle$? Sep 2, 2022 at 12:45
• @narip No, $y$ should be contracted away. Sep 2, 2022 at 13:42
• What's the difference between $\sum_{xy} c_{xyy}|x\rangle$ and $\sum_{x} \tilde c_{x}|x\rangle$? Sep 3, 2022 at 2:39

$$\sum_{xyz,\tilde x \tilde y\tilde z} c_{xyz}c_{\tilde x\tilde y\tilde z}^*|xyz\rangle\langle \tilde x\tilde y\tilde z|\rightarrow \sum_{xy,\tilde x \tilde y} c_{xyy}c_{\tilde x\tilde y\tilde y}^*|xyy\rangle\langle \tilde x\tilde y\tilde y|$$
$$\sum_{xyz,\tilde x \tilde y\tilde z} c_{xyz}c_{\tilde x\tilde y\tilde z}^*|xyz\rangle\langle \tilde x\tilde y\tilde z|\rightarrow \frac{1}{\sum_{xy}|c_{xyy}|^2}\sum_{xy,\tilde x \tilde y} c_{xyy}c_{\tilde x\tilde y\tilde y}^*|xyy\rangle\langle \tilde x\tilde y\tilde y|$$