# Quantum Bayesian Networks

## March 5, 2019

### The iSWAP, sqrt(iSWAP) and other up-and-coming quantum gates

Filed under: Uncategorized — rrtucci @ 8:28 am

The writing is on the wall. The engineers behind the quantum computers at Google, Rigetti, IonQ, etc., are using, more and more, certain variants of the simple SWAP gate, variants that are more natural than the SWAP for their devices, variants with exotic, tantalizing names like the iSWAP, and sqrt(iSWAP). In the last day or two, I decided to bring Qubiter up-to-date by adding to its arsenal of gates, a gate that I call the SWAY. SWAY is very general. It includes the humble SWAP and all its other variants too. So, what is this SWAY, you ask?

Let $\sigma_X, \sigma_Y, \sigma_Z$ be the Pauli Matrices.

Recall that the swap of two qubits 0, 1, call it SWAP(1, 0), is defined by $SWAP = diag(1, \sigma_X, 1)$

NOTE: SWAP is qbit symmetric, meaning that SWAP(0,1) = SWAP(1,0)

We define SWAY by $SWAY = diag(1, U2, 1)$

where U2 is the most general 2-dim unitary matrix satisfying $\sigma_X U2 \sigma_X=U2$. If U2 is parametrized as $U2 = \exp(i[ \theta_0 + \theta_1\sigma_X + \theta_2\sigma_Y + \theta_3\sigma_Z])$

for real $\theta_j$, then $\theta_2=\theta_3=0$.

NOTE:SWAY is qbit symmetric (SWAY(0,1)=SWAY(1,0)) iff $\sigma_X U2 \sigma_X=U2$ iff $\theta_2=\theta_3=0$

The Qubiter simulator can now handle a SWAY with zero or any number of controls of type T or F. Very cool, don’t you think?

Here is a jupyter notebook that I wrote to test Qubiter’s SWAY implementation

https://github.com/artiste-qb-net/qubiter/blob/master/qubiter/jupyter_notebooks/unusual_gates_like_generalized_swap.ipynb