1
$\begingroup$

Suppose I have a CZ(i,j) gate (or CNOT) acting on qubit $i$ and $j$, on a $n$-qubit system. Is there a general way to decompose this gate into a set of gates that only involve single-qubit gates and CZ (or CNOT) gates that can only act on nearest neighbors, i.e. CZ(k, k+1)? For instance, how do we decompose CZ(1,5) into this gate set? It'd be great if anyone can point me towards related papers or notes that I could look into!

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes absolutely it is possible! This algorithm may not use the optimal number of gates, but it gets the job done.

You may have heard of the SWAP gate which effectively switches the positions of two qubits in a register, it is comprised of 3 CNOT gates.

SWAP gate definition

So if we want to only apply 2 qubit gates on sequential qubits in a register, we can simply keep swapping one of them until they are adjacent, and then swap back. This can be generalized to any 2-qubit gate.

enter image description here

The general idea for this algorithm is outlined in the famous Neilson & Chang textbook on quantum computing, but you can also read a more detailed version of this algorithm and other facts about controlled gates here: https://riverway.li/qcsg/chapter3/#35qcsg---controlled-gates.

$\endgroup$

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.