0
$\begingroup$

The corresponding gates

Suppose there are three qubits, q0, q1, and q2, if you perform a CX on q0 and q1, the entire matrix of the operation you performed on the whole quantum circuit will simply be the tensor product of CX and I.

My question is, how to do so if the irrelevant qubit is between the involved qubits? I have listed three such gates in the upper figure, one CX and two CSWAPs.

P.S. If you do some SWAPs such case can be fixed, but is there a simpler, and more general method?

$\endgroup$
1

1 Answer 1

1
$\begingroup$

A CNOT gate is $|0\rangle \langle0|\otimes I +|1\rangle \langle1|\otimes X$. If there is an intermediary qubit between it then it will simply be $$CNOT_{1,3}=|0\rangle \langle0|\otimes I \otimes I +|1\rangle \langle1| \otimes I\otimes X$$

The same logic extends to all other control gates.

$\endgroup$
1
  • $\begingroup$ Maybe you can stress that any quantum logical gates can be decomposed to a set of universal quantum gates, for example, $R_x (θ), R_y (θ), R_z (θ), P(ϕ)$ and $CNOT$ $\endgroup$ Commented Feb 22, 2022 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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