0
$\begingroup$

I'm trying to figure out how to transform the SWAP state gate into the square root of SWAP gate using only CNOTs or single qubit gates.

As you might guess, I'm new to this whole concept, but I'm having a hard time grasping how I can get a 1 or 0 (values in the SWAP gate matrix) to e^(i pi / 4) that are present in the square root of SWAP matrix.

I tried Kronecker product of Pauli Y and Hadamard, but I'm only getting e^(i pi / 2) elements.

Any ideas on a simple circuit? Thank you!

$\endgroup$
1
$\begingroup$

In cirq, you can get decompositions like this from cirq.two_qubit_matrix_to_operations. It will use CZs instead of CNOTs, but a few Hadamards around the CZs fixes that.

Anyways.

This is a swap:

enter image description here

This is a square-root-of-swap:

enter image description here

There's a standard way to decompose a controlled phase rotation into two CNOTs and single qubit phase rotations by half the amount. To do a controlled X rotation you just use that construction but swap the target's X and Z roles:

enter image description here

Now there's a CZ next to a CX. This can be fused into a CY with an S on the control (becayse XZ = -iY):

enter image description here

Now insert single qubit gates to make all the two qubit gates into CNOTs:

enter image description here

Lastly you'd fuse some of the single qubit gates, but this depends on your gate set. At the very least you'd combine the T gate and the S^-1 gate into a T^-1 gate because they commute across the control. For a harder challenge, see if you can figure out how to merge the S^-1 in the top right with the X^(1/4) in the top left creating an X^(-1/4) without increasing the number of other gates.

It's not possible to perform a square root of swap using fewer than three CNOTs, because the KAK decomposition of the square root of swap has three non-zero coupling coefficients.

$\endgroup$

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.