1

I was trying to build a $cccx$ gate. According to this paper by Berenco et al., it requires a $\sqrt[4]{X}$ gate. Furthermore, I found another paper by Muradian and Frias with this formula:

$$\sqrt A=\frac{1}{\sqrt{2i}}(iI+A).$$

From this I calculated $\sqrt[4]{X}$, $$ \sqrt[4]{X} = \begin{bmatrix}{\frac{2+i}{2}}&{\frac{-i}{2}}\\{\frac{-i}{2}}&{\frac{2+i}{2}}\end{bmatrix} $$

I am not sure about the result at all! I used MATLAB to determine the fourth power of $\sqrt[4]{X}$ matrix, but it doesn't give $X$ matrix. Also, I am confused because there should be four matrices, and I don't know how to implement them in Qiskit either.

glS
  • 24,708
  • 5
  • 34
  • 108
Syed Emad Uddin
  • 376
  • 2
  • 11
  • 4
    You used their Eq. (9) to compute the square root twice. This is not valid. This equation only holds for a self-inverse $A$, aka it only applies when $A^2=I$. That is true of $X$, but it is not true of $\sqrt{X}$, so you can't use Eq. (9) the second time to get the forth root. You instead need to directly use their Eq. (7). – Jahan Claes Apr 28 '22 at 18:44
  • Thanks! I guess I have found the solution! – Syed Emad Uddin Apr 28 '22 at 18:48
  • @JahanClaes is eqn. (7) of Muradian and Frias really valid for $\sqrt X$, where we know that $\sqrt X^4=\mathbb I$? Muradian and Frias state that eqn. (7) is for self-inverse gates ($A^2=\mathbb I$), but I think, naively, the relation between $A$ and $e^{f(A)}$ is slightly different when $A^2\ne\mathbb I$ but $A^4=\mathbb I$. – Mark Spinelli Apr 29 '22 at 14:54
  • 1
    @MarkS Eq. (7) is for self-inverse gates, but it is a formula for the $n$th root. So use $n=4$ on $X$, not $n=2$ on $\sqrt{X}$. – Jahan Claes Apr 29 '22 at 17:35
  • Got it. Thanks! But can Eq. (7) be generalized to other operators such as any old arbitrary fourth root of $I$? For example, a quarter-turn clockwise (or counterclockwise) rotation of a square? – Mark Spinelli Apr 29 '22 at 17:56

1 Answers1

7

There are a couple of ways that you might do this calculation directly. I'd start by finding the spectral decomposition of $X$: $$ X=|+\rangle\langle +|-|-\rangle\langle -|=e^{i0}|+\rangle\langle +|+e^{i\pi}|-\rangle\langle -|. $$ The fourth root of the operator is just the same thing but replacing the eigenvalues with their fourth roots: $$ \sqrt[4]{X}=e^{i0/4}|+\rangle\langle +|+e^{i\pi/4}|-\rangle\langle -|. $$ So, as a matrix, this is $$ e^{i\pi/8}\left(\begin{array}{cc} \cos\frac{\pi}{8} & -i\sin\frac{\pi}{8} \\ -i\sin\frac{\pi}{8} & \cos\frac{\pi}{8} \end{array}\right). $$

DaftWullie
  • 57,689
  • 3
  • 46
  • 124