Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
$\begingroup$are you asking for a gate decomposition of the square root swap in terms of the gates listed in the figure, or are you asking how to write said gate in Mathematica in general? In the latter case, can't you simply do swap=SparseArray@Thread[{{1,1}, {2,3}, {3,2}, {4,4}} -> 1]; MatrixFunction[Sqrt, swap]?$\endgroup$
swap=SparseArray@Thread[{{1,1}, {2,3}, {3,2}, {4,4}} -> 1]; MatrixFunction[Sqrt, swap]
? $\endgroup$